Re: LZ: variables


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

Re: LZ: variables



Your problem rests in the CALL_() statements. 


When you use CALL() it acts as a subroutine.  The first ret statement 
returns back.


ex:


Start:
cp $0
CALL_Z(MyRout)
Display HI


MyRout:
Do something.....
ret


In this example HI would be displayed.
CALL statement return after the ret.
You should use jr z, instead.


ex:


Start:
cp $0
jr z, MyRout
Display HI


MyRout:
Do something....
ret


In this example HI would not be displayed because the program would 
return to ZShell at the ret. My explanation might be hard to follow but 
hope it helps.


Josh Pieper
ppieper@nemonet.com


References: