-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.asm
50 lines (40 loc) · 1.1 KB
/
main.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
INCLUDE Irvine32.inc
INCLUDE Macros.inc
INCLUDELIB user32.lib
AXIS STRUCT
x BYTE 0
y BYTE 0
AXIS ENDS
VK_LEFT EQU 000000025h
VK_UP EQU 000000026h
VK_RIGHT EQU 000000027h
VK_DOWN EQU 000000028h
VK_ESCAPE EQU 00000001bh
maxCol EQU 79
maxRow EQU 20
wallTop EQU " "
wallLeft EQU ' '
maxSnakeSize EQU 255
GetKeyState PROTO, nVirtKey:DWORD
.data
SnakeSpeed DWORD 75
playerName BYTE 13+1 DUP (?)
col BYTE 40
row BYTE 10
SnakeBody AXIS maxSnakeSize DUP(<0,0>)
headIndex BYTE 3
tailIndex BYTE 0
tmp DWORD 0
score DWORD 0
tChar BYTE 0
FoodLoc AXIS <0,0>
LEFT BYTE 0
RIGHT BYTE 1 ; Move snake to right on startup
UP BYTE 0
DOWN BYTE 0
.code
include procedures.inc
main PROC
call StartGame
main endp
END main