/
scant.basm
87 lines (75 loc) · 1.43 KB
/
scant.basm
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
RAM: 0
DEVICE: 1 3 0
DEVICE: 2 3 0
DEVICE: 3 4 0
DEVICE: 6 4 0
DEVICE: 4 2 0
DEVICE: 4 1 0
DEVICE: 7 4 0
DEVICE: 7 4 0
DEVICE: 15 2 0
DEVICE: 5 4 0
DEVICE: 16 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
DEVICE: 0 0 0
;set the scanner
out 40,1 ; activate claoker
out 32,1 ; activate chiller
out 13,512 ;to allaround-scanning
out 15,2 ;to scanlevel 2
out 4,100 ;100% speed
mov bx,512
mov cx,0
:mainloop
out 12,1 ;scanimpulse
in ax,13 ; were is the devil?
cmp ax,2 ; see what offset is
jz shoot ; if ax == 2
ja move_left ; if ax == 3 || ax == 4
jb move_right ; if ax == 0 || ax == 1
:move_left
out 10,20
mov cx,0
jmp smaller
:move_right
out 10,-20
mov cx,0
jmp smaller
:shoot
out 16,1 ;shoot
out 20,1 ;shoot 2
jmp smaller
:smaller
cmp bx,37
jbe end
sub bx,25 ;decrease scan radius
jmp end
:end
out 13,bx
add cx,1
cmp cx,10
jae reset
jmp mainloop
:reset
mov bx,512
mov cx,0
jmp mainloop