source: buchla-68k/alcyon/putw.s@ 73dd55f

Last change on this file since 73dd55f was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 464 bytes
Line 
1.globl _Cbuffs
2.globl _Stdbufs
3.globl _Stdbuf
4.globl _putw
5.text
6_putw:
7~~putw:
8~w=R7
9~stream=10
10link R14,#0
11movem.l R6-R7,-(sp)
12*line 17
13move 8(R14),R7
14*line 17
15*line 18
16move.l 10(R14),(sp)
17clr R0
18move R7,R0
19lsr #8,R0
20move R0,-(sp)
21and #255,(sp)
22jsr _putc
23addq.l #2,sp
24tst R0
25blt L1
26*line 19
27*line 20
28move.l 10(R14),(sp)
29move R7,-(sp)
30and #255,(sp)
31jsr _putc
32addq.l #2,sp
33L1:tst.l (sp)+
34movem.l (sp)+,R7-R7
35unlk R14
36rts
37.data
Note: See TracBrowser for help on using the repository browser.