Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaIvanovV committed Feb 2, 2022
1 parent a204d29 commit feb357e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 6 additions & 7 deletions snake.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

%define MAIN _start

%define MOVE_EVERY_TICK 2
%define SIZE_X 21
%define SIZE_Y 21
%define MOVE_EVERY_TICK 2
%define SIZE_X 21
%define SIZE_Y 21
%define EATEN_APPLES_INIT 3
%define UPD_DEL_SEC 0
%define UPD_DEL_NANO 50000000
%define UPD_DEL_SEC 0
%define UPD_DEL_NANO 50000000

%assign SIZE_N SIZE_X*SIZE_Y
%assign SNAKE_X_INIT SIZE_X/2
Expand Down Expand Up @@ -194,7 +194,7 @@ handle_key:
pop rax
ret

; warning: does not preserve registers!
; WARNING: does not preserve registers!
%macro PRINT_BUF_APPEND 1
mov rax, print_buf
add rax, [print_buf_len]
Expand Down Expand Up @@ -490,7 +490,6 @@ update:

ret

; populates stack with free cells
get_free_cells:
push rax
push rcx
Expand Down
1 change: 1 addition & 0 deletions term.asm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ set_canon:
push rax
push rbx

; restore from saved termios struct
mov rax, stty
mov rbx, TCPUTS
call term_attr
Expand Down

0 comments on commit feb357e

Please sign in to comment.