Re: A86: Efficiency Problem Part II


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

Re: A86: Efficiency Problem Part II




In a message dated 12/11/98 9:41:52 PM Eastern Standard Time,
ZeromusMog@aol.com writes:

> I'm not understanding how this is working... it looks as if it would simply
>  slap the string on the screen, put down a new line, put some junk on the
>  screen (_puts destroys hl, correct?) and keep doing this until b runs
out...


maybe i should have elaborated a bit.  _puts does not destroy hl, it simply
points to the byte after the 0.  so do it like this:


	ld hl, message
	ld b,5
	call display_loop


message:
	.db "line 1",0
	.db "line 2",0
	.db "line 3",0
	.db "line 4",0
	.db "line 5",0