fix aligment
This commit is contained in:
parent
d6613ac341
commit
564a6b88c1
@ -1,5 +1,7 @@
|
||||
%include "symbols.asm"
|
||||
|
||||
|
||||
|
||||
section .bss
|
||||
extern gameboard_ptr
|
||||
|
||||
@ -18,9 +20,10 @@ section .rodata
|
||||
|
||||
home_cursor: db ESC_CHAR, "[H", 0
|
||||
|
||||
statusbar: db ESC_CHAR, "[100m", "Use arrow keys to move cursor, enter to invert cell h/j to change simulation speed, p to simulation", 0
|
||||
statusbar: db ESC_CHAR, "[30;100m", "Use arrow keys to move cursor, enter to invert cell h/j to change simulation speed, p to simulation", 0
|
||||
START_STOP_pos: equ $-statusbar-16
|
||||
|
||||
|
||||
start_str: db "START", 0
|
||||
stop_str: db "STOP ", 0
|
||||
|
||||
@ -40,6 +43,7 @@ init_gameboard:
|
||||
mov rsi, 0x20; set rsi to SPACE character
|
||||
mov rdx, [gameboard_size]
|
||||
push rdx
|
||||
add rdx, ESC_chars_compensation_Len+2; I dont know how this work but it works so i wont touch it
|
||||
call memory_set
|
||||
|
||||
|
||||
@ -47,11 +51,13 @@ init_gameboard:
|
||||
pop rdi
|
||||
add rdi, rdx; get pointer to last char on screen
|
||||
push rdi
|
||||
inc rdi; so there is not empty chagacter at the end of screen
|
||||
add rdi, 9; I dont know how this work but it works so i wont touch it
|
||||
push rdi
|
||||
lea rsi, [reset]
|
||||
|
||||
call string_copy
|
||||
|
||||
pop rax
|
||||
mov byte [rax+resetLen], 0; I dont know how this work but it works so i wont touch it
|
||||
|
||||
pop rdi
|
||||
xor rax, rax
|
||||
|
@ -67,6 +67,7 @@ _start:
|
||||
inc rdi; addition byte for NULL BYTE
|
||||
lea rax, [resetLen]
|
||||
add rdi, rax
|
||||
add rdi, ESC_chars_compensation_Len
|
||||
call alloc
|
||||
mov [gameboard_ptr], rax; stores pointer to gameboard array
|
||||
call init_gameboard
|
||||
|
@ -8,3 +8,5 @@ TIOCGWINSZ equ 0x5413
|
||||
|
||||
ASCII_ZERO equ 48
|
||||
ESC_CHAR equ 27
|
||||
|
||||
ESC_chars_compensation_Len equ 13; i have to compensate for escape sequences that dont get printed why 11 exactly, I dont know
|
||||
|
Loading…
x
Reference in New Issue
Block a user