-
Notifications
You must be signed in to change notification settings - Fork 1
/
si.s
116 lines (109 loc) · 2.46 KB
/
si.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
xref fst68knode,map68knode,nxt68knode,ins68ksize
;
; Nolist attend dans D4 la valeur de sortie
;
ISearch_nosize:
lea fst68knode,a1
lea map68knode,a2
lea nxt68knode,a3
move.w (a0)+,d1
add.w (a1),d1
tst.w 0(a2,d1.w)
bne.s .nf
move.w 0(a3,d1.w),d2
; ble.s .dosize ;len>=2
.l1:
REPT 3
move.w (a0)+,d1
add.w 0(a1,d2.w),d1
cmp.w 0(a2,d1.w),d2
bne.s .nf
move.w 0(a3,d1.w),d2
ble.s .dosize
ENDR
move.w (a0)+,d1
add.w 0(a1,d2.w),d1
cmp.w 0(a2,d1.w),d2
bne.s .nf
move.w 0(a3,d1.w),d2
bgt.s .l1
.dosize: move.w #-1,OpSize
neg.w d2
move d2,d4
rts
.nf: moveq #-1,d2
rts
ISearch:
lea fst68knode,a1
lea map68knode,a2
lea nxt68knode,a3
move.w (a0)+,d1
add.w (a1),d1
tst.w 0(a2,d1.w)
bne.s .nf
move.w 0(a3,d1.w),d2
; ble.s .dosize ;len>=2
.l1:
REPT 3
move.w (a0)+,d1
add.w 0(a1,d2.w),d1
cmp.w 0(a2,d1.w),d2
bne.s .nf
move.w 0(a3,d1.w),d2
ble.s .dosize
ENDR
move.w (a0)+,d1
add.w 0(a1,d2.w),d1
cmp.w 0(a2,d1.w),d2
bne.s .nf
move.w 0(a3,d1.w),d2
bgt.s .l1
.dosize: move.b tab_car(pc,d0.w),d3
lea ins68ksize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