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

Re: A85: Vars




>
>#include "usgard.h"
>
>	.org 0
>	.db "Variable Test",0
>
>	call CLEARLCD
>	ld a,(Variables)

each ld a,(Variables) should be ld a,(&Variables) .  The only time you
dont use the & for addresses in ld instructions is when the variable
location is at a fixed location in the ram.... say 

VariablesTEXT = TEXT_MEM+2	;always the same address in mem.

ld a,(VariablesTEXT)
...
ld a,(&Variables)
...

Variables:	;different address depending on where in
.db 4,5		;memory the string (asm program) is at

-mike
 mgp4007@omega.uta.edu


References: