Added EXIT, WRITE entry point

This commit is contained in:
ceriel 1992-06-30 17:42:09 +00:00
parent 5c5812e853
commit 8474be6e52
2 changed files with 5 additions and 3 deletions

View file

@ -1,4 +1,4 @@
.define EXIT, F_DUM .define EXIT, WRITE, F_DUM
.define ERANGE, ESET, EHEAP, EILLINS, EODDZ, ECASE, EBADMON .define ERANGE, ESET, EHEAP, EILLINS, EODDZ, ECASE, EBADMON
.define hol0, trppc, trpim, reghp, argv, envp .define hol0, trppc, trpim, reghp, argv, envp
.sect .text .sect .text
@ -7,7 +7,6 @@
.sect .bss .sect .bss
.sect .text .sect .text
EXIT = 0
F_DUM = 0 F_DUM = 0
ERANGE = 1 ERANGE = 1
@ -40,9 +39,12 @@ EBADMON = 25
push *RR14, argv push *RR14, argv
push *RR14, $1 push *RR14, $1
calr __m_a_i_n calr __m_a_i_n
EXIT:
ldl RR14, $0xC00017FC ldl RR14, $0xC00017FC
sc $0 sc $0
WRITE: jr __write
.sect .bss .sect .bss
begbss: begbss:
.sect .data .sect .data

View file

@ -11,7 +11,7 @@ mon:
cp R0, $1 ! exit cp R0, $1 ! exit
jr NE, read jr NE, read
inc R15, $2 inc R15, $2
sc $EXIT sc $0
read: cp R0, $3 ! read read: cp R0, $3 ! read
jr NE, write jr NE, write
pop R0, *RR14 ! dummy; all input from stdin pop R0, *RR14 ! dummy; all input from stdin