@@ -94,17 +94,15 @@ _start:
mov [srow], al
mov al, [sz+2]
mov [scol], al
- call print
- jmp exit
;calc offset
;top
mov ax, [srow]
- sub ax, [gh]
+ sub ax, [gh] ;rows - geameheight
mov cl, [0x2]
div cl
mov [tof], al
-
+;
;left
mov ax, [scol]
sub ax, [gw]
@@ -115,7 +113,22 @@ _start:
;print terminal
print:
+emptyterminal:
+ mov eax, SYS_WRITE
+ mov ebx, STDOUT
+ mov ecx, lb
+ mov edx, 1
+ ;int 0x80
+
+ inc byte [rcount]
+ mov al, [rcount]
+ ;cmp [srow], al
+ cmp al, [srow]
+ jl emptyterminal
topoffset:
+ mov [rcount], byte 0x0
mov eax, SYS_WRITE
mov ebx, STDOUT
mov ecx, lb