Re: A86: Efficiency Problem Part II


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

Re: A86: Efficiency Problem Part II




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

> I am wasting TONS of space in my program with the data. Why? I am using 
> spaces
>  to complete lines, and I know there has to be a more efficient way of
>  displaying this stuff. The following is all the strings that have what is
>  probably wasted bytes in them because they use spaces to finish off a line.
> Is
>  there a word wrap routine that can save me all this space?


	ld hl,message
	ld b,4			;4 lines to display
	call display_loop	;display those 4 lines
	;,,,other code


display_loop:
	call _puts			;display line
	push hl				;save hl
	call _newline		;go to next line
	pop hl				;retrieve hl
	djnz display_loop	;keep going until b=0
	ret					;return