Last change
on this file since 0170798 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[7bf3856] | 1 | .globl _Cbuffs
|
---|
| 2 | .globl _Stdbufs
|
---|
| 3 | .globl _Stdbuf
|
---|
| 4 | .globl _chantab
|
---|
| 5 | .globl _Wrkbuf
|
---|
| 6 | .globl _fseek
|
---|
| 7 | .text
|
---|
| 8 | _fseek:
|
---|
| 9 | ~~fseek:
|
---|
| 10 | ~fp=R13
|
---|
| 11 | ~pos=12
|
---|
| 12 | ~mode=16
|
---|
| 13 | link R14,#-4
|
---|
| 14 | movem.l R5-R7/R13-R13,-(sp)
|
---|
| 15 | ~i=R7
|
---|
| 16 | ~lr=R6
|
---|
| 17 | ~curpos=-4
|
---|
| 18 | *line 27
|
---|
| 19 | move.l 8(R14),R13
|
---|
| 20 | *line 27
|
---|
| 21 | *line 27
|
---|
| 22 | btst #2,12(R13)
|
---|
| 23 | beq L2
|
---|
| 24 | *line 28
|
---|
| 25 | *line 29
|
---|
| 26 | *line 30
|
---|
| 27 | move #-1,(sp)
|
---|
| 28 | move.l R13,-(sp)
|
---|
| 29 | jsr _flush_
|
---|
| 30 | addq.l #4,sp
|
---|
| 31 | tst R0
|
---|
| 32 | beq L3
|
---|
| 33 | *line 30
|
---|
| 34 | move #-1,R0
|
---|
| 35 | bra L1
|
---|
| 36 | *line 31
|
---|
| 37 | L3:bra L4
|
---|
| 38 | L2:
|
---|
| 39 | *line 32
|
---|
| 40 | *line 33
|
---|
| 41 | *line 34
|
---|
| 42 | *line 35
|
---|
| 43 | cmp #1,16(R14)
|
---|
| 44 | bne L5
|
---|
| 45 | tst.l (R13)
|
---|
| 46 | beq L5
|
---|
| 47 | *line 35
|
---|
| 48 | move.l 4(R13),R0
|
---|
| 49 | sub.l (R13),R0
|
---|
| 50 | sub.l R0,12(R14)
|
---|
| 51 | L5:L4:
|
---|
| 52 | *line 38
|
---|
| 53 | clr R0
|
---|
| 54 | ext.l R0
|
---|
| 55 | move.l R0,4(R13)
|
---|
| 56 | move.l R0,(R13)
|
---|
| 57 | *line 39
|
---|
| 58 | and.b #-9,12(R13)
|
---|
| 59 | *line 41
|
---|
| 60 | move 16(R14),(sp)
|
---|
| 61 | move.l 12(R14),-(sp)
|
---|
| 62 | move.b 13(R13),R0
|
---|
| 63 | ext.w R0
|
---|
| 64 | move R0,-(sp)
|
---|
| 65 | jsr _lseek
|
---|
| 66 | addq.l #6,sp
|
---|
| 67 | move R0,R6
|
---|
| 68 | *line 43
|
---|
| 69 | *line 44
|
---|
| 70 | move.b 13(R13),R0
|
---|
| 71 | ext.w R0
|
---|
| 72 | muls #12,R0
|
---|
| 73 | move.l R0,R8
|
---|
| 74 | move.l #_chantab,R9
|
---|
| 75 | move.l 8(R8,R9.l),R8
|
---|
| 76 | clr R0
|
---|
| 77 | move 32(R8),R0
|
---|
| 78 | and #-32768,R0
|
---|
| 79 | beq L6
|
---|
| 80 | *line 44
|
---|
| 81 | or.b #8,12(R13)
|
---|
| 82 | *line 45
|
---|
| 83 | L6:
|
---|
| 84 | *line 46
|
---|
| 85 | *line 47
|
---|
| 86 | tst R6
|
---|
| 87 | bge L7
|
---|
| 88 | *line 47
|
---|
| 89 | move #-1,R0
|
---|
| 90 | bra L1
|
---|
| 91 | *line 48
|
---|
| 92 | L7:
|
---|
| 93 | *line 49
|
---|
| 94 | clr R0
|
---|
| 95 | bra L1
|
---|
| 96 | L1:tst.l (sp)+
|
---|
| 97 | movem.l (sp)+,R6-R7/R13-R13
|
---|
| 98 | unlk R14
|
---|
| 99 | rts
|
---|
| 100 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.