-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c347f8
commit 4310e79
Showing
6 changed files
with
607 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
console_win32_snake.exe | ||
console_win32_snake.obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,41 @@ | ||
# snake | ||
Snake game, writing in Assembler works in Windows | ||
`Snake` game, writing in `Assembler` works in `Windows` | ||
|
||
![](img/preview.gif) | ||
|
||
# Dependecies | ||
* [nasm](https://www.nasm.us/) | ||
* [GoLink](http://www.godevtool.com/GolinkFrame.htm) | ||
|
||
# Start | ||
|
||
### Build game | ||
``` console | ||
> PATH_TO_NASM -f win64 console_win32_snake.asm -o console_win32_snake.obj | ||
``` | ||
|
||
### Link | ||
``` console | ||
> PATH_TO_GOLINK /entry:start /console kernel32.dll user32.dll console_win32_snake.obj | ||
``` | ||
|
||
### Or use `.bat` file in repo and change path for `nasm` and `GoLink` | ||
|
||
``` bat | ||
@echo off | ||
@REM path to NASM + some flags | ||
SET NASM=..\nasm -O3 | ||
@REM path to golink | ||
SET GOLINK=..\golink | ||
%NASM% -f win64 console_win32_snake.asm -o console_win32_snake.obj | ||
%GOLINK% /entry:start /console kernel32.dll user32.dll console_win32_snake.obj | ||
pause | ||
exit | ||
``` | ||
|
||
# Controls | ||
|
||
`→`, `←`, `↑`, `↓` - move snake. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo off | ||
|
||
@REM path to NASM + some flags | ||
SET NASM=..\nasm -O3 | ||
@REM path to golink | ||
SET GOLINK=..\golink | ||
|
||
%NASM% -f win64 console_win32_snake.asm -o console_win32_snake.obj | ||
%GOLINK% /entry:start /console kernel32.dll user32.dll console_win32_snake.obj | ||
|
||
pause | ||
exit |
Oops, something went wrong.