source: buchla-68k/alcyon/sprintf.s

Last change on this file 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
2L1:.ds.b 4
3.text
4.globl _sprintf
5.text
6_sprintf:
7~~sprintf:
8~str=8
9~fmt=12
10~va_alist=16
11link R14,#-4
12movem.l R6-R7,-(sp)
13~count=R7
14~aptr=-4
15*line 30
16lea 16(R14),R8
17move.l R8,-4(R14)
18*line 31
19move.l 8(R14),L1
20*line 32
21move.l -4(R14),(sp)
22move.l 12(R14),-(sp)
23move.l #_spsub,-(sp)
24jsr _dofmt_
25addq.l #8,sp
26move.l R0,R7
27*line 33
28move.l L1,R8
29clr.b (R8)
30*line 34
31move.l R7,R0
32bra L2
33L2:tst.l (sp)+
34movem.l (sp)+,R7-R7
35unlk R14
36rts
37.text
38_spsub:
39~~spsub:
40~c=8
41link R14,#-4
42*line 47
43move.l L1,R8
44move 8(R14),R0
45move.b R0,(R8)
46and #255,R0
47add.l #1,L1
48bra L4
49L4:unlk R14
50rts
51.data
Note: See TracBrowser for help on using the repository browser.