Last change
on this file since 4810254 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[7bf3856] | 1 | .globl _Cbuffs
|
---|
| 2 | .globl _Stdbufs
|
---|
| 3 | .globl _Stdbuf
|
---|
| 4 | .globl _puts
|
---|
| 5 | .text
|
---|
| 6 | _puts:
|
---|
| 7 | ~~puts:
|
---|
| 8 | ~str=R13
|
---|
| 9 | link R14,#0
|
---|
| 10 | movem.l R7-R7/R13-R13,-(sp)
|
---|
| 11 | *line 15
|
---|
| 12 | move.l 8(R14),R13
|
---|
| 13 | *line 15
|
---|
| 14 | bra L4
|
---|
| 15 | L3:
|
---|
| 16 | *line 16
|
---|
| 17 | *line 17
|
---|
| 18 | move.l #18+_Cbuffs,(sp)
|
---|
| 19 | move.b (R13)+,R0
|
---|
| 20 | ext.w R0
|
---|
| 21 | move R0,-(sp)
|
---|
| 22 | jsr _putc
|
---|
| 23 | addq.l #2,sp
|
---|
| 24 | cmp #-1,R0
|
---|
| 25 | bne L5
|
---|
| 26 | *line 17
|
---|
| 27 | move #-1,R0
|
---|
| 28 | bra L1
|
---|
| 29 | *line 18
|
---|
| 30 | L5:L4:
|
---|
| 31 | *line 19
|
---|
| 32 | tst.b (R13)
|
---|
| 33 | bne L3
|
---|
| 34 | L2:
|
---|
| 35 | *line 19
|
---|
| 36 | move.l #18+_Cbuffs,(sp)
|
---|
| 37 | move #10,-(sp)
|
---|
| 38 | jsr _putc
|
---|
| 39 | addq.l #2,sp
|
---|
| 40 | bra L1
|
---|
| 41 | L1:tst.l (sp)+
|
---|
| 42 | movem.l (sp)+,R13-R13
|
---|
| 43 | unlk R14
|
---|
| 44 | rts
|
---|
| 45 | .globl _aputc
|
---|
| 46 | .text
|
---|
| 47 | _aputc:
|
---|
| 48 | ~~aputc:
|
---|
| 49 | ~c=R7
|
---|
| 50 | ~ptr=R13
|
---|
| 51 | link R14,#0
|
---|
| 52 | movem.l R6-R7/R13-R13,-(sp)
|
---|
| 53 | *line 27
|
---|
| 54 | move 8(R14),R7
|
---|
| 55 | *line 27
|
---|
| 56 | move.l 10(R14),R13
|
---|
| 57 | *line 27
|
---|
| 58 | and #127,R7
|
---|
| 59 | *line 29
|
---|
| 60 | *line 30
|
---|
| 61 | cmp #10,R7
|
---|
| 62 | bne L7
|
---|
| 63 | *line 30
|
---|
| 64 | *line 31
|
---|
| 65 | move.l R13,(sp)
|
---|
| 66 | move #13,-(sp)
|
---|
| 67 | jsr _putc
|
---|
| 68 | addq.l #2,sp
|
---|
| 69 | cmp #-1,R0
|
---|
| 70 | bne L8
|
---|
| 71 | *line 31
|
---|
| 72 | move #-1,R0
|
---|
| 73 | bra L6
|
---|
| 74 | *line 32
|
---|
| 75 | L8:L7:
|
---|
| 76 | *line 33
|
---|
| 77 | move.l R13,(sp)
|
---|
| 78 | move R7,-(sp)
|
---|
| 79 | jsr _putc
|
---|
| 80 | addq.l #2,sp
|
---|
| 81 | bra L6
|
---|
| 82 | L6:tst.l (sp)+
|
---|
| 83 | movem.l (sp)+,R7-R7/R13-R13
|
---|
| 84 | unlk R14
|
---|
| 85 | rts
|
---|
| 86 | .globl _fputs
|
---|
| 87 | .text
|
---|
| 88 | _fputs:
|
---|
| 89 | ~~fputs:
|
---|
| 90 | ~s=R13
|
---|
| 91 | ~fp=12
|
---|
| 92 | link R14,#0
|
---|
| 93 | movem.l R7-R7/R13-R13,-(sp)
|
---|
| 94 | *line 41
|
---|
| 95 | move.l 8(R14),R13
|
---|
| 96 | *line 41
|
---|
| 97 | bra L12
|
---|
| 98 | L11:
|
---|
| 99 | *line 42
|
---|
| 100 | *line 43
|
---|
| 101 | move.l 12(R14),(sp)
|
---|
| 102 | move.b (R13)+,R0
|
---|
| 103 | ext.w R0
|
---|
| 104 | move R0,-(sp)
|
---|
| 105 | jsr _aputc
|
---|
| 106 | addq.l #2,sp
|
---|
| 107 | cmp #-1,R0
|
---|
| 108 | bne L13
|
---|
| 109 | *line 43
|
---|
| 110 | move #-1,R0
|
---|
| 111 | bra L9
|
---|
| 112 | L13:L12:
|
---|
| 113 | *line 44
|
---|
| 114 | tst.b (R13)
|
---|
| 115 | bne L11
|
---|
| 116 | L10:
|
---|
| 117 | *line 44
|
---|
| 118 | clr R0
|
---|
| 119 | bra L9
|
---|
| 120 | L9:tst.l (sp)+
|
---|
| 121 | movem.l (sp)+,R13-R13
|
---|
| 122 | unlk R14
|
---|
| 123 | rts
|
---|
| 124 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.