From a06f8cc84c553a501d9337fc9229034ab3d3c8ec Mon Sep 17 00:00:00 2001 From: "Alexey Teplov (" Date: Sat, 6 Dec 2008 23:03:47 +0000 Subject: [PATCH] fix '65535,0,0' error git-svn-id: svn://kolibrios.org@946 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/boot/bootcode.inc | 6 +++-- kernel/trunk/boot/bootvesa.inc | 40 ++++++++++++++++++++++------------ 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/kernel/trunk/boot/bootcode.inc b/kernel/trunk/boot/bootcode.inc index 37363eb089..21ce6e483c 100644 --- a/kernel/trunk/boot/bootcode.inc +++ b/kernel/trunk/boot/bootcode.inc @@ -394,7 +394,6 @@ noloaderblock: call calc_vmodes_table call check_first_parm ;check and enable cursor_pos - ; \begin{diamond}[30.11.2005] cfgmanager: ; settings: @@ -446,6 +445,7 @@ cfgmanager: mov word [.timer], .newtimer mov word [.timer+2], cs .printcfg: + _setcursor 9,0 mov si, current_cfg_msg call print @@ -515,6 +515,7 @@ cfgmanager: mov eax, [.oldtimer] mov [es:8*4], eax mov [.timer], eax + _setcursor 7,0 mov si, space_msg call printplain @@ -767,11 +768,12 @@ end if jnz .waityn call putchar mov byte [space_msg+80], 186 + pop eax push cs push .cont push eax - retf + retf ;call back .loadc: pop eax .cont: diff --git a/kernel/trunk/boot/bootvesa.inc b/kernel/trunk/boot/bootvesa.inc index 8d36627d4f..9d4b638e12 100644 --- a/kernel/trunk/boot/bootvesa.inc +++ b/kernel/trunk/boot/bootvesa.inc @@ -111,6 +111,7 @@ int2strnz: mov [es:di],al inc di ret + ;------------------------------------------------------- ;Write message about incorrect v_mode and write message about jmp on swith v_mode v_mode_error: @@ -246,7 +247,7 @@ calc_vmodes_table: .lp1: mov [es:bx+6],cx ; +6 : mode number movzx ax,byte [es:mi.BitsPerPixel] mov word [es:bx+8],ax ; +8 : bits per pixel - add bx,size_of_step + add bx,size_of_step ; size of record @@: add si,2 @@ -413,9 +414,17 @@ check_first_parm: mov ax,modes_table @@: - mov word[home_cursor],ax - push word [preboot_graph] - pop word [cursor_pos] + mov word [home_cursor],ax + mov si,[preboot_graph] + mov word [cursor_pos],si + + push word [es:si] + pop word [x_save] + push word [es:si+2] + pop word [y_save] + push word [es:si+6] + pop word [number_vm] + ret ;;;;;;;;;;;;;;;;;;;;;;;;;;; .loops: @@ -432,7 +441,9 @@ check_first_parm: je .exit jmp .loops .ok: xor ax,ax -.exit: ret + ret +.exit: or ax,-1 + ret ;----------------------------------------------------------------------------- @@ -531,14 +542,15 @@ draw_vmodes_table: mov bp,long_v_table ;show rows .@@_next_bit: ;clear cursor - mov word[ds:_r1+21],' ' - mov word[ds:_r1+50],' ' + mov ax,' ' + mov word[ds:_r1+21],ax + mov word[ds:_r1+50],ax - mov word[ds:_r2+21],' ' - mov word[ds:_r2+45],' ' + mov word[ds:_r2+21],ax + mov word[ds:_r2+45],ax - mov word[ds:_rs+21],' ' - mov word[ds:_rs+46],' ' + mov word[ds:_rs+21],ax + mov word[ds:_rs+46],ax ; draw string cmp word [es:si+6],0x12 je .show_0x12 @@ -646,11 +658,11 @@ clear_vmodes_table: mov cx,70 mov bp,12 .loop_start: - rep stosw ;очистка области экрана + rep stosw mov cx,70 add di,20 - dec bp ;уменьшение bp, в bp счетчик - jns .loop_start + dec bp + jns .loop_start pop es popa ret