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: .fat:
pushl (sp) pushl (sp)
jsb .trp jsb .trp
movl $I1,ap calls $1,__exit
movl (sp)+,6(ap)
chmk (ap)+
halt halt
.sect .rom
I1: .data2 1
.data4 1
.data4 0

View file

@ -16,18 +16,11 @@ I1:
printc: printc:
movb r0,Ich movb r0,Ich
movl ap,r2 pushl $1
movl $I9,ap pushab Ich
chmk $4 pushl $2
movl r2,ap calls $3,_write
rsb rsb
.sect .rom
I9:
.data4 3
.data4 2
.data4 Ich
.data4 1
.sect .data .sect .data
Ich: .data2 0 Ich: .data1 0

View file

@ -10,24 +10,16 @@
movl (sp)+,r0 movl (sp)+,r0
pushl r1 pushl r1
movl r0,.reghp movl r0,.reghp
cmpl r0,.hplim cmpl r0,.limhp
blssu I2 blssu I2
addl2 $02000,r0 addl2 $02000,r0
bicl2 $0777,r0 bicl2 $0777,r0
movl r0,.hplim pushl r0
movl ap,r1 calls $1,_brk
movl $I9,ap tst.l r0
chmk (ap)+ beql I2
bcc I1
pushl $EHEAP pushl $EHEAP
jsb .trp jsb .trp
rsb rsb
I1:
movl r1,ap
I2: I2:
rsb 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'. bisb2 r3,-(r1) ! Put them in the '0'.
ashl $-3,r0,r0 ! Shift the 3 bits off. ashl $-3,r0,r0 ! Shift the 3 bits off.
sobgtr r2,I3 sobgtr r2,I3
movl ap,r2 pushl $Iemesend-Iemes
movl $Iwr,ap pushab Iemes
chmk $4 ! write pushl $2
movl r2,ap calls $3,_write
bpt bpt
.sect .data .sect .data
Iemes: Iemes:
.data1 'E','M',' ','t','r','a','p',' ','0','0','0','0','0',' ','(','o','c','t','a','l',')',0xa .data1 'E','M',' ','t','r','a','p',' ','0','0','0','0','0',' ','(','o','c','t','a','l',')',0xa
Iemesend: Iemesend:
.align 2 .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.