No chmk; use the system call library

This commit is contained in:
ceriel 1990-01-22 15:28:45 +00:00
parent 8850b696ab
commit 2782e386f9
4 changed files with 16 additions and 43 deletions

View file

@ -6,12 +6,5 @@
.fat:
pushl (sp)
jsb .trp
movl $I1,ap
movl (sp)+,6(ap)
chmk (ap)+
calls $1,__exit
halt
.sect .rom
I1: .data2 1
.data4 1
.data4 0

View file

@ -15,19 +15,12 @@ I1:
addb3 $'0',r1,r0
printc:
movb r0,Ich
movl ap,r2
movl $I9,ap
chmk $4
movl r2,ap
movb r0,Ich
pushl $1
pushab Ich
pushl $2
calls $3,_write
rsb
.sect .rom
I9:
.data4 3
.data4 2
.data4 Ich
.data4 1
.sect .data
Ich: .data2 0
Ich: .data1 0

View file

@ -10,24 +10,16 @@
movl (sp)+,r0
pushl r1
movl r0,.reghp
cmpl r0,.hplim
cmpl r0,.limhp
blssu I2
addl2 $02000,r0
bicl2 $0777,r0
movl r0,.hplim
movl ap,r1
movl $I9,ap
chmk (ap)+
bcc I1
pushl r0
calls $1,_brk
tst.l r0
beql I2
pushl $EHEAP
jsb .trp
rsb
I1:
movl r1,ap
I2:
rsb
.sect .data
I9: .data2 17
.data4 1
.hplim: .data4 _end

View file

@ -34,18 +34,13 @@ I3:
bisb2 r3,-(r1) ! Put them in the '0'.
ashl $-3,r0,r0 ! Shift the 3 bits off.
sobgtr r2,I3
movl ap,r2
movl $Iwr,ap
chmk $4 ! write
movl r2,ap
pushl $Iemesend-Iemes
pushab Iemes
pushl $2
calls $3,_write
bpt
.sect .data
Iemes:
.data1 'E','M',' ','t','r','a','p',' ','0','0','0','0','0',' ','(','o','c','t','a','l',')',0xa
Iemesend:
.align 2
Iwr:
.data4 3 ! 3 arguments.
.data4 2 ! File descriptor 2.
.data4 Iemes ! Address of character buffer.
.data4 Iemesend - Iemes ! Number of characters to write.