AppleIIAsm-Collection/source/disk19_demo_builds_1/T.MIN.SUB.SINPUT
nathanriggs c8cac53c5e Rev 0.4 updates
Massive updates that changes the way most subroutines are handled. Major bugfixes, various utilities added, started higher-level libraries.
2019-04-26 18:49:10 -04:00

27 lines
501 B
Plaintext

SINPUT
LDX #$00
JSR GETLN
STX :STRLEN
CPX #0
BEQ :ZEXIT
:INP_CLR
LDY #0
LDA :STRLEN
STA RETLEN
STA RETURN
INC RETLEN
:LOOP
LDA KEYBUFF,Y
INY
STA RETURN,Y
CPY :STRLEN
BNE :LOOP ; LOOP
JMP :EXIT
:ZEXIT
LDA #0
STA RETLEN
STA RETURN
:EXIT
RTS
:STRLEN DS 1