- call _scroll_up\r
-\r
- .mv_curs:\r
- push ax\r
- push bx\r
-\r
- xor ax, ax\r
- mov al, [screen_rows] ; mov bx, 80*24\r
- mov bl, [screen_cols]\r
- dec al\r
- mul bl\r
- mov bx, ax\r
- call setcursor\r
-\r
- pop bx\r
- pop ax\r
- ret\r
-\r
- _scroll_up:\r
- push eax\r
- push ecx\r
- push edi\r
- push esi\r
-\r
- mov edi, 0xB8000\r
- movzx esi, [screen_cols]\r
- shl esi, 1 ; 80*2 = 160\r
- mov cl, [screen_rows]\r
- dec cl\r
- mov eax, esi\r
- mul cl\r
- shr ax, 2 ; ax = (160*24)/4\r
- movzx ecx, ax ; ecx = - || -\r
- add esi, 0xB8000 ; esi = 0xB8000+160\r
-\r
- rep movsd\r
-\r
- mov cl, [screen_cols]\r
- shl cl, 1 ; 80*2 = 160\r
- mov al, [screen_rows]\r
- dec al ; al = 24\r
- mul cl\r
- movzx edi, ax\r
- add edi, 0xB8000 ; edi = 0xB8000+160*24\r
- movzx ecx, [screen_cols]\r
- shr ecx, 1 ; 80/2\r
- mov eax, 0x07000700 ; fill with zeros\r
- rep stosd\r
-\r
- pop esi\r
- pop edi\r
- pop ecx\r
- pop eax\r
- ret
\ No newline at end of file
+ call _scroll_up\r
+\r
+ .mv_curs:\r
+ push ax\r
+ push bx\r
+\r
+ xor ax, ax\r
+ mov al, [screen_rows] ; mov bx, 80*24\r
+ mov bl, [screen_cols]\r
+ dec al\r
+ mul bl\r
+ mov bx, ax\r
+ call setcursor\r
+\r
+ pop bx\r
+ pop ax\r
+ ret\r
+\r
+ _scroll_up:\r
+ push eax\r
+ push ecx\r
+ push edi\r
+ push esi\r
+\r
+ mov edi, 0xB8000\r
+ movzx esi, [screen_cols]\r
+ shl esi, 1 ; 80*2 = 160\r
+ mov cl, [screen_rows]\r
+ dec cl\r
+ mov eax, esi\r
+ mul cl\r
+ shr ax, 2 ; ax = (160*24)/4\r
+ movzx ecx, ax ; ecx = - || -\r
+ add esi, 0xB8000 ; esi = 0xB8000+160\r
+\r
+ rep movsd\r
+\r
+ mov cl, [screen_cols]\r
+ shl cl, 1 ; 80*2 = 160\r
+ mov al, [screen_rows]\r
+ dec al ; al = 24\r
+ mul cl\r
+ movzx edi, ax\r
+ add edi, 0xB8000 ; edi = 0xB8000+160*24\r
+ movzx ecx, [screen_cols]\r
+ shr ecx, 1 ; 80/2\r
+ mov eax, 0x07000700 ; fill with zeros\r
+ rep stosd\r
+\r
+ pop esi\r
+ pop edi\r
+ pop ecx\r
+ pop eax\r
+ ret
\ No newline at end of file