File subsystem: fixed function 70.0 for CD

Window subsystem: now minimized windows are not activated when program terminates
@RB: now it ignores minimized windows
CMD: version from K0600 distro (modified to use fn 70.7 instead of 19) +
     redraw does not change window border


git-svn-id: svn://kolibrios.org@154 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2006-09-19 13:16:31 +00:00
parent 2665e9eebc
commit 7f1f402a78
6 changed files with 95 additions and 129 deletions

View File

@ -139,7 +139,7 @@ fs_CdRead:
test ecx, ecx test ecx, ecx
jz .done jz .done
sub ebx, 2048 sub ebx, 2048
jae .new_sector jae .next
add ebx, 2048 add ebx, 2048
jnz .incomplete_sector jnz .incomplete_sector
cmp ecx, 2048 cmp ecx, 2048
@ -149,9 +149,10 @@ fs_CdRead:
call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà
cmp [DevErrorCode],0 cmp [DevErrorCode],0
jne .noaccess_3 jne .noaccess_3
inc dword [CDSectorAddress]
add edx, 2048 add edx, 2048
sub ecx, 2048 sub ecx, 2048
.next:
inc dword [CDSectorAddress]
jmp .new_sector jmp .new_sector
.incomplete_sector: .incomplete_sector:
; we must read and memmove incomplete sector ; we must read and memmove incomplete sector
@ -159,9 +160,6 @@ fs_CdRead:
call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà
cmp [DevErrorCode],0 cmp [DevErrorCode],0
jne .noaccess_3 jne .noaccess_3
inc dword [CDSectorAddress]
mov eax,CDDataBuf
add eax, ebx
push ecx push ecx
add ecx, ebx add ecx, ebx
cmp ecx, 2048 cmp ecx, 2048
@ -171,7 +169,7 @@ fs_CdRead:
sub ecx, ebx sub ecx, ebx
push edi esi ecx push edi esi ecx
mov edi,edx mov edi,edx
mov esi,eax ;0x7000 ; CD data buffer lea esi, [CDDataBuf + ebx]
cld cld
rep movsb rep movsb
pop ecx esi edi pop ecx esi edi
@ -179,7 +177,7 @@ fs_CdRead:
sub [esp], ecx sub [esp], ecx
pop ecx pop ecx
xor ebx, ebx xor ebx, ebx
jmp .new_sector jmp .next
.done: .done:
mov ebx, edx mov ebx, edx

View File

@ -861,6 +861,11 @@ terminate: ; terminate application
cmp [0x3000 + edi + TASKDATA.state], byte 9 ; skip dead slots cmp [0x3000 + edi + TASKDATA.state], byte 9 ; skip dead slots
je .check_next_window je .check_next_window
add edi, window_data add edi, window_data
; \begin{diamond}[19.09.2006]
; skip minimized windows
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
jnz .check_next_window
; \end{diamond}
call waredraw call waredraw
.nothing_to_activate: .nothing_to_activate:
popad popad

View File

@ -139,7 +139,7 @@ fs_CdRead:
test ecx, ecx test ecx, ecx
jz .done jz .done
sub ebx, 2048 sub ebx, 2048
jae .new_sector jae .next
add ebx, 2048 add ebx, 2048
jnz .incomplete_sector jnz .incomplete_sector
cmp ecx, 2048 cmp ecx, 2048
@ -149,9 +149,10 @@ fs_CdRead:
call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà
cmp [DevErrorCode],0 cmp [DevErrorCode],0
jne .noaccess_3 jne .noaccess_3
inc dword [CDSectorAddress]
add edx, 2048 add edx, 2048
sub ecx, 2048 sub ecx, 2048
.next:
inc dword [CDSectorAddress]
jmp .new_sector jmp .new_sector
.incomplete_sector: .incomplete_sector:
; we must read and memmove incomplete sector ; we must read and memmove incomplete sector
@ -159,9 +160,6 @@ fs_CdRead:
call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà call ReadCDWRetr ; ÷èòàåì ñåêòîð ôàéëà
cmp [DevErrorCode],0 cmp [DevErrorCode],0
jne .noaccess_3 jne .noaccess_3
inc dword [CDSectorAddress]
mov eax,CDDataBuf
add eax, ebx
push ecx push ecx
add ecx, ebx add ecx, ebx
cmp ecx, 2048 cmp ecx, 2048
@ -171,7 +169,7 @@ fs_CdRead:
sub ecx, ebx sub ecx, ebx
push edi esi ecx push edi esi ecx
mov edi,edx mov edi,edx
mov esi,eax ;0x7000 ; CD data buffer lea esi, [CDDataBuf + ebx]
cld cld
rep movsb rep movsb
pop ecx esi edi pop ecx esi edi
@ -179,7 +177,7 @@ fs_CdRead:
sub [esp], ecx sub [esp], ecx
pop ecx pop ecx
xor ebx, ebx xor ebx, ebx
jmp .new_sector jmp .next
.done: .done:
mov ebx, edx mov ebx, edx

