Added EXIT, WRITE and BRK entry point

This commit is contained in:
ceriel 1992-06-30 17:06:10 +00:00
parent ea624f82de
commit 8e4ee3ec1a
3 changed files with 72 additions and 0 deletions

View file

@ -9,6 +9,7 @@
.define .limhp
.define .trppc
.define .trpim
.define EXIT, BRK, WRITE
! run time startoff
.data2 0
@ -29,11 +30,36 @@
pushl r2
pushl r1
calls $3,__m_a_i_n
EXIT:
movl $Im2,ap
movl r0,6(ap)
chmk (ap)+
halt
break = 17
.align 1
BRK:
.data2 0x0000
chmk $break
bcc 1f
jmp errmon
1:
movl 4(ap),.limhp
clrl r0
ret
write = 4
.align 1
WRITE:
.data2 0x0000
chmk $write
bcc 1f
jmp errmon
1:
ret
.sect .data
Im2:
.data2 1

View file

@ -9,6 +9,7 @@
.define .limhp
.define .trppc
.define .trpim
.define EXIT,WRITE,BRK
! run time startoff
.data2 0
@ -29,11 +30,32 @@
pushl r2
pushl r1
calls $3,__m_a_i_n
EXIT:
movl $Im2,ap
movl r0,6(ap)
chmk (ap)+
halt
DEFINE(WRITE)
chmk $SYS_write
bcs 1f
ret
1:
jmp cerror
DEFINE(BRK)
cmpl 4(ap),$endbss
bgeq 1f
movl $endbss,4(ap)
1:
chmk $17
bcs 1f
movl 4(ap),.limhp
clrl r0
ret
1:
jmp cerror
.sect .data
Im2:
.data2 1

View file

@ -9,6 +9,7 @@
.define .limhp
.define .trppc
.define .trpim
.define EXIT,WRITE,BRK
! run time startoff
.data2 0
@ -29,11 +30,34 @@
pushl r2
pushl r1
calls $3,__m_a_i_n
EXIT:
movl $Im2,ap
movl r0,6(ap)
chmk (ap)+
halt
write = 4
WRITE:
.data2 0x0000
chmk $write
bcc 1f
jmp cerror
1:
ret
break = 17
BRK:
.data2 0x0000
chmk $break
bcc 1f
jmp cerror
1:
movl 4(ap),.limhp
clrl r0
ret
.sect .data
Im2:
.data2 1