Re: A86: HI.
[Prev][Next][Index][Thread]
Re: A86: HI.
What is _asapvar?
ComAsYuAre@aol.com wrote:
>
> ld hl,_asapvar ;hl->name of program
> rst 20h ;copy to OP1
> rst 10h ;_findsym
> xor a
> ld hl,data_start-_asm_exec_ram+4 ;offset
> add hl,de ;hl=pointer to data in original prog
> adc a,b ;in case we overlapped pages
> call _SET_ABS_DEST_ADDR
> xor a ;no absolute addressing now
> ld hl,data_start ;get data from here
> call _SET_ABS_SRC_ADDR
> ld hl,data_end-data_start ;number of bytes to save
> call _SET_MM_NUM_BYTES
> jp _MM_LDIR ;copy data and return
>
> In a message dated 12/11/99 1:54:22 AM Eastern Standard Time, david@acz.org
> writes:
>
> > Then write it back with a routine like this:
> >
> > ld hl,ProgramVar-1
> > rst 20h
> > rst 10h
> > call _ex_ahl_bde
> > ld de,GameSaveData-_asm_exec_ram+4
> > add hl,de
> > adc a,0
> > call _set_abs_dest_addr
> > sub a
> > ld hl,GameSaveData
> > call _set_abs_src_addr
> > ld hl,GameSaveDataSize
> > call _set_mm_num_bytes
> > call _mm_ldir
> > ret
> >
> > ProgramVar:
> > .db 4,"name" ; 4 is the number of chars in 'name', which is the
> > program variable's name
> >
> > Note that I haven't done any 86 coding in a while and I just ripped this
> > from my last project, so there could be a more optimized way...
> >
>
> ----
> Jonah Cohen
> <ComAsYuAre@aol.com>
> http://linux.hypnotic.org/~jonah/
References: