Last change
on this file since 33b5477 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
629 bytes
|
Line | |
---|
1 | .bss
|
---|
2 | L1:.ds.b 4
|
---|
3 | .text
|
---|
4 | .globl _sprintf
|
---|
5 | .text
|
---|
6 | _sprintf:
|
---|
7 | ~~sprintf:
|
---|
8 | ~str=8
|
---|
9 | ~fmt=12
|
---|
10 | ~va_alist=16
|
---|
11 | link R14,#-4
|
---|
12 | movem.l R6-R7,-(sp)
|
---|
13 | ~count=R7
|
---|
14 | ~aptr=-4
|
---|
15 | *line 30
|
---|
16 | lea 16(R14),R8
|
---|
17 | move.l R8,-4(R14)
|
---|
18 | *line 31
|
---|
19 | move.l 8(R14),L1
|
---|
20 | *line 32
|
---|
21 | move.l -4(R14),(sp)
|
---|
22 | move.l 12(R14),-(sp)
|
---|
23 | move.l #_spsub,-(sp)
|
---|
24 | jsr _dofmt_
|
---|
25 | addq.l #8,sp
|
---|
26 | move.l R0,R7
|
---|
27 | *line 33
|
---|
28 | move.l L1,R8
|
---|
29 | clr.b (R8)
|
---|
30 | *line 34
|
---|
31 | move.l R7,R0
|
---|
32 | bra L2
|
---|
33 | L2:tst.l (sp)+
|
---|
34 | movem.l (sp)+,R7-R7
|
---|
35 | unlk R14
|
---|
36 | rts
|
---|
37 | .text
|
---|
38 | _spsub:
|
---|
39 | ~~spsub:
|
---|
40 | ~c=8
|
---|
41 | link R14,#-4
|
---|
42 | *line 47
|
---|
43 | move.l L1,R8
|
---|
44 | move 8(R14),R0
|
---|
45 | move.b R0,(R8)
|
---|
46 | and #255,R0
|
---|
47 | add.l #1,L1
|
---|
48 | bra L4
|
---|
49 | L4:unlk R14
|
---|
50 | rts
|
---|
51 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.