Prototyping an improvement to The Hex monitor's user interface for more primative hardware
This commit is contained in:
parent
bd803a996b
commit
fa0e0d063b
|
@ -17,15 +17,17 @@
|
||||||
LOADUI R1 0 ; Read from tty
|
LOADUI R1 0 ; Read from tty
|
||||||
FGETC ; Read a Char
|
FGETC ; Read a Char
|
||||||
|
|
||||||
;; Check for Ctrl-D
|
CMPSKIP.NE R0 13 ; Replace all CR
|
||||||
CMPUI R14 R0 4
|
LOADUI R0 10 ; WIth LF
|
||||||
JUMP.NE R14 @.L0
|
|
||||||
CALLI R13 @finish
|
FPUTC ; Display the Char to User
|
||||||
|
|
||||||
|
;; Check for Ctrl-D
|
||||||
|
CMPSKIP.NE R0 4
|
||||||
|
JUMP @finish
|
||||||
|
|
||||||
:.L0
|
|
||||||
;; Check for EOF
|
;; Check for EOF
|
||||||
JUMP.P R0 @.L1
|
JUMP.NP R0 @finish
|
||||||
CALLI R13 @finish
|
|
||||||
|
|
||||||
:.L1
|
:.L1
|
||||||
LOADUI R1 0x1101 ; Write to TAPE_02
|
LOADUI R1 0x1101 ; Write to TAPE_02
|
||||||
|
@ -91,6 +93,9 @@
|
||||||
:ascii_comment
|
:ascii_comment
|
||||||
LOADUI R1 0 ; Read from tty
|
LOADUI R1 0 ; Read from tty
|
||||||
FGETC ; Read another char
|
FGETC ; Read another char
|
||||||
|
CMPSKIP.NE R0 13 ; Replace all CR
|
||||||
|
LOADUI R0 10 ; WIth LF
|
||||||
|
FPUTC ; Let the user see it
|
||||||
CMPUI R14 R0 10 ; Stop at the end of line
|
CMPUI R14 R0 10 ; Stop at the end of line
|
||||||
LOADUI R1 0x1101 ; Write to TAPE_02
|
LOADUI R1 0x1101 ; Write to TAPE_02
|
||||||
FPUTC ; The char we just read
|
FPUTC ; The char we just read
|
||||||
|
|
Loading…
Reference in New Issue