fixed board to work with 4096 Kb buffer (thanks to diamond), small optimizations and fixes

git-svn-id: svn://kolibrios.org@447 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
heavyiron 2007-04-02 12:44:47 +00:00
parent 1cf4d04ae9
commit 92829c00bb

View File

@ -36,11 +36,11 @@ START: ; start of execution
mcall 60,1,ipcbuff,IPC_BUF+20 mcall 60,1,ipcbuff,IPC_BUF+20
mcall 40,1000111b mcall 40,1000111b
mov [ipcbuff+4],8 mov [ipcbuff+4],8
mov ecx,1024 mov ecx,4096
flush: flush:
mov eax,63 mov eax,63
mov ebx,2 mov ebx,2
int 0x40 mcall
loop flush loop flush
mov ecx, TMP mov ecx, TMP
@ -52,11 +52,18 @@ START: ; start of execution
mov [tmp2],'x' mov [tmp2],'x'
mov eax,14 mov eax,14
int 0x40 mcall
and eax,0xffff0000 and eax,0xffff0000
sub eax,399 shl 16 sub eax,399 shl 16
add eax,399 add eax,399
mov [xstart],eax mov [xstart],eax
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
mcall
red: red:
call draw_window call draw_window
@ -64,7 +71,7 @@ still:
mov eax,23 ; wait here for event mov eax,23 ; wait here for event
mov ebx,1 mov ebx,1
int 0x40 mcall
cmp eax,1 ; redraw request ? cmp eax,1 ; redraw request ?
je red je red
@ -74,9 +81,10 @@ still:
je button je button
cmp eax,7 cmp eax,7
je ipc je ipc
mov eax,63 mov eax,63
mov ebx,2 mov ebx,2
int 0x40 mcall
cmp ebx,1 cmp ebx,1
jne still jne still
@ -141,7 +149,7 @@ still:
mov eax,63 mov eax,63
mov ebx,2 mov ebx,2
int 0x40 mcall
cmp ebx,1 cmp ebx,1
je new_data je new_data
@ -176,8 +184,8 @@ still:
rep movsb rep movsb
jmp red jmp red
key: ; key key: ; key
mov eax,2 ; just read it and ignore mov al,2 ; just read it and ignore
int 0x40 mcall
cmp ah,' ' cmp ah,' '
je button.no_krnl_flt je button.no_krnl_flt
cmp [vmode],2 cmp [vmode],2
@ -199,14 +207,14 @@ still:
arrows dd -1,16,-16,1 arrows dd -1,16,-16,1
button: ; button button: ; button
mov eax,17 ; get id mov al,17 ; get id
int 0x40 mcall
cmp ah,1 ; button id=1 ? cmp ah,1 ; button id=1 ?
jne .noclose jne .noclose
mov eax,-1 ; close this program or eax,-1 ; close this program
int 0x40 mcall
.noclose: .noclose:
shr eax,8 shr eax,8
cmp eax,10 cmp eax,10
@ -274,34 +282,28 @@ add_char:
draw_window: draw_window:
mov eax,48
mov ebx,3
mov ecx,sc
mov edx,sizeof.system_colors
int 0x40
mov eax,12 ; function 12:tell os about windowdraw mov eax,12 ; function 12:tell os about windowdraw
mov ebx,1 ; 1, start of draw mov ebx,1 ; 1, start of draw
int 0x40 mcall
; DRAW WINDOW ; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window xor eax,eax ; function 0 : define and draw window
; mov ebx,50*65536+400 ; [x start] *65536 + [x size] ; mov ebx,50*65536+400 ; [x start] *65536 + [x size]
mov ebx,[xstart] mov ebx,[xstart]
mov ecx,MAXSTRINGS*10+45 ; [y start] *65536 + [y size] mov ecx,MAXSTRINGS*10+45 ; [y start] *65536 + [y size]
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
or edx,0x13000000 or edx,0x13000000
mov edi,header ; WINDOW LABEL mov edi,header ; WINDOW LABEL
int 0x40 mcall
mov ecx,4 mov ecx,4
mov esi,[sc.work] mov esi,[sc.work]
mov ebx,316 shl 16+5*6 mov ebx,296 shl 16+5*6
mov edx,3;+1 shl 30 mov edx,3;+1 shl 30
mcall 8,,<5,12> mcall 8,,<5,12>
mov edx,[vmode] mov edx,[vmode]
lea edx,[edx*4+duk] lea edx,[edx*4+duk]
mcall 4,<320,8>,,,4 mcall 4,<300,8>,,,4
cmp [vmode],2 cmp [vmode],2
je no_mdbg je no_mdbg
@ -313,9 +315,9 @@ draw_window:
mov edx,text2 mov edx,text2
.kern: .kern:
mov esi,80 mov esi,80
newline:
mov eax,4 mov eax,4
int 0x40 newline:
mcall
add ebx,10 add ebx,10
add edx,80 add edx,80
cmp [edx],byte 'x' cmp [edx],byte 'x'
@ -334,7 +336,7 @@ draw_window:
enddraw: enddraw:
mov eax,12 ; function 12:tell os about windowdraw mov eax,12 ; function 12:tell os about windowdraw
mov ebx,2 ; 2, end of draw mov ebx,2 ; 2, end of draw
int 0x40 mcall
ret ret
@ -514,11 +516,11 @@ dump_cell_size dw HSPACE,VSPACE,6,VSPACE
; 11,11 > 0,-1 ; 11,11 > 0,-1
; 5,11 > 0,-1 ; 5,11 > 0,-1
if lang eq ru if lang eq ru
header db '„Ž‘Š€ Ž’‹€„Šˆ ˆ ŽŽ<C5BD>™…<E284A2>ˆ',0 header db '„®áª  ®â« ¤ª¨ ¨ á®®¡é¥­¨©',0
else if lang eq en else if lang eq en
header db 'GENERAL DEBUG & MESSAGE BOARD',0 header db 'General debug & message board',0
else else
header db 'ALLGEMEINES DEBUG- & NACHRICHTENBOARD',0 header db 'Allgemeines debug- & nachrichtenboard',0
end if end if
krnl_cnt dd 0 krnl_cnt dd 0
vmode dd 0 vmode dd 0