Re: A83: select string line


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

Re: A83: select string line




No. that would select the 2'nd byte in the first line, and thus display 
"ne one"
to select the next line you must add the number of bytes in the first line
to the address STRING (in this case 9 (remember the 0))

The easiest way to handle multiple lines like this, i think, is to have a
fixed line length and fill the rest of the line with 0's. That way, to get
the line you whant, you just multiply the line-number with the length of a
line and add that to the address of the first line..

//Olle

At 21:24 1998-07-29 -0700, you wrote:
>ld hl,20*256+30
>ld (pencol),hl
>ld hl,STRING+2
>call _vputs
>
>STRING:
>.db "line one",0
>.db "line two",0
>
>If not is there a way to do this?


References: