AppleIIAsm-Collection/source/disk1_stdio/T.SINPUT.SUB.MIN
nathanriggs 82d0e74c1a 0.3.1 updates
some minor bugfixes, directory shuffling, added demo and utility disks
2019-01-26 21:02:17 -05:00

28 lines
610 B
Plaintext

SINPUT
PLA
STA RETADR
PLA
STA RETADR+1
LDX #$00
JSR GETLN
STX :STRLEN ; STORE STR LENGTH
CPX #0
BEQ :EXIT
:INP_CLR
LDY #0
LDA :STRLEN ; LENGTH OF STRING
STA RETLEN,Y ; PUT LENGTH
:LOOP
LDA KEYBUFF,Y ; PUT STR INTO NEW LOC
STA RETURN,Y
INY
CPY :STRLEN ; IF Y < STR LENGTH
BNE :LOOP ; LOOP; ELSE, CONTINUE
:EXIT
LDA RETADR+1
PHA
LDA RETADR
PHA
RTS
:STRLEN DS 1