A86: writeback
[Prev][Next][Index][Thread]
A86: writeback
can somebody help me with this writeback routine for saving high scores and
such?
when i try this routine, it doesn't seem to do anything at all to the data in
the original program.
save_data:
ld hl,varname
rst 20h ;copy to OP1
rst 10h ;_findsym
jr c,quit ;renamed - so no write back
ld a,b
ex de,hl
call _load_ram_ahl
ld de,data-_asm_exec_ram ;offset
add hl,de ;hl=pointer to data in original prog
adc a,0 ;in case we overlapped
call _SET_ABS_DEST_ADDR
xor a ;no absolute addressing now
ld hl,data ;get data from here
call _SET_ABS_SRC_ADDR
ld hl,36 ;number of bytes to save
call _SET_MM_NUM_BYTES
call _mm_ldir ;copy data