A83: Random text,
[Prev][Next][Index][Thread]
A83: Random text,
A routine in a program i'm writing displays random
lines of text. Can someone look at my code and see
what i'm doing wrong? The output of the following
routine should be the memory address of the text in HL
to be used by one of the put routines.
Thanks.
-----------------------------------------------
answer:
ld b,50
call irandom
ld hl,answerpointers
loop:
cp 0
jr z,next
dec a
inc hl
inc hl
jr loop
next:
ld a,(HL)
ld e,a
inc de
ld a,(HL)
ld h,a
ld l,e
ret
answerpointers:
.dw answer0
.dw answer1
.dw answer2
.dw answer3
etc...
answer0:
.db "text",0
answer1:
.db "other text",0
etc....
__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/
Follow-Ups: