Re: A86: writeback


[Prev][Next][Index][Thread]

Re: A86: writeback




try removing the call to _load_ram_ahl, it ruins your absolute address.

-josh

On Sun, 4 Apr 1999 11:34:27 EDT ComAsYuAre@aol.com writes:
>
>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
why?
>	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
>
>

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]