Re: LZ: HELP


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

Re: LZ: HELP



I also am new to Z80 programming, but I think I can solve this one(even if I
don't I'll just get corrected).  The JUMP_(CallKey) right after the string
should be moved to after the ROM_CALL(D_ZT_STR).  HaStr should just be a
label to tell the program where to find the string.  It's not a function.
 Also, .db "HaHa" should be .db "HaHa",0.
This is called a zero terminated string.  What happens is the zero gets put
at the end of HaHa so when you say ROM_CALL(D_ZT_STR)  (Short for Display
ZeroTerminated String) It knows where the end of the string is.  Otherwise,
it gets messed up and displays whatever happens to be in memory after HaHa.
 Another way you could do it is use what's called a length-indexed string.
 To do this you would make it 
.db 4,"HaHa"  to tell the program that HaHa has four characters and you would
change ROM_CALL(D_ZT_STR) to ROM_CALL(D_LT_STR).


L8r,


EJ
<oo0ej0oo@alpha2.csd.uwm.edu>


References: