A83: more selecting string


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

A83: more selecting string




Hi Olle! : ) I wrote this two weeks ago I think and thanks for the help.
One problem though. I will sometimes need a leading byte higher that 255 so
I need to use a two byte register. So I did this: 

ld hl,(rown)
ex de,hl
ld de,WORDS+(hl)

Whats wrong with that. I know there is since TASM said "cannot find label
(hl). Where am I going wrong?

From: Chris
mecad@scv.net

----------------------------------------------------------------------------
------------
***PREVIOUS MESSAGE***


Date: Thu, 30 Jul 1998 11:39:25 +0100
From: Olle Hedman <oh@hem.passagen.se>
Subject: 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