View File

@ -300,25 +300,10 @@ draw:
mov eax,0 mov eax,0
mov ebx,100*65536+492 mov ebx,100*65536+492
mov ecx,100*65536+280 mov ecx,100*65536+280
mov edx,0x3000000 mov edx,0x13000000
mov esi,0x805080d0 mov edi,title
mov edi,0x005080d0
int 0x40 int 0x40
mov eax,4
mov ebx,8*65536+8
mov ecx,0x10ddeeff
mov edx,title
mov esi,title_end-title
int 0x40
; mov eax,8
; mov ebx,(492-19)*65536+12
; mov ecx,5*65536+12
; mov edx,1
; mov esi,0x6688dd
; int 0x40
mov eax,12 mov eax,12
mov ebx,2 mov ebx,2
int 0x40 int 0x40
@ -481,83 +466,27 @@ gonext1:
ls: ls:
call oldcmd call oldcmd
call cls2 call cls2
and dword [dirinfo+4], 0
loopls: loopls:
inc dword [blockcnt]
mov eax,34 mov eax, 70
mov ebx,0 mov ebx, dirinfo
mov ecx,0 int 0x40
mov edx,0 inc dword [dirinfo+4]
add edx,dword [blockcnt] cmp ebx, 1
mov esi,1 jnz ls_end
mov edi,tic_table+7000 mov esi, direntry_buffer+32+40
int 0x40 mov edi, filename
@@:
mov ecx,16 lodsb
loop40: stosb
push ecx test al, al
jnz @b
cld @@:
mov ecx,8 cmp edi, filename+12
mov edi,filename jae ls_print
mov esi,tic_table stosb
add esi,dword [lscnt] jmp @b
rep movsb
add dword [lscnt],8
mov edi,filename+8
mov esi,ddot
movsb
cld
mov ecx,3
mov edi,filename+9
mov esi,tic_table
add esi,dword [lscnt]
rep movsb
cmp byte [filename+10],0
jne no_fn_space1
mov edi,filename+10
mov esi,dzero
movsb
no_fn_space1:
cmp byte [filename],0xe5 ; deleted file
je no_newline
cmp byte [filename],0xf ; long fat32 filename
je no_newline
cmp byte [filename],0x10 ; folder
je no_newline
cmp word [filename],'AK'
jne filename_ok
cmp byte [filename+3],'e'
jne filename_ok
cmp byte [filename+5],'y'
jne filename_ok
cmp byte [filename+7],'a'
jne filename_ok
cmp byte [filename+10],'s'
jne filename_ok
jmp no_newline
filename_ok:
mov eax,6
mov ebx,filename
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
cmp eax,4294967295
jne ls_print
jmp no_newline
ls_print_done: ls_print_done:
inc byte [lscntf] inc byte [lscntf]
@ -578,15 +507,6 @@ ls_print_done:
no_newline: no_newline:
add dword [lscnt],24 add dword [lscnt],24
pop ecx
dec ecx
cmp ecx,0
jne loop40
cmp dword [blockcnt],16
je ls_end
jmp no_pause2 jmp no_pause2
pause2n: pause2n:
@ -604,7 +524,6 @@ no_pause2:
jmp loopls jmp loopls
ls_end: ls_end:
mov dword [blockcnt],0
mov dword [lscnt],8024 mov dword [lscnt],8024
mov byte [lscntf],0 mov byte [lscntf],0
mov byte [lscntx],0 mov byte [lscntx],0
@ -615,9 +534,6 @@ ls_end:
jmp ecmd2 jmp ecmd2
ls_print: ls_print:
mov edi,filename+8
mov esi,fill1
movsb
mov eax,4 mov eax,4
mov ebx,[ypos] mov ebx,[ypos]
@ -2128,10 +2044,9 @@ chparam:
mov esi,qspace mov esi,qspace
rep movsb rep movsb
mov eax,19
mov ebx,tic_table+400 mov ebx,tic_table+400
mov ecx,tic_table+800 mov ecx,tic_table+800
int 0x40 call start_rd_app
cmp eax,0xfffffff0 cmp eax,0xfffffff0
jb cmd_ok jb cmd_ok
@ -2160,7 +2075,7 @@ needret:
cls1: cls1:
mov eax,13 mov eax,13
mov ebx,6*65536+486 mov ebx,6*65536+483
mov ecx,24*65536+250 mov ecx,24*65536+250
mov edx,0 mov edx,0
int 0x40 int 0x40
@ -2521,10 +2436,9 @@ loop20:
mov esi,qspace mov esi,qspace
rep movsb rep movsb
mov eax,19
mov ebx,tic_table+600 mov ebx,tic_table+600
mov ecx,0 mov ecx,0
int 0x40 call start_rd_app
cmp eax,0xfffffff0 cmp eax,0xfffffff0
jb cmd_ok_1 jb cmd_ok_1
@ -2829,9 +2743,40 @@ no_cmd:
ret ret
start_rd_app:
push edi
mov edi, fileinfo_buffer
mov eax, '/rd/'
stosd
mov ax, '1/'
stosw
push esi
mov esi, ebx
movsd
movsd
pop esi
@@:
dec edi
cmp byte [edi], ' '
jz @b
mov byte [edi+1], 0
pop edi
mov eax, 70
mov ebx, fileinfo_start
mov [ebx+8], ecx
int 0x40
ret
fileinfo_start:
dd 7
dd 0
dd ?
dd 0
dd 0
db 0
dd fileinfo_buffer
title: title:
db 'CMD - Command line interpreter' db 'CMD - Command line interpreter',0
title_end:
smb_cursor db '|' smb_cursor db '|'
@ -2977,7 +2922,6 @@ fill3 db ' ',0
pname db ' ',0 pname db ' ',0
autoexfile db 'AUTOEXEC.CMD',0 autoexfile db 'AUTOEXEC.CMD',0
filename db ' ',0
dzero db 0,0,0,0 dzero db 0,0,0,0
qspace db ' ' qspace db ' '
@ -2993,6 +2937,14 @@ ipccount dd 0
cmd_ex db 0 cmd_ex db 0
dirinfo:
dd 1
dd 0
dd 0
dd 1
dd direntry_buffer
db '/RD/1',0
ipcb: ipcb:
db 0 db 0
db 0,0,0 db 0,0,0
@ -3006,5 +2958,7 @@ ipcc:
times 110 db 0 times 110 db 0
I_END: I_END:
fileinfo_buffer rb 64
direntry_buffer rb 32+304
filename rb 260
tic_table: tic_table:

View File

@ -60,6 +60,11 @@ still: ;
and ebx,0xffff and ebx,0xffff
mov [curx1],eax ; curx1 = cursor_x mov [curx1],eax ; curx1 = cursor_x
mov [cury1],ebx ; cury1 = cursor_y mov [cury1],ebx ; cury1 = cursor_y
; \begin{diamond}[18.09.2006]
; ignore minimized windows
test [procinfo.wnd_state], 2
jnz ne_goden
; \end{diamond}[18.09.2006]
mov eax,[procinfo.x_start] ; eax = wnd_x_start mov eax,[procinfo.x_start] ; eax = wnd_x_start
mov ebx,[procinfo.y_start] ; ebx = wnd_y_start mov ebx,[procinfo.y_start] ; ebx = wnd_y_start

View File

@ -222,7 +222,13 @@ struc process_information
.x_size dd ? ; +42 .x_size dd ? ; +42
.y_size dd ? ; +46 .y_size dd ? ; +46
.slot_state dw ? ; +50 .slot_state dw ? ; +50
rb (1024-52) dw ? ; +52 - reserved
.client_left dd ? ; +54
.client_top dd ? ; +58
.client_width dd ? ; +62
.client_height dd ? ; +66
.wnd_state db ? ; +70
rb (1024-71)
} }
struct process_information struct process_information