Re: A85: D_ZT_STR
[Prev][Next][Index][Thread]
Re: A85: D_ZT_STR
1) make sure you add PROGRAM_ADDR to the location of your string
2) make sure your string is in fact zero terminated.
IE:
ld hl, mystring
ld de, (PROGRAM_ADDR)
add hl, de
ROM_CALL(D_ZT_STR)
or in usgard
ld hl, &mystring
call D_ZT_STR
and later in your program, at the end:
.db "Hello!",0
Be sure you have some form of a pause, and a "ret" statement before your
data begins and after your program ends.
A whole program:
.org 0
.db "Hello",0
ld a, 4 ; sets graphics mode, ALWAYS DO THIS.
out (5), a
ld hl, hellothere
ld de, (PROGRAM_ADDR)
add hl, de
ROM_CALL (D_ZT_STR)
ret
hellothere:
.db "Hello There."
.end
At 06:08 PM 9/4/97 GMT, you wrote:
>Could someone give me some infromation on ROM_CALL(D_ZT_STR)?
>Every time I use it in a program, it crashes the calculator, and/or does
>some other wierd stuff. Usually, it doesn't even display my string. Maybee
>my calculator is broken, but I've seen it used in other programs, that work
>on my calculator.
>I'm probably just using it wrong. Could someone help?
>
>
---
Evil Jim
Viva La Mexico
<eviljim@writeme.com>
http://members.tripod.com/~eviljim/
I want to die in my sleep like my Grandfather, not screaming in pain like
the passengers in my car...