-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboot.asm
executable file
·237 lines (187 loc) · 3.87 KB
/
boot.asm
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
format binary
; org 100h
org 7c00h
; под точку входа даётся всего 2 байта, поэтому единственное, что можно сделать - прыгнуть дальше
jmp start
; пустая таблица разделов
times(59) db 0ffh
; осмысленный код начинается здесь
start:
; запретить прерывания
cli
push 138fh
pop es
MOV DL,80h ;Диск (C)
read_again:
MOV DH,00 ; Сторона (головка)
MOV CH,00 ;Дорожка
MOV AH,02 ;Запрос на чтение
MOV AL,08 ; кол-во секторов
mov BX,0 ;Буфер ввода в ES:BX
MOV CL,02 ;Сектор
int 13h
jnc normal_continue
; Ошибка чтения, пробуем с дискеты
mov DL, 00h ; Дискета (A)
jmp read_again
normal_continue:
mov ax,138fh
mov ds,ax
xor ax,ax
mov gs,ax
mov word [gs:4*9],key
mov word [gs:4*9+2],138fh
sti
jmp 138fh:0000h ; 7c6b
; оставшееся место
times(7c00h+510-$) db 00h
; сигнатура загрузочной записи
db 055h,0aah
org 0h
include 'main.asm'
include 'key.asm'
include 'graphic.inc'
include 'phisTest.asm'
include 'objectsManeger.asm'
include 'playerMovie.asm'
include 'playerShoot.asm'
include 'deleteObject.asm'
include 'trace.asm'
include 'collision.asm'
include 'collisionTest.asm'
include 'min.asm'
include 'rnd.asm'
include 'skyInicialize.asm'
include 'enemyShoot.asm'
_a dw 2
_speed_shoot dw 3
_shoot_timer dw 0
_first_arrow_speed dw -10
_first_arrow_demage dw 1
_speed_limit dw 10
_sky_speed dw 8
_enemy_timer dw 0
_enemy_rate dw 40
_score dw 0
OBJ_SIGNATURE_SIZE dw 20
; keys
KEY_UP db 0
KEY_DOWN db 0
KEY_LEFT db 0
KEY_RIGHT db 0
KEY_FIRE1 db 0
KEY_ESC db 0
; end keys
objects_array dw 1,player
rb 150
sky1 dw 10,7,16 ; count,speed,size
rd 10
sky2 dw 20,4,3 ; count,speed,size
rd 20
sky3 dw 30,1,1
rd 30
model2 dw 23
dw 42,0,20,5,15
dw 42,5,15,4,-5
dw 42,4,-5,10,7
dw 42,10,7,15,-5
dw 42,15,-5,12,-10
dw 42,0,20,-5,15
dw 42,-5,15,-4,-5
dw 42,-4,-5,-10,7
dw 42,-10,7,-15,-5
dw 42,-15,-5,-12,-10
dw 42,14,-3,20,2
dw 42,20,2,19,9
dw 42,19,9,11,3
dw 42,-14,-3,-20,2
dw 42,-20,2,-19,9
dw 42,-19,9,-11,3
dw 42,12,-10,-12,-10
dw 20h,0,10,3,8
dw 20h,3,8,3,3
dw 20h,3,3,0,3
dw 20h,0,10,-3,8
dw 20h,-3,8,-3,3
dw 20h,-3,3,0,3
dw 20,15
model1 dw 19
dw 55,1,-12,-1,-12
dw 55,1,-12,5,10
dw 40,5,10,5,0
dw 40,5,0,10,-5
dw 40,10,-5,10,-15
dw 42,10,-15,15,0
dw 40,15,0,0,5
dw 55,-1,-12,-5,10
dw 40,-5,10,-5,0
dw 40,-5,0,-10,-5
dw 40,-10,-5,-10,-15
dw 42,-10,-15,-15,0
dw 40,-15,0,0,5
dw 41,6,7,11,9
dw 41,11,9,11,12
dw 41,11,12,6,10
dw 41,-6,7,-11,9
dw 41,-11,9,-11,12
dw 41,-11,12,-6,10
dw 12,10
arrow_model_1 dw 4
dw 23h,0,-2,0,1
dw 22h,0,1,0,4
dw 21h,-1,-1,-1,2
dw 21h,1,-1,1,2
dw 3,3
arrow_model_2 dw 3
dw 40,0,1,3,-2
dw 40,0,1,-3,-2
dw 42,0,0,0,-5
dw 3,1
demage_model_1 dw 21
dw 40,8,-3,4,-3
dw 40,4,-3,-2,-8
dw 40,-2,-8,-8,-4
dw 40,-8,-4,-6,-2
dw 40,-6,-2,-9,3
dw 40,-9,3,-6,6
dw 40,-6,6,-1,4
dw 40,-1,4,3,6
dw 40,3,6,6,4
dw 40,6,4,8,-3
dw 42,5,2,2,-3
dw 42,2,-3,-3,-4
dw 42,-3,-4,-7,-1
dw 42,-7,-1,-2,7
dw 42,-2,7,5,2
dw 44,0,0,10,4
dw 44,0,0,9,-5
dw 44,0,0,5,10
dw 44,0,0,4,-9
dw 44,0,0,-10,4
dw 44,0,0,-9,-5
dw 44,0,0,-5,10
dw 44,0,0,-4,-9
interface_model_1 dw 4
dw 20h,0,0,15,0
dw 20h,15,0,10,6
dw 20h,10,6,0,6
dw 20h,0,6,0,0
model_t_LOST dw 13
dw 40,-20,0,-20,10
dw 40,-20,10,-15,10
dw 40,-10,0,-10,10
dw 40,-10,10,-5,10
dw 40,-5,10,-5,0
dw 40,-5,0,-11,0
dw 40,5,0,0,0
dw 40,0,0,0,5
dw 40,0,5,5,5
dw 40,5,5,5,10
dw 40,5,10,0,10
dw 40,10,0,16,0
dw 40,13,0,13,11
player dw 150,150, 0, 0,10,model1, 0 , 0, 0, 0
; x, y, vx,vy,hp,model, flag, shT, shR, type
; type: 0-ship, 1-arrow
objects db 0
times(6608-$) db 0