summary refs log tree commit diff stats
path: root/src/main.asm
diff options
context:
space:
mode:
authorArne <78976058+4rneee@users.noreply.github.com>2024-11-23 18:27:38 +0100
committerGitHub <noreply@github.com>2024-11-23 18:27:38 +0100
commit5100ff9dd79f0131064de0a5f2e777e7cd485ea5 (patch)
treec736cb11e93d83a89835a96e02f4b8995281d14c /src/main.asm
parent6b2c676369a61a405cb22c855f08e558c7580cbd (diff)
downloadx86_64-Snake-5100ff9dd79f0131064de0a5f2e777e7cd485ea5.tar.gz
x86_64-Snake-5100ff9dd79f0131064de0a5f2e777e7cd485ea5.zip
set/restore terminal options in code (#1)
Diffstat (limited to 'src/main.asm')
-rw-r--r--src/main.asm4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.asm b/src/main.asm
index 0464364..ff509ed 100644
--- a/src/main.asm
+++ b/src/main.asm
@@ -43,6 +43,8 @@ section .text
     extern hide_cursor
     extern show_cursor
     extern read_input
+    extern set_terminal_options
+    extern restore_terminal_options
     global _start 
     global exit
 
@@ -226,6 +228,7 @@ _loop_return:
     ret
 
 _start:
+    call set_terminal_options
     call clear_screen
     call draw_border
     call hide_cursor
@@ -278,6 +281,7 @@ game_over:
 exit: ; exit syscall with return code 0
     call show_cursor
     call clear_screen
+    call restore_terminal_options
     mov rax, 60                     
     xor rdi, rdi                    
     syscall