1985-07-26 11:56:24 +00:00
|
|
|
.define .print
|
1987-01-16 16:49:46 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
|
|
|
.sect .text
|
1985-07-26 11:56:24 +00:00
|
|
|
|
1987-01-16 16:49:46 +00:00
|
|
|
.sect .text
|
1985-07-26 11:56:24 +00:00
|
|
|
|
|
|
|
.print:
|
|
|
|
save[r0,r1,r2]
|
|
|
|
movd 16(sp), r0
|
|
|
|
movd 1000000000, r2
|
|
|
|
cmpqd 0, r0
|
|
|
|
ble 4f
|
|
|
|
movb "-", tos
|
|
|
|
jsr @.putchar
|
|
|
|
negd r0, r0
|
|
|
|
4:
|
|
|
|
! deid r2, r0
|
|
|
|
movd r0, r1
|
|
|
|
divd r2, r1
|
|
|
|
modd r2, r0
|
|
|
|
addb "0", r1
|
|
|
|
movb r1, tos
|
|
|
|
jsr @.putchar
|
|
|
|
divd 10, r2
|
|
|
|
cmpqd 0, r2
|
|
|
|
bne 4b
|
|
|
|
restore[r0,r1,r2]
|
|
|
|
ret 4
|