[A83] Re: Defining custom vars
[Prev][Next][Index][Thread]
[A83] Re: Defining custom vars
ok, I have:
nolist
#include "ion.inc"
#DEFINE kLeft 02h
#DEFINE kRight 01h
#DEFINE kUp 03h
#DEFINE kDown 04h
#DEFINE kEnter 05h
#DEFINE kClear 09h
.list
#ifdef TI83P
.org progstart-2
.db $BB,$6D
#else
.org progstart
#endif
ret
jr nc,begin
.db "Space Invaders",0
begin:
Xpos = saferam2
Ypos = Xpos+1
bcall(_clrLCDFull)
ld b,8
ld a,47
ld l,50
ld (Xpos),a
ld (Ypos),l
.... etc
and my compiler is giving me trouble about unrecognized agument when it
comes to Ypos... what did I do wrong when defineing it?
At 08:56 PM 3/16/2002 -0600, you wrote:
>what about saferam1?
>
>would, xpos = saferam1
> ypos = saferam1+1 work?
>
>At 09:51 PM 5/7/2002 -0500, you wrote:
>
> >Yes, they're called Labels.
> >
> >you define them like this: (NOT TABBED)
> >
> >Xpos = saferam2
> >Ypos = Xpos + 1
> >
> >Then put them in parenthesis if you want the value at that location:
> >
> > ld a,(Xpos) ;<-- Parentheis! this means the value at Xpos
> >
> >and if you want the offset of that label:
> >
> > ld hl,Xpos ;<-- No parenthesis, hl = the address of xpos
> >
> >when you have the offset of a label, you can move the offset around and get
> >the bytes next to it.
> >
> > ld hl,Xpos
> > inc hl ;hl got moved up 1, so it now points one byte ahead.
> > ld a,(hl) ;a now contains the byte ahead of Xpos
> >
> >_________________________________________________________________
> >Join the world's largest e-mail service with MSN Hotmail.
> >http://www.hotmail.com
References: