Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
mov-rax-rbx committed Jan 8, 2021
1 parent 0c347f8 commit 4310e79
Show file tree
Hide file tree
Showing 6 changed files with 607 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
console_win32_snake.exe
console_win32_snake.obj
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 mov-rax-rbx
Copyright (c) 2021 Kirill Kharchenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
41 changes: 40 additions & 1 deletion README.md
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.
12 changes: 12 additions & 0 deletions compile_link.bat
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
Loading

0 comments on commit 4310e79

Please sign in to comment.