|
|
@@ -13,6 +13,8 @@ section .bss
|
|
|
srow resb 1;
|
|
|
scol resb 1;
|
|
|
|
|
|
+ tmp resb 4
|
|
|
+
|
|
|
section .data
|
|
|
;num to ascii variables
|
|
|
ha db 0 ;hundreds
|
|
|
@@ -97,12 +99,16 @@ _start:
|
|
|
|
|
|
;calc offset
|
|
|
;top
|
|
|
+ xor eax, eax
|
|
|
+ xor bl, bl
|
|
|
mov ax, [srow]
|
|
|
- sub ax, [gh] ;rows - geameheight
|
|
|
- mov cl, [0x2]
|
|
|
- div cl
|
|
|
- mov [tof], al
|
|
|
-;
|
|
|
+ and ax, 0x0F ; bitmask so that only srow (1byte) is inside ax (2byte) else it is scol+srow
|
|
|
+ ;sub ax, [gh] ;screenrows - geameheight
|
|
|
+ mov bl, 2
|
|
|
+ div bl
|
|
|
+ ;mov [tof], al
|
|
|
+ jmp exit
|
|
|
+
|
|
|
;left
|
|
|
mov ax, [scol]
|
|
|
sub ax, [gw]
|