From 11c594dc6ed18e1903c7d69ed5b0bcb3afe9baa1 Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Mon, 11 Feb 2008 11:46:18 +0000 Subject: [PATCH] Fixed constants replaced with correctable definitions (thanks to ) git-svn-id: svn://kolibrios.org@731 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/boot/bootcode.inc | 10 +++++----- kernel/trunk/boot/bootvesa.inc | 15 ++++++++------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/kernel/trunk/boot/bootcode.inc b/kernel/trunk/boot/bootcode.inc index 5a7b50ad0b..f5f7791410 100644 --- a/kernel/trunk/boot/bootcode.inc +++ b/kernel/trunk/boot/bootcode.inc @@ -542,14 +542,14 @@ cfgmanager: .pgup: cmp ah,0x49 ; page up jne .pgdn - sub si, size_of_step*9 + sub si, size_of_step*long_v_table cmp si, modes_table jae @f mov si, modes_table @@: mov word [cursor_pos], si mov si, word [home_cursor] - sub si, size_of_step*9 + sub si, size_of_step*long_v_table cmp si, modes_table jae @f mov si, modes_table @@ -560,7 +560,7 @@ cfgmanager: .pgdn: cmp ah,0x51 ; page down jne .enter mov ax, [end_cursor] - add si, size_of_step*9 + add si, size_of_step*long_v_table cmp si, ax jb @f mov si, ax @@ -568,8 +568,8 @@ cfgmanager: @@: mov word [cursor_pos], si mov si, word [home_cursor] - sub ax, size_of_step*9 - add si, size_of_step*9 + sub ax, size_of_step*long_v_table + add si, size_of_step*long_v_table cmp si, ax jb @f mov si, ax diff --git a/kernel/trunk/boot/bootvesa.inc b/kernel/trunk/boot/bootvesa.inc index 79a08c155b..d800261188 100644 --- a/kernel/trunk/boot/bootvesa.inc +++ b/kernel/trunk/boot/bootvesa.inc @@ -74,7 +74,8 @@ cursor_pos dw 0 ; home_cursor dw 0 ;current shows rows a table end_cursor dw 0 ;end of position current shows rows a table long_v_table equ 9 ;long of visible video table -size_of_step equ 10 +size_of_step equ 10 +scroll_area_size equ (long_v_table-2) int2str: dec bl jz @f @@ -523,7 +524,7 @@ draw_vmodes_table: stosb add di, 80*2-1 mov al, 32 - mov cx, 7 + mov cx, scroll_area_size @@: stosb add di, 80*2-1 @@ -542,24 +543,24 @@ draw_vmodes_table: cwd div bx mov di, ax - mov ax, 7*9 + mov ax, scroll_area_size*long_v_table cwd div si test ax, ax jnz @f inc ax @@: - cmp al, 7 + cmp al, scroll_area_size jb @f - mov al, 7 + mov al, scroll_area_size @@: mov cx, ax ; cx = scroll height ; calculate scroll pos xor bx, bx ; initialize scroll pos - sub al, 7+1 + sub al, scroll_area_size+1 neg al - sub si, 9-1 + sub si, long_v_table-1 jbe .draw_scroll mul di div si