source: buchla-68k/alcyon/posit.s@ 9519422

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1.globl _chantab
2.globl _Wrkbuf
3.globl _errno
4.globl _posit
5.text
6_posit:
7~~posit:
8~fd=8
9~pos=10
10link R14,#0
11movem.l R7-R7/R13-R13,-(sp)
12~fp=R13
13*line 28
14*line 28
15tst 8(R14)
16blt L10000
17cmp #11,8(R14)
18ble L2
19L10000:*line 29
20*line 30
21move #9,_errno
22*line 31
23move #-1,R0
24bra L1
25*line 32
26*line 33
27L2:
28*line 34
29move 8(R14),R0
30muls #12,R0
31add.l #_chantab,R0
32move.l R0,R8
33move.l 8(R8),R13
34*line 36
35*line 37
36move 8(R14),R0
37muls #12,R0
38add.l #_chantab,R0
39move.l R0,R8
40tst.b 3(R8)
41beq L10001
42clr R0
43move 10(R14),R0
44move #9,R1
45lsl R1,R0
46swap R0
47clr R0
48swap R0
49cmp.l 48(R13),R0
50ble L3
51L10001:*line 38
52*line 39
53move #22,_errno
54*line 40
55or #8192,32(R13)
56*line 41
57move #-1,R0
58bra L1
59*line 42
60*line 43
61L3:
62*line 44
63clr.l R0
64move 10(R14),R0
65move.l R0,40(R13)
66*line 45
67clr 38(R13)
68*line 47
69*line 47
70move.l R13,(sp)
71jsr __seek
72tst R0
73bge L4
74*line 48
75*line 49
76move #5,_errno
77*line 50
78or #8192,32(R13)
79*line 51
80move #-1,R0
81bra L1
82*line 52
83*line 53
84L4:
85*line 54
86clr R0
87bra L1
88L1:tst.l (sp)+
89movem.l (sp)+,R13-R13
90unlk R14
91rts
92.data
Note: See TracBrowser for help on using the repository browser.