fix '65535,0,0' error

git-svn-id: svn://kolibrios.org@946 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Alexey Teplov ( 2008-12-06 23:03:47 +00:00
parent 34c30dea68
commit a06f8cc84c
2 changed files with 30 additions and 16 deletions

View File

@ -394,7 +394,6 @@ noloaderblock:
call calc_vmodes_table call calc_vmodes_table
call check_first_parm ;check and enable cursor_pos call check_first_parm ;check and enable cursor_pos
; \begin{diamond}[30.11.2005] ; \begin{diamond}[30.11.2005]
cfgmanager: cfgmanager:
; settings: ; settings:
@ -446,6 +445,7 @@ cfgmanager:
mov word [.timer], .newtimer mov word [.timer], .newtimer
mov word [.timer+2], cs mov word [.timer+2], cs
.printcfg: .printcfg:
_setcursor 9,0 _setcursor 9,0
mov si, current_cfg_msg mov si, current_cfg_msg
call print call print
@ -515,6 +515,7 @@ cfgmanager:
mov eax, [.oldtimer] mov eax, [.oldtimer]
mov [es:8*4], eax mov [es:8*4], eax
mov [.timer], eax mov [.timer], eax
_setcursor 7,0 _setcursor 7,0
mov si, space_msg mov si, space_msg
call printplain call printplain
@ -767,11 +768,12 @@ end if
jnz .waityn jnz .waityn
call putchar call putchar
mov byte [space_msg+80], 186 mov byte [space_msg+80], 186
pop eax pop eax
push cs push cs
push .cont push .cont
push eax push eax
retf retf ;call back
.loadc: .loadc:
pop eax pop eax
.cont: .cont:

View File

@ -111,6 +111,7 @@ int2strnz:
mov [es:di],al mov [es:di],al
inc di inc di
ret ret
;------------------------------------------------------- ;-------------------------------------------------------
;Write message about incorrect v_mode and write message about jmp on swith v_mode ;Write message about incorrect v_mode and write message about jmp on swith v_mode
v_mode_error: v_mode_error:
@ -246,7 +247,7 @@ calc_vmodes_table:
.lp1: mov [es:bx+6],cx ; +6 : mode number .lp1: mov [es:bx+6],cx ; +6 : mode number
movzx ax,byte [es:mi.BitsPerPixel] movzx ax,byte [es:mi.BitsPerPixel]
mov word [es:bx+8],ax ; +8 : bits per pixel 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 add si,2
@ -413,9 +414,17 @@ check_first_parm:
mov ax,modes_table mov ax,modes_table
@@: @@:
mov word[home_cursor],ax mov word [home_cursor],ax
push word [preboot_graph] mov si,[preboot_graph]
pop word [cursor_pos] 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 ret
;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
.loops: .loops:
@ -432,7 +441,9 @@ check_first_parm:
je .exit je .exit
jmp .loops jmp .loops
.ok: xor ax,ax .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 mov bp,long_v_table ;show rows
.@@_next_bit: .@@_next_bit:
;clear cursor ;clear cursor
mov word[ds:_r1+21],' ' mov ax,' '
mov word[ds:_r1+50],' ' mov word[ds:_r1+21],ax
mov word[ds:_r1+50],ax
mov word[ds:_r2+21],' ' mov word[ds:_r2+21],ax
mov word[ds:_r2+45],' ' mov word[ds:_r2+45],ax
mov word[ds:_rs+21],' ' mov word[ds:_rs+21],ax
mov word[ds:_rs+46],' ' mov word[ds:_rs+46],ax
; draw string ; draw string
cmp word [es:si+6],0x12 cmp word [es:si+6],0x12
je .show_0x12 je .show_0x12
@ -646,10 +658,10 @@ clear_vmodes_table:
mov cx,70 mov cx,70
mov bp,12 mov bp,12
.loop_start: .loop_start:
rep stosw ;®ç¨á⪠ ®¡« á⨠íªà ­  rep stosw
mov cx,70 mov cx,70
add di,20 add di,20
dec bp ;㬥­ì襭¨¥ bp, ¢ bp áç¥â稪 dec bp
jns .loop_start jns .loop_start
pop es pop es
popa popa