-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkshifts.s
executable file
·77 lines (77 loc) · 1.44 KB
/
mkshifts.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
parallax equ 0
parallay equ 0
bus equ 10
digitest equ 10
def_version equ 10
d0_for_mcp equ 0
mcp_adr equ $500
keyboard set 10
test equ 10
calc_mdist MACRO
move.w (a3)+,d6
sub.w (a4)+,d6
movem.l (a5,d6),d3-d6
ENDM
do_mdist MACRO
lea 64(a5),a5
move.b #1,$ffff8260.w
move.b #0,$ffff8260.w
movem.l d3/d4/d5,$ffff8250.w
move.b #2,$ffff8260.w
move.b #0,$ffff8260.w
move.l d6,$ffff825c.w
ENDM
calc_mdist2 MACRO
move.w (a3)+,d6
sub.w (a4)+,d6
movem.l (a5,d6),d4-d6/a2
ENDM
do_mdist2 MACRO
lea 64(a5),a5
move.b #1,$ffff8260.w
move.b #0,$ffff8260.w
movem.l d4/d5/d6,$ffff8250.w
move.b #2,$ffff8260.w
move.b #0,$ffff8260.w
move.l a2,$ffff825c.w
ENDM
calc_mdist02 MACRO
move.w (a3)+,d6
sub.w (a4)+,d6
movem.l (a5,d6),d2/d4-d6
ENDM
do_mdist02 MACRO
lea 64(a5),a5
move.b #1,$ffff8260.w
move.b #0,$ffff8260.w
movem.l d2/d4/d5,$ffff8250.w
move.b #2,$ffff8260.w
move.b #0,$ffff8260.w
move.l d6,$ffff825c.w
ENDM
digi1 MACRO
moveq #-1,d6 ;~1
move.b (a6),d6 ;~2
add.w d6,d6 ;~1
add.w (a7,d6),d7 ;~4
andi.w #$ff*4,d7 ;~2
move.l (a7,d7),d6
movep.l d6,$ffff8800-512-downthere(a7) ;~7
ENDM
digi2 MACRO
moveq #-1,d6 ;~1
move.b (a6)+,d6 ;~2
add.w d6,d6 ;~1
add.w 2(a7,d6),d7 ;~4
andi.w #$ff*4,d7 ;~2
move.l (a7,d7),d6 ;~5
movep.l d6,$ffff8800-512-downthere(a7) ;~7
ENDM
d_0 equr d0
d_1 equr d1
d_2 equr d2
d_3 equr d3
a_1 equr a1
downthere equ $600
x:
y: