A83: Re: (no subject)
[Prev][Next][Index][Thread]
A83: Re: (no subject)
On 10-Jul-98, Alan C Johnson wrote:
>2. How do you get string input? (It can be done e.i. Password)
You don't. Nobody knows exactly how to do it, but I'm working on it...
(yes, I've _found_ something.. =))
>4. How do you get pixel legnth for a variable legnth string? (I
>don't know if it can be done without too much memory
>usage)
You'll have to get it one character at a time, through a procedure that is
handled quite inefficiently by the system. =) But what you do is that you
loop through all the characters, call a function (don't remember its name but
it's documented at www.ti.com), then add what the function returns for each
character. Like this (the routine wants the string in hl):
GetWidth: xor a
gw_loop: push af
ld a,(hl)
inc hl
or a
jr z,gw_done
push hl
call _getwidth_dontknowthenameofthefunction
pop hl
pop af
add b ;I think the return value is in b
jr gw_loop
gw_done: pop af
ret
Linus
References:
- No Subject
- From: benjamin99@juno.com (Alan C Johnson)