changed printf name: removed underscore

This commit is contained in:
ceriel 1989-05-29 14:42:18 +00:00
parent ce81b47935
commit 013ccf9149
3 changed files with 13 additions and 10 deletions

View file

@ -29,3 +29,5 @@ pr:
trpstr.s: trpstr.c strscript
sh strscript
distr: trpstr.s

View file

@ -19,6 +19,7 @@ ECASE=20
move.l (a0,d0.l*4), d1 ! jump address
beq 1f
move.l d1,a1
jmp (a1)
1:
move.l a1, d0
beq 2f

View file

@ -28,10 +28,10 @@ del = 0177
2:
move.l d2, -(sp)
pea (fmt)
jsr (_printf)
jsr (printf)
lea (12, sp), sp
movem.l (sp)+, d0/d1/d2/a0
jmp (_printf)
jmp (printf)
rts
1:
@ -39,9 +39,9 @@ del = 0177
bra 2b
.sect .bss
_getal:
getal:
.space 12
_char:
char:
.space 1
.align 4
.sect .data
@ -49,7 +49,7 @@ hexs:
.ascii "0123456789abcdef"
.align 4
.sect .text
_printf:
printf:
movem.l d0/d1/d2/a0/a1/a2/a3/a4/a5/a6, -(sp)
lea (44, sp), a6 ! a6 <- address of arguments
move.l (a6)+, a5 ! a5 <- address of format
@ -58,7 +58,7 @@ next: move.b (a5)+, d0
cmp.b #'%', d0
beq procnt
put: move.l d0, -(sp)
jsr (_putchar) ! long argument on stack
jsr (putchar) ! long argument on stack
tst.l (sp)+
bra next
@ -78,12 +78,12 @@ string: move.l (a6)+, a2 ! a2 <- address of string
sloop: move.b (a2)+, d0
beq next
move.l d0, -(sp)
jsr (_putchar) ! long argument on stack
jsr (putchar) ! long argument on stack
tst.l (sp)+
bra sloop
digit: move.l (a6)+, d1 ! d1 <- integer
move.l #_getal+12, a2 ! a2 <- ptr to last part of buf
move.l #getal+12, a2 ! a2 <- ptr to last part of buf
clr.b -(a2) ! stringterminator
1: divul.l #10, d2:d1 ! d1 <- qotient; d2 <- remainder
add.l #'0', d2
@ -93,7 +93,7 @@ digit: move.l (a6)+, d1 ! d1 <- integer
bra sloop ! print digitstring.
hex: move.l (a6)+, d1 ! d1 <- integer
move.l #_getal+12, a2 ! a2 <- ptr to last part of buf
move.l #getal+12, a2 ! a2 <- ptr to last part of buf
clr.b -(a2) ! stringterminator
move.l #7, d2 ! loop control
1: move.l d1, d0
@ -108,7 +108,7 @@ out:
rts
_putchar:
putchar:
move.l #1, -(sp)
pea (11,sp)
move.l #1, -(sp)