1: | /* Copyright (c) 1982, Regents, University of California */
2: |
3: | $: emul.s,v 1.2 83/11/26 12:13:45 sklower Exp $
4: | $Locker: $
5: |
6: .text
7: .globl _emul
8: _emul:
9: link a6,#-_F1
10: moveml #_S1,a6@(-_F1)
11: movl a6@(20),a5
12: | A1 = 24
13: clrb a6@(-9)
14: clrb a6@(-13)
15: clrl d7
16: tstl a6@(8)
17: bge .L13
18: eorb #1,a6@(-9)
19: negl a6@(8)
20: .L13:
21: tstl a6@(12)
22: bge .L14
23: eorb #1,a6@(-9)
24: negl a6@(12)
25: .L14:
26: movw a6@(10),d1
27: mulu a6@(14),d1
28: movl d1,a6@(-4)
29: movw a6@(8),d1
30: mulu a6@(12),d1
31: movl d1,a6@(-8)
32: movw a6@(8),d1
33: mulu a6@(14),d1
34: addl d1,a6@(-6)
35: bcc .L16
36: addqw #1,a6@(-8)
37: .L16:
38: movw a6@(10),d1
39: mulu a6@(12),d1
40: addl d1,a6@(-6)
41: bcc .L17
42: addqw #1,a6@(-8)
43: .L17:
44: tstb a6@(-9)
45: beq .L18
46: negl a6@(-4)
47: negxl a6@(-8)
48: .L18:
49: tstl a6@(16)
50: bge .L20
51: moveq #-1,d7
52: .L20:
53: movl a6@(-8),d1
54: movl a6@(16),d0
55: addl a6@(-4),d0
56: addxl d1,d7
57: movl d0,a5@(4)
58: movl d7,a5@
59: .L12: moveml a6@(-_F1),#8320
60: unlk a6
61: rts
62: _F1 = 24
63: _S1 = 8320
64: | M1 = 0