Re: A86: Input (yes another input question)


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

Re: A86: Input (yes another input question)




Hmm, now why didn't I think of that?  Oh, wait, I did.  But my loop was
unrolled (for speed, of course).  ;-)

-----Original Message-----
From: ComAsYuAre@aol.com <ComAsYuAre@aol.com>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Saturday, October 03, 1998 8:28 PM
Subject: Re: A86: Input (yes another input question)


>
>In a message dated 10/3/98 9:15:57 PM Eastern Daylight Time,
>uneven14@hotmail.com writes:
>
>> After what Dux just said about using .db to input I got to thinking.  I
>>  was wondering would this code work for getting a 3 char string?
>>
>>
>>
>>  KeyLoop:
>>   call GET_KEY
>>   ld string+1,a
>>   call GET_KEY
>>   ld string+2,a
>>   call GET_KEY
>>   ld string+3,a
>>
>>  Other_Code:
>>   ......
>>
>
>
>close.  try this:
>
>
>
> ld hl,string
> ld b,3
>loop:
> call GET_KEY
> or a
> jr z,loop
> ld (hl),a
> inc hl
> djnz loop
>
> ;other code....
>
>string:
> .db 0,0,0