Style corrected for new rules, no semantic changes

git-svn-id: svn://kolibrios.org@2288 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse
2011-10-14 21:38:50 +00:00
parent 61dfe6eeec
commit 037099f50d
185 changed files with 99632 additions and 99176 deletions

View File

@@ -170,13 +170,15 @@ ReadCDWRetr_1:
MaxCDWaitTime equ 1000 ;200 ;10 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MaxCDWaitTime equ 1000 ;200 ;10 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
uglobal uglobal
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PacketCommand: rb 12 ;DB 12 DUP (?) PacketCommand:
rb 12 ;DB 12 DUP (?)
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;CDDataBuf DB 4096 DUP (0) ;CDDataBuf DB 4096 DUP (0)
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;CDBlockSize DW ? ;CDBlockSize DW ?
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CDSectorAddress: DD ? CDSectorAddress:
DD ?
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
TickCounter_1 DD 0 TickCounter_1 DD 0
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

View File

@@ -176,7 +176,8 @@ FDCDataInput:
@@GetByteFromFDC: @@GetByteFromFDC:
inc DX inc DX
in AL, DX in AL, DX
@@End_6: pop DX @@End_6:
pop DX
pop ECX pop ECX
ret ret
@@ -222,7 +223,8 @@ WaitFDCInterrupt:
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov [FDC_Status], FDC_TimeOut mov [FDC_Status], FDC_TimeOut
; mov [flp_status],0 ; mov [flp_status],0
@@End_7: popa @@End_7:
popa
ret ret
;********************************* ;*********************************
@@ -456,7 +458,8 @@ ReadSector:
jnz @@Err_1 jnz @@Err_1
mov [FDC_Status], FDC_Normal mov [FDC_Status], FDC_Normal
jmp @@Exit_1 jmp @@Exit_1
@@Err_1: mov [FDC_Status],FDC_SectorNotFound @@Err_1:
mov [FDC_Status], FDC_SectorNotFound
; mov [flp_status],0 ; mov [flp_status],0
@@Exit_1: @@Exit_1:
call save_timer_fdd_motor call save_timer_fdd_motor
@@ -555,7 +558,8 @@ WriteSector:
jnz @@Err_2 jnz @@Err_2
mov [FDC_Status], FDC_Normal mov [FDC_Status], FDC_Normal
jmp @@Exit_3 jmp @@Exit_3
@@Err_2: mov [FDC_Status],FDC_SectorNotFound @@Err_2:
mov [FDC_Status], FDC_SectorNotFound
@@Exit_3: @@Exit_3:
call save_timer_fdd_motor call save_timer_fdd_motor
popad popad

View File

@@ -1169,7 +1169,8 @@ fat_next_short_name:
add edi, 6 add edi, 6
cmp word [edi], ' ' cmp word [edi], ' '
jnz .insert_tilde jnz .insert_tilde
@@: dec edi @@:
dec edi
cmp byte [edi], ' ' cmp byte [edi], ' '
jz @b jz @b
inc edi inc edi

View File

@@ -712,14 +712,16 @@ end if
sub word [cursor_pos], size_of_step sub word [cursor_pos], size_of_step
jmp .loops jmp .loops
.down: cmp ah,0x50;x,0x50E0 ; down .down:
cmp ah, 0x50;x,0x50E0 ; down
jne .pgup jne .pgup
cmp word[es:si+10], -1 cmp word[es:si+10], -1
je .loops je .loops
add word [cursor_pos], size_of_step add word [cursor_pos], size_of_step
jmp .loops jmp .loops
.pgup: cmp ah,0x49 ; page up .pgup:
cmp ah, 0x49 ; page up
jne .pgdn jne .pgdn
sub si, size_of_step*long_v_table sub si, size_of_step*long_v_table
cmp si, modes_table cmp si, modes_table
@@ -736,7 +738,8 @@ end if
mov word [home_cursor], si mov word [home_cursor], si
jmp .loops jmp .loops
.pgdn: cmp ah,0x51 ; page down .pgdn:
cmp ah, 0x51 ; page down
jne .enter jne .enter
mov ax, [end_cursor] mov ax, [end_cursor]
add si, size_of_step*long_v_table add si, size_of_step*long_v_table
@@ -756,7 +759,8 @@ end if
mov word [home_cursor], si mov word [home_cursor], si
jmp .loops jmp .loops
.enter: cmp al,0x0D;x,0x1C0D ; enter .enter:
cmp al, 0x0D;x,0x1C0D ; enter
jne .loops jne .loops
push word [cursor_pos] push word [cursor_pos]
pop bp pop bp
@@ -801,7 +805,8 @@ end if
popf popf
jz @f jz @f
mov si, off_msg mov si, off_msg
@@: jmp printplain @@:
jmp printplain
; novesa and vervesa strings are not used at the moment of executing this code ; novesa and vervesa strings are not used at the moment of executing this code
virtual at novesa virtual at novesa
.oldtimer dd ? .oldtimer dd ?
@@ -850,7 +855,8 @@ if lang eq ru
mov cl, '<27>' mov cl, '<27>'
jz @f jz @f
mov cl, '<27>' mov cl, '<27>'
@@: mov [time_str+9], cl @@:
mov [time_str+9], cl
else if lang eq et else if lang eq et
cmp al, 1 cmp al, 1
ja @f ja @f
@@ -863,7 +869,8 @@ else
mov cl, 's' mov cl, 's'
ja @f ja @f
mov cl, ' ' mov cl, ' '
@@: mov [time_str+9], cl @@:
mov [time_str+9], cl
end if end if
add al, '0' add al, '0'
mov [time_str+1], al mov [time_str+1], al

View File

@@ -42,7 +42,8 @@ end while
store byte ' ' at d80x25_top+cur_line_pos store byte ' ' at d80x25_top+cur_line_pos
store dword ' SVN' at d80x25_top+cur_line_pos-4 store dword ' SVN' at d80x25_top+cur_line_pos-4
space_msg: line_space space_msg:
line_space
verstr: verstr:
; line_space ; line_space
; version string ; version string

View File

@@ -94,7 +94,8 @@ int2str:
push edx push edx
call int2str call int2str
pop eax pop eax
@@: or al,0x30 @@:
or al, 0x30
mov [ds:di], al mov [ds:di], al
inc di inc di
ret ret
@@ -107,7 +108,8 @@ int2strnz:
push edx push edx
call int2strnz call int2strnz
pop eax pop eax
@@: or al,0x30 @@:
or al, 0x30
mov [es:di], al mov [es:di], al
inc di inc di
ret ret
@@ -244,7 +246,8 @@ calc_vmodes_table:
jb .lp1 jb .lp1
or cx, 0x4000 ; use LFB or cx, 0x4000 ; use LFB
.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 ; size of record add bx, size_of_step ; size of record
@@ -363,7 +366,8 @@ if defined extended_primary_loader
je .ok_found_mode je .ok_found_mode
cmp word [es:si+8], 24 cmp word [es:si+8], 24
je .ok_found_mode je .ok_found_mode
@@: add si,size_of_step @@:
add si, size_of_step
cmp word [es:si], -1 cmp word [es:si], -1
jnz .findvbemode jnz .findvbemode
.novbemode: .novbemode:
@@ -438,7 +442,8 @@ end if
mov ecx, long_v_table mov ecx, long_v_table
.loop: add ax,size_of_step .loop:
add ax, size_of_step
cmp ax, word [end_cursor] cmp ax, word [end_cursor]
jae .next_step jae .next_step
loop .loop loop .loop
@@ -471,13 +476,16 @@ end if
je .ok je .ok
cmp word [es:si+8], 24 cmp word [es:si+8], 24
je .ok je .ok
.next: add si,size_of_step .next:
add si, size_of_step
cmp word [es:si], -1 cmp word [es:si], -1
je .exit je .exit
jmp .loops jmp .loops
.ok: xor ax,ax .ok:
xor ax, ax
ret ret
.exit: or ax,-1 .exit:
or ax, -1
ret ret
@@ -520,7 +528,8 @@ draw_vmodes_table:
jmp .ok jmp .ok
.low: sub cx,size_of_step .low:
sub cx, size_of_step
cmp cx, modes_table cmp cx, modes_table
jb .ok jb .ok
push cx push cx

View File

@@ -35,7 +35,8 @@ preboot_timeout dw 5*18 ; timeout in 1/18th of second for config settings s
end if end if
if $>0x200 if $>0x200
ERROR: prebooting parameters must fit in first sector!!! ERROR:
prebooting parameters must fit in first sector!!!
end if end if
hdsysimage db 'KOLIBRI IMG' ; load from hdsysimage db 'KOLIBRI IMG' ; load from
image_save db 'KOLIBRI IMG' ; save to image_save db 'KOLIBRI IMG' ; save to

View File

@@ -47,7 +47,8 @@
mov si, load_question + 100h - 600h mov si, load_question + 100h - 600h
call out_string call out_string
; mov si, answer + 100h - 0600h ; already is ; mov si, answer + 100h - 0600h ; already is
xxy: mov ah, 0 xxy:
mov ah, 0
int 16h int 16h
or al, 20h or al, 20h
mov [si], al mov [si], al
@@ -904,7 +905,8 @@ cur_chunk_ptr dw ?
rootcache_size dw ? ; must be immediately before foldcache_clus rootcache_size dw ? ; must be immediately before foldcache_clus
if $-dat >= 0x80 if $-dat >= 0x80
warning: unoptimal data displacement! warning:
unoptimal data displacement!
end if end if
foldcache_clus rd 7 foldcache_clus rd 7
foldcache_mark rw 7 foldcache_mark rw 7
@@ -912,7 +914,8 @@ foldcache_size rw 7
fat_filename rb 11 fat_filename rb 11
if $ > 2000h if $ > 2000h
error: file is too big error:
file is too big
end if end if
; for NT/2k/XP, file must be 16 sectors = 0x2000 bytes long ; for NT/2k/XP, file must be 16 sectors = 0x2000 bytes long

View File

@@ -684,5 +684,6 @@ foldcache_mark rw 7
foldcache_size rw 7 foldcache_size rw 7
filename rb 11 filename rb 11
if $ > 0x8200 if $ > 0x8200
error: table overwritten error:
table overwritten
end if end if

View File

@@ -545,7 +545,8 @@ end if
uglobal uglobal
align 4 align 4
; VendID (2), DevID (2), Revision = 0 (1), Class Code (3), FNum (1), Bus (1) ; VendID (2), DevID (2), Revision = 0 (1), Class Code (3), FNum (1), Bus (1)
pci_emu_dat: times 30*10 db 0 pci_emu_dat:
times 30*10 db 0
endg endg
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
align 4 align 4
@@ -579,7 +580,8 @@ sys_pcibios:
cmp ebp, 2 ; FIND_PCI_DEVICE cmp ebp, 2 ; FIND_PCI_DEVICE
jne .not_FIND_PCI_DEVICE jne .not_FIND_PCI_DEVICE
mov ebx, pci_emu_dat mov ebx, pci_emu_dat
..nxt: cmp [ebx], dx ..nxt:
cmp [ebx], dx
jne ..no jne ..no
cmp [ebx + 2], cx cmp [ebx + 2], cx
jne ..no jne ..no
@@ -588,7 +590,8 @@ sys_pcibios:
mov bx, [ebx + 4] mov bx, [ebx + 4]
xor ah, ah xor ah, ah
jmp .return_ab jmp .return_ab
..no: cmp word[ebx], 0 ..no:
cmp word[ebx], 0
je ..dev_not_found je ..dev_not_found
add ebx, 10 add ebx, 10
jmp ..nxt jmp ..nxt
@@ -601,12 +604,14 @@ sys_pcibios:
jne .not_FIND_PCI_CLASS_CODE jne .not_FIND_PCI_CLASS_CODE
mov esi, pci_emu_dat mov esi, pci_emu_dat
shl ecx, 8 shl ecx, 8
..nxt2: cmp [esi], ecx ..nxt2:
cmp [esi], ecx
jne ..no2 jne ..no2
mov bx, [esi] mov bx, [esi]
xor ah, ah xor ah, ah
jmp .return_ab jmp .return_ab
..no2: cmp dword[esi], 0 ..no2:
cmp dword[esi], 0
je ..dev_not_found je ..dev_not_found
add esi, 10 add esi, 10
jmp ..nxt2 jmp ..nxt2
@@ -641,7 +646,8 @@ sys_pcibios:
.not_WRITE_CONFIG: .not_WRITE_CONFIG:
.unsupported_func: .unsupported_func:
mov ah, 0x81 ; FUNC_NOT_SUPPORTED mov ah, 0x81 ; FUNC_NOT_SUPPORTED
.return:mov dword[esp + 4 ], edi .return:
mov dword[esp + 4 ], edi
mov dword[esp + 8], esi mov dword[esp + 8], esi
.return_abcd: .return_abcd:
mov dword[esp + 24], edx mov dword[esp + 24], edx

View File

@@ -13,7 +13,8 @@
$Revision$ $Revision$
iglobal iglobal
conf_path_sect: db 'path',0 conf_path_sect:
db 'path',0
conf_fname db '/sys/sys.conf',0 conf_fname db '/sys/sys.conf',0
endg endg

View File

@@ -13,7 +13,8 @@ sys_debug_services:
cmp ebx, 9 cmp ebx, 9
ja @f ja @f
jmp dword [sys_debug_services_table+ebx*4] jmp dword [sys_debug_services_table+ebx*4]
@@: ret @@:
ret
iglobal iglobal
align 4 align 4
sys_debug_services_table: sys_debug_services_table:
@@ -93,7 +94,8 @@ debug_suspend:
cmp cl, 5 cmp cl, 5
jnz .ret jnz .ret
mov cl, 2 mov cl, 2
.2: mov [CURRENT_TASK+eax+TASKDATA.state], cl .2:
mov [CURRENT_TASK+eax+TASKDATA.state], cl
.ret: .ret:
sti sti
ret ret
@@ -108,9 +110,12 @@ do_resume:
cmp cl, 2 cmp cl, 2
jnz .ret jnz .ret
mov cl, 5 mov cl, 5
.2: mov [CURRENT_TASK+eax+TASKDATA.state], cl .2:
.ret: ret mov [CURRENT_TASK+eax+TASKDATA.state], cl
.1: dec ecx .ret:
ret
.1:
dec ecx
jmp .2 jmp .2
debug_resume: debug_resume:
@@ -122,7 +127,8 @@ debug_resume:
shl eax, 5 shl eax, 5
jz .ret jz .ret
call do_resume call do_resume
.ret: sti .ret:
sti
ret ret
debug_getcontext: debug_getcontext:

View File

@@ -28,7 +28,8 @@ macro export dllname,[label,string]
local name local name
dd (name-OS_BASE) dd (name-OS_BASE)
common common
ordinal: count = 0 ordinal:
count = 0
forward forward
dw count dw count
count = count+1 count = count+1

View File

@@ -158,7 +158,8 @@ endp
proc dll.Load, import_table:dword proc dll.Load, import_table:dword
mov esi, [import_table] mov esi, [import_table]
.next_lib: mov edx,[esi] .next_lib:
mov edx, [esi]
or edx, edx or edx, edx
jz .exit jz .exit
push esi push esi
@@ -168,7 +169,8 @@ proc dll.Load, import_table:dword
mov al, '/' mov al, '/'
stosb stosb
mov esi, sysdir_path mov esi, sysdir_path
@@: lodsb @@:
lodsb
stosb stosb
or al, al or al, al
jnz @b jnz @b
@@ -179,7 +181,8 @@ proc dll.Load, import_table:dword
pop esi pop esi
push esi push esi
mov esi, [esi+4] mov esi, [esi+4]
@@: lodsb @@:
lodsb
stosb stosb
or al, al or al, al
jnz @b jnz @b
@@ -195,9 +198,11 @@ proc dll.Load, import_table:dword
pop esi pop esi
add esi, 8 add esi, 8
jmp .next_lib jmp .next_lib
.exit: xor eax,eax .exit:
xor eax, eax
ret ret
.fail: add esp,4 .fail:
add esp, 4
xor eax, eax xor eax, eax
inc eax inc eax
ret ret
@@ -208,7 +213,8 @@ proc dll.Link, exp:dword,imp:dword
mov esi, [imp] mov esi, [imp]
test esi, esi test esi, esi
jz .done jz .done
.next: lodsd .next:
lodsd
test eax, eax test eax, eax
jz .done jz .done
stdcall dll.GetProcAddress, [exp], eax stdcall dll.GetProcAddress, [exp], eax
@@ -216,8 +222,10 @@ proc dll.Link, exp:dword,imp:dword
jz @f jz @f
mov [esi-4], eax mov [esi-4], eax
jmp .next jmp .next
@@: mov dword[esp],0 @@:
.done: pop eax mov dword[esp], 0
.done:
pop eax
ret ret
endp endp
@@ -234,15 +242,18 @@ endp
proc dll.GetProcAddress, exp:dword,sz_name:dword proc dll.GetProcAddress, exp:dword,sz_name:dword
mov edx, [exp] mov edx, [exp]
.next: test edx,edx .next:
test edx, edx
jz .end jz .end
stdcall strncmp, [edx], [sz_name], dword -1 stdcall strncmp, [edx], [sz_name], dword -1
test eax, eax test eax, eax
jz .ok jz .ok
add edx, 8 add edx, 8
jmp .next jmp .next
.ok: mov eax,[edx+4] .ok:
.end: ret mov eax, [edx+4]
.end:
ret
endp endp
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
@@ -276,7 +287,8 @@ proc mem.ReAlloc mptr,size;///////////////////////////////////////////////////
add ecx, -4 add ecx, -4
cmp ecx, [eax-4] cmp ecx, [eax-4]
je .exit je .exit
@@: mov eax,ebx @@:
mov eax, ebx
call mem.Alloc call mem.Alloc
xchg eax, [esp] xchg eax, [esp]
or eax, eax or eax, eax
@@ -288,7 +300,8 @@ proc mem.ReAlloc mptr,size;///////////////////////////////////////////////////
cmp ecx, [edi-4] cmp ecx, [edi-4]
jbe @f jbe @f
mov ecx, [edi-4] mov ecx, [edi-4]
@@: add ecx,3 @@:
add ecx, 3
shr ecx, 2 shr ecx, 2
cld cld
rep movsd rep movsd

View File

@@ -470,7 +470,8 @@ proc new_mem_resize stdcall, new_size:dword
pop eax pop eax
call free_page call free_page
.next: add edi, 1 .next:
add edi, 1
cmp edi, esi cmp edi, esi
jb @B jb @B
@@ -797,7 +798,8 @@ proc map_mem stdcall, lin_addr:dword,slot:dword,\
; and eax, 0xFFFFF000 ; and eax, 0xFFFFF000
; stdcall map_page, edi, eax ; stdcall map_page, edi, eax
@@: mov edi, [lin_addr] @@:
mov edi, [lin_addr]
and edi, 0xFFFFF000 and edi, 0xFFFFF000
mov ecx, [buf_size] mov ecx, [buf_size]
add ecx, 4095 add ecx, 4095
@@ -857,7 +859,8 @@ proc map_memEx stdcall, lin_addr:dword,slot:dword,\
jz .exit jz .exit
stdcall map_page, edi, eax, PG_UW stdcall map_page, edi, eax, PG_UW
@@: mov edi, [lin_addr] @@:
mov edi, [lin_addr]
and edi, 0xFFFFF000 and edi, 0xFFFFF000
mov ecx, [buf_size] mov ecx, [buf_size]
add ecx, 4095 add ecx, 4095
@@ -988,7 +991,8 @@ sys_IPC:
add edx, 4095 add edx, 4095
and edx, not 4095 and edx, not 4095
.touch: mov eax, [ecx] .touch:
mov eax, [ecx]
add ecx, 0x1000 add ecx, 0x1000
cmp ecx, edx cmp ecx, edx
jb .touch jb .touch

View File

@@ -60,7 +60,8 @@ if 0
end if end if
call find_next_task call find_next_task
jz .return ; the same task -> skip switch jz .return ; the same task -> skip switch
@@: mov byte[DONT_SWITCH], 1 @@:
mov byte[DONT_SWITCH], 1
call do_change_task call do_change_task
.return: .return:
popad popad
@@ -121,7 +122,8 @@ find_next_task:
jb @f jb @f
xor bh, bh xor bh, bh
mov edi, CURRENT_TASK mov edi, CURRENT_TASK
@@: inc bh ; ebx += APPDATA.size @@:
inc bh ; ebx += APPDATA.size
add edi, 0x20; edi += TASKDATA.size add edi, 0x20; edi += TASKDATA.size
mov al, [edi+TASKDATA.state] mov al, [edi+TASKDATA.state]
test al, al test al, al
@@ -140,7 +142,8 @@ find_next_task:
sub ecx, [ebx+APPDATA.wait_begin] sub ecx, [ebx+APPDATA.wait_begin]
cmp ecx, [ebx+APPDATA.wait_timeout] cmp ecx, [ebx+APPDATA.wait_timeout]
jb .loop jb .loop
@@: mov [ebx+APPDATA.wait_param], eax ; retval for wait @@:
mov [ebx+APPDATA.wait_param], eax ; retval for wait
mov [edi+TASKDATA.state], 0 mov [edi+TASKDATA.state], 0
.found: .found:
mov [CURRENT_TASK], bh mov [CURRENT_TASK], bh
@@ -214,7 +217,8 @@ do_change_task:
mov reg, eax mov reg, eax
} lodsReg dr0, dr1, dr2, dr3, dr7 } lodsReg dr0, dr1, dr2, dr3, dr7
purge lodsReg purge lodsReg
@@: ret @@:
ret
;end. ;end.

View File

@@ -20,7 +20,8 @@ build_interrupt_table:
mov esi, sys_int mov esi, sys_int
mov ecx, 0x40 mov ecx, 0x40
mov eax, (10001110b shl 24) + os_code mov eax, (10001110b shl 24) + os_code
@@: movsw ;low word of code-entry @@:
movsw ;low word of code-entry
stosd ;interrupt gate type : os_code selector stosd ;interrupt gate type : os_code selector
movsw ;high word of code-entry movsw ;high word of code-entry
loop @b loop @b
@@ -138,13 +139,15 @@ exc_c: ;
cmp bl, 14 ; #PF cmp bl, 14 ; #PF
jne @f jne @f
call page_fault_handler ; SEE: core/memory.inc call page_fault_handler ; SEE: core/memory.inc
@@: mov esi, [current_slot] @@:
mov esi, [current_slot]
btr [esi+APPDATA.except_mask], ebx btr [esi+APPDATA.except_mask], ebx
jnc @f jnc @f
mov eax, [esi+APPDATA.exc_handler] mov eax, [esi+APPDATA.exc_handler]
test eax, eax test eax, eax
jnz IRetToUserHook jnz IRetToUserHook
@@: cli @@:
cli
mov eax, [esi+APPDATA.debugger_slot] mov eax, [esi+APPDATA.debugger_slot]
test eax, eax test eax, eax
jnz .debug jnz .debug
@@ -165,10 +168,12 @@ exc_c: ;
mov dr6, edx mov dr6, edx
mov edx, dr7 mov edx, dr7
mov cl, not 8 mov cl, not 8
.l1: shl dl,2 .l1:
shl dl, 2
jc @f jc @f
and bl, cl and bl, cl
@@: sar cl,1 @@:
sar cl, 1
jc .l1 jc .l1
mov cl, 3 ; debug_message code=debug_exception mov cl, 3 ; debug_message code=debug_exception
.notify: .notify:
@@ -213,8 +218,10 @@ show_error_parameters:
jb .l0 jb .l0
cmp bl, 0x0e cmp bl, 0x0e
jbe .l1 jbe .l1
.l0: mov bl, 0x09 .l0:
.l1: mov eax,[msg_fault_sel+ebx*4 - 0x08*4] mov bl, 0x09
.l1:
mov eax, [msg_fault_sel+ebx*4 - 0x08*4]
DEBUGF 1, "K : %s\n", eax DEBUGF 1, "K : %s\n", eax
mov eax, [reg_cs3+4] mov eax, [reg_cs3+4]
mov edi, msg_sel_app mov edi, msg_sel_app
@@ -223,7 +230,8 @@ show_error_parameters:
je @f je @f
mov edi, msg_sel_ker mov edi, msg_sel_ker
mov ebx, [reg_esp0+4] mov ebx, [reg_esp0+4]
@@: DEBUGF 1, "K : EAX : %x EBX : %x ECX : %x\n", [reg_eax+4], [reg_ebx+4], [reg_ecx+4] @@:
DEBUGF 1, "K : EAX : %x EBX : %x ECX : %x\n", [reg_eax+4], [reg_ebx+4], [reg_ecx+4]
DEBUGF 1, "K : EDX : %x ESI : %x EDI : %x\n", [reg_edx+4], [reg_esi+4], [reg_edi+4] DEBUGF 1, "K : EDX : %x ESI : %x EDI : %x\n", [reg_edx+4], [reg_esi+4], [reg_edi+4]
DEBUGF 1, "K : EBP : %x EIP : %x ESP : %x\n", [reg_ebp+4], [reg_eip+4], ebx DEBUGF 1, "K : EBP : %x EIP : %x ESP : %x\n", [reg_ebp+4], [reg_eip+4], ebx
DEBUGF 1, "K : Flags : %x CS : %x (%s)\n", [reg_eflags+4], eax, edi DEBUGF 1, "K : Flags : %x CS : %x (%s)\n", [reg_eflags+4], eax, edi

View File

@@ -371,7 +371,8 @@ v86_exc_c:
jne @f jne @f
xor eax, eax xor eax, eax
mov dr6, eax mov dr6, eax
@@: mov eax, [esp+v86_regs.size+10h+18h] @@:
mov eax, [esp+v86_regs.size+10h+18h]
cmp word [esp+v86_regs.eip], ax cmp word [esp+v86_regs.eip], ax
jnz @f jnz @f
shr eax, 16 shr eax, 16

View File

@@ -12,7 +12,8 @@ flm db 0
preboot_lfb db 0 preboot_lfb db 0
preboot_bootlog db 0 preboot_bootlog db 0
boot_drive db 0 boot_drive db 0
bx_from_load: dw 'r1' ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> bx ; {SPraid}[13.03.2007] bx_from_load:
dw 'r1' ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> bx ; {SPraid}[13.03.2007]
; a,b,c,d - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, r - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; a,b,c,d - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, r - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
; # <20><><EFBFBD><EFBFBD><EFBFBD>... <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <20><> <20><><EFBFBD><EFBFBD>. '1', <20> <20><> 1 ; # <20><><EFBFBD><EFBFBD><EFBFBD>... <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <20><> <20><><EFBFBD><EFBFBD>. '1', <20> <20><> 1

View File

@@ -293,7 +293,8 @@ gdte:
align 16 align 16
cur_saved_data rb 4096 cur_saved_data rb 4096
fpu_data: rb 512 fpu_data:
rb 512
mem_block_list rd 64*2 mem_block_list rd 64*2
mem_used_list rd 64*2 mem_used_list rd 64*2

View File

@@ -124,7 +124,8 @@ ReadHDD_ID:
ret ret
@@Error6: @@Error6:
mov [DevErrorCode], 6 mov [DevErrorCode], 6
@@End: ret @@End:
ret
iglobal iglobal
@@ -258,15 +259,20 @@ SendCommandToHDD:
mov [DevErrorCode], 0 mov [DevErrorCode], 0
ret ret
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@Err1: mov [DevErrorCode],1 @@Err1:
mov [DevErrorCode], 1
ret ret
@@Err2: mov [DevErrorCode],2 @@Err2:
mov [DevErrorCode], 2
ret ret
@@Err3: mov [DevErrorCode],3 @@Err3:
mov [DevErrorCode], 3
ret ret
@@Err4: mov [DevErrorCode],4 @@Err4:
mov [DevErrorCode], 4
ret ret
@@Err5: mov [DevErrorCode],5 @@Err5:
mov [DevErrorCode], 5
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ret ret
@@ -373,11 +379,14 @@ DeviceReset:
mov [DevErrorCode], 0 mov [DevErrorCode], 0
ret ret
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@Err1_2: mov [DevErrorCode],1 @@Err1_2:
mov [DevErrorCode], 1
ret ret
@@Err3_2: mov [DevErrorCode],3 @@Err3_2:
mov [DevErrorCode], 3
ret ret
@@Err4_2: mov [DevErrorCode],4 @@Err4_2:
mov [DevErrorCode], 4
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ret ret

View File

@@ -42,16 +42,20 @@ redraw:
mcall 4,10*65536+3,0x80000000,text.4 mcall 4,10*65536+3,0x80000000,text.4
bts [flags], 1 bts [flags], 1
jmp .end jmp .end
@@: cmp al,0 @@:
cmp al, 0
jne @f jne @f
mov edx, text.1 mov edx, text.1
jmp .0 jmp .0
@@: cmp al,1 @@:
cmp al, 1
jne @f jne @f
mov edx, text.2 mov edx, text.2
jmp .0 jmp .0
@@: mov edx,text.3 @@:
.0: push edx mov edx, text.3
.0:
push edx
mcall 4,169*65536+3,0x80dddddd,text.0 mcall 4,169*65536+3,0x80dddddd,text.0
pop edx pop edx
add ebx, 47*65536 add ebx, 47*65536
@@ -65,16 +69,20 @@ redraw:
jne @f jne @f
mov edx, text.01 mov edx, text.01
jmp .1 jmp .1
@@: cmp bh,1 @@:
cmp bh, 1
jne @f jne @f
mov edx, text.02 mov edx, text.02
jmp .1 jmp .1
@@: cmp bh,2 @@:
cmp bh, 2
jne @f jne @f
mov edx, text.03 mov edx, text.03
jmp .1 jmp .1
@@: mov edx,text.04 @@:
.1: push edx mov edx, text.04
.1:
push edx
mcall 4,10*65536+10,0x80000000,text.00 mcall 4,10*65536+10,0x80000000,text.00
pop edx pop edx
mcall ,100*65536+10,;0x80000000 mcall ,100*65536+10,;0x80000000
@@ -85,20 +93,25 @@ redraw:
jne @f jne @f
mov edx, text.11 mov edx, text.11
jmp .2 jmp .2
@@: cmp bl,1 @@:
cmp bl, 1
jne @f jne @f
mov edx, text.12 mov edx, text.12
jmp .2 jmp .2
@@: cmp bl,2 @@:
cmp bl, 2
jne @f jne @f
mov edx, text.13 mov edx, text.13
jmp .2 jmp .2
@@: cmp bl,3 @@:
cmp bl, 3
jne @f jne @f
mov edx, text.14 mov edx, text.14
jmp .2 jmp .2
@@: mov edx,text.04 @@:
.2: push edx mov edx, text.04
.2:
push edx
mcall 4,10*65536+20,0x80000000,text.10 mcall 4,10*65536+20,0x80000000,text.10
pop edx pop edx
mcall ,100*65536+20, mcall ,100*65536+20,
@@ -111,10 +124,12 @@ redraw:
mcall ,100*65536+30,0x80000000,text.04 mcall ,100*65536+30,0x80000000,text.04
pop eax pop eax
jmp .end jmp .end
@@: shl ecx,24 @@:
shl ecx, 24
shr ecx, 24 shr ecx, 24
mcall 47,0x80030000,,100*65536+30,0x347636 mcall 47,0x80030000,,100*65536+30,0x347636
.3: mcall 4,115*65536+30,0x80000000,text.15 .3:
mcall 4,115*65536+30,0x80000000,text.15
mov dx, [esp] mov dx, [esp]
shl edx, 17 shl edx, 17
shr edx, 17 shr edx, 17
@@ -125,7 +140,8 @@ redraw:
bt cx, 15 bt cx, 15
jc @f jc @f
mov edx, text.22 mov edx, text.22
@@: mcall 4,160*65536+30,0x80000000 @@:
mcall 4,160*65536+30,0x80000000
pop si pop si
.error: .error:
.end: .end:
@@ -137,7 +153,8 @@ redraw:
bt [flags], 1 bt [flags], 1
jc @f jc @f
mcall ,65*65536+45,,2, mcall ,65*65536+45,,2,
@@: mcall 4,10*65536+50,0x80564242,text.30 @@:
mcall 4,10*65536+50,0x80564242,text.30
mcall 12,2 mcall 12,2
still: still:
@@ -167,28 +184,34 @@ button:
jne @f jne @f
mcall -1 mcall -1
@@: cmp ah,2 @@:
cmp ah, 2
jne @f jne @f
mcall 5,50 mcall 5,50
mcall 49,0x0001,0x0001,0x5307 mcall 49,0x0001,0x0001,0x5307
jmp redraw jmp redraw
@@: cmp ah,4 @@:
cmp ah, 4
jg @f jg @f
mov edx, 0x01f7 ;primary chan. mov edx, 0x01f7 ;primary chan.
call reserv_ports call reserv_ports
jc redraw jc redraw
sub bh, 3 sub bh, 3
.1: call set_drive .1:
call set_drive
btc [flags], 2 btc [flags], 2
jnc .2 jnc .2
call device_reset call device_reset
jmp .3 jmp .3
.2: call standby_hdd .2:
.3: call free_ports call standby_hdd
.3:
call free_ports
jmp redraw jmp redraw
@@: cmp ah,6 @@:
cmp ah, 6
jg redraw jg redraw
mov edx, 0x0177 ;secondary chan. mov edx, 0x0177 ;secondary chan.
call reserv_ports call reserv_ports
@@ -202,10 +225,12 @@ set_drive:
test bh, bh test bh, bh
jnz @f jnz @f
btr ax, 4 btr ax, 4
.1: out dx,al .1:
out dx, al
inc dx inc dx
ret ret
@@: bts ax,4 @@:
bts ax, 4
jmp .1 jmp .1
@@ -217,7 +242,8 @@ standby_hdd:
; 98h E5h nondata check power mode ; 98h E5h nondata check power mode
; 99h E6h nondata set sleep mode ; 99h E6h nondata set sleep mode
xor ecx, ecx xor ecx, ecx
@@: in al,dx @@:
in al, dx
dec cx dec cx
jz @f jz @f
bt ax, 6 bt ax, 6
@@ -239,13 +265,15 @@ reserv_ports:
pop bx pop bx
clc clc
ret ret
@@: pop bx @@:
pop bx
stc stc
ret ret
device_reset: device_reset:
xor ecx, ecx xor ecx, ecx
@@: in al,dx @@:
in al, dx
dec cx dec cx
jz @f jz @f
bt ax, 6 bt ax, 6
@@ -267,29 +295,49 @@ title db '',0
flags dw 0 flags dw 0
text: text:
.0: db 'APM v.1.',0 .0:
.1: db '0',0 db 'APM v.1.',0
.2: db '1',0 .1:
.3: db '2',0 db '0',0
.4: db 'APM not supported',0 .2:
db '1',0
.3:
db '2',0
.4:
db 'APM not supported',0
.00: db 'power status:',0 .00:
.01: db 'off-line',0 db 'power status:',0
.02: db 'on-line',0 .01:
.03: db 'on backup power',0 db 'off-line',0
.04: db 'unknown',0 .02:
db 'on-line',0
.03:
db 'on backup power',0
.04:
db 'unknown',0
.10: db 'battery flag:',0 .10:
.11: db 'high',0 db 'battery flag:',0
.12: db 'low',0 .11:
.13: db 'critical',0 db 'high',0
.14: db 'charging',0 .12:
.15: db ' % ,',0 db 'low',0
.13:
db 'critical',0
.14:
db 'charging',0
.15:
db ' % ,',0
.20: db 'battery life:',0 .20:
.21: db 'min',0 db 'battery life:',0
.22: db 'sec',0 .21:
db 'min',0
.22:
db 'sec',0
.30: db 'STAND-BY: SYSTEM HDD: 0 1 2 3',0 .30:
db 'STAND-BY: SYSTEM HDD: 0 1 2 3',0
I_END: I_END:

View File

@@ -560,7 +560,8 @@ proc detect_controller
mov [brg_bus], eax mov [brg_bus], eax
mov eax, [devfn] mov eax, [devfn]
mov [brg_devfn], eax mov [brg_devfn], eax
.no_bridge:pop eax .no_bridge:
pop eax
mov edi, devices mov edi, devices
@@: @@:

View File

@@ -344,7 +344,8 @@ end if
align 4 align 4
version dd (5 shl 16) or (API_VERSION and 0xFFFF) version dd (5 shl 16) or (API_VERSION and 0xFFFF)
sb_base_port: dd 200h ;don't ask me why - see the code&docs sb_base_port:
dd 200h ;don't ask me why - see the code&docs
sound_dma dd sb_dma_num sound_dma dd sb_dma_num
@@ -376,8 +377,10 @@ msgErrDMAsetup db 'failed to setup DMA - bad channel',13,10,0
msgDSPFound db 'DSP found at port 2' msgDSPFound db 'DSP found at port 2'
label port_second_digit_num dword at $ label port_second_digit_num dword at $
db '00h',13,10,'DSP version ' db '00h',13,10,'DSP version '
sb_DSP_version: db '0.00 - SB' sb_DSP_version:
sb_DSP_description: db 32,32,32,32,13,10,0 db '0.00 - SB'
sb_DSP_description:
db 32,32,32,32,13,10,0
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
end if end if

View File

@@ -94,22 +94,22 @@ static int usb_internal_control_msg(struct usb_device *usb_dev,
} }
void usb_fill_control_urb (struct urb *urb, ;void usb_fill_control_urb (struct urb *urb,
struct usb_device *dev, ; struct usb_device *dev,
unsigned int pipe, ; unsigned int pipe,
unsigned char *setup_packet, ; unsigned char *setup_packet,
void *transfer_buffer, ; void *transfer_buffer,
int buffer_length, ; int buffer_length,
usb_complete_t complete_fn, ; usb_complete_t complete_fn,
void *context) ; void *context)
{ ;{
;
urb->dev = dev; ; urb->dev = dev;
urb->pipe = pipe; ; urb->pipe = pipe;
urb->setup_packet = setup_packet; ; urb->setup_packet = setup_packet;
urb->transfer_buffer = transfer_buffer; ; urb->transfer_buffer = transfer_buffer;
urb->transfer_buffer_length = buffer_length; ; urb->transfer_buffer_length = buffer_length;
urb->complete = complete_fn; ; urb->complete = complete_fn;
urb->context = context; ; urb->context = context;
} ;}
;

View File

@@ -1053,7 +1053,7 @@ proc codec_read stdcall, ac_reg:dword ; reg = edx, reval = eax
mov eax, 20000 ; wait 20 ms mov eax, 20000 ; wait 20 ms
call StallExec call StallExec
stdcall codec_valid, stdcall codec_valid
cmp eax, 0 cmp eax, 0
pop eax pop eax
jge .ok jge .ok

View File

@@ -252,7 +252,8 @@ debug_endf
debug_func fdo_debug_outstr debug_func fdo_debug_outstr
debug_beginf debug_beginf
mov eax, 1 mov eax, 1
.l1: dec esi .l1:
dec esi
js .l2 js .l2
movzx ebx, byte[edx] movzx ebx, byte[edx]
or bl, bl or bl, bl
@@ -261,7 +262,8 @@ debug_beginf
call ecx ; sys_msg_board call ecx ; sys_msg_board
inc edx inc edx
jmp .l1 jmp .l1
.l2: ret .l2:
ret
debug_endf debug_endf
debug_func fdo_debug_outdec debug_func fdo_debug_outdec
@@ -275,20 +277,24 @@ debug_beginf
mov al, '-' mov al, '-'
call fdo_debug_outchar call fdo_debug_outchar
pop eax pop eax
@@: push 10 @@:
push 10
pop ecx pop ecx
push -'0' push -'0'
.l1: xor edx,edx .l1:
xor edx, edx
div ecx div ecx
push edx push edx
test eax, eax test eax, eax
jnz .l1 jnz .l1
.l2: pop eax .l2:
pop eax
add al, '0' add al, '0'
jz .l3 jz .l3
call fdo_debug_outchar call fdo_debug_outchar
jmp .l2 jmp .l2
.l3: ret .l3:
ret
debug_endf debug_endf
debug_func fdo_debug_outhex debug_func fdo_debug_outhex
@@ -299,7 +305,8 @@ debug_beginf
add cl, 8 add cl, 8
shl cl, 2 shl cl, 2
rol eax, cl rol eax, cl
.l1: rol eax,4 .l1:
rol eax, 4
push eax push eax
and eax, 0x0000000F and eax, 0x0000000F
mov al, [__fdo_hexdigits+eax] mov al, [__fdo_hexdigits+eax]

View File

@@ -94,10 +94,13 @@ endg
uglobal uglobal
align 4 align 4
fat_cache: times 512 db 0 fat_cache:
times 512 db 0
Sector512: ; label for dev_hdcd.inc Sector512: ; label for dev_hdcd.inc
buffer: times 512 db 0 buffer:
fsinfo_buffer: times 512 db 0 times 512 db 0
fsinfo_buffer:
times 512 db 0
endg endg
uglobal uglobal
@@ -2345,7 +2348,8 @@ fs_HdWrite:
sub dword [esp], 0x200 sub dword [esp], 0x200
jae @f jae @f
and dword [esp], 0 and dword [esp], 0
@@: jmp .write_loop @@:
jmp .write_loop
hd_extend_file.zero_size: hd_extend_file.zero_size:
xor eax, eax xor eax, eax
@@ -2454,7 +2458,8 @@ hd_extend_file:
cmp [hd_error], 0 cmp [hd_error], 0
jz @f jz @f
mov al, 11 mov al, 11
@@: stc @@:
stc
ret ret
;---------------------------------------------------------------- ;----------------------------------------------------------------

View File

@@ -21,12 +21,14 @@ $Revision$
iglobal iglobal
dir0: db 'HARDDISK ' dir0:
db 'HARDDISK '
db 'RAMDISK ' db 'RAMDISK '
db 'FLOPPYDISK ' db 'FLOPPYDISK '
db 0 db 0
dir1: db 'FIRST ' dir1:
db 'FIRST '
db 'SECOND ' db 'SECOND '
db 'THIRD ' db 'THIRD '
db 'FOURTH ' db 'FOURTH '
@@ -34,7 +36,8 @@ dir1: db 'FIRST '
not_select_IDE db 0 not_select_IDE db 0
hd_address_table: dd 0x1f0,0x00,0x1f0,0x10 hd_address_table:
dd 0x1f0,0x00,0x1f0,0x10
dd 0x170,0x00,0x170,0x10 dd 0x170,0x00,0x170,0x10
endg endg
@@ -793,5 +796,6 @@ error:
stc stc
jmp i4 jmp i4
partition_string: dd 0 partition_string:
dd 0
db 32 db 32

View File

@@ -1018,9 +1018,11 @@ max_cur_dir equ 0x1000
stosb stosb
mov ecx, edx mov ecx, edx
rep movsb ;copy string rep movsb ;copy string
.ret: ret .ret:
ret
.error: add esp,8 .error:
add esp, 8
or dword [esp+32], -1 ;error not found zerro at string ->[eax+APPDATA.cur_dir] or dword [esp+32], -1 ;error not found zerro at string ->[eax+APPDATA.cur_dir]
ret ret
.set: .set:

View File

@@ -55,7 +55,8 @@ fatStartScan dd 2
fs_dependent_data_end: fs_dependent_data_end:
file_system_data_size = $ - PARTITION_START file_system_data_size = $ - PARTITION_START
if file_system_data_size > 96 if file_system_data_size > 96
ERROR: sizeof(file system data) too big! ERROR:
sizeof(file system data) too big!
end if end if
virtual at fs_dependent_data_start virtual at fs_dependent_data_start
@@ -75,7 +76,8 @@ ntfs_data:
.cur_index_size dd ? .cur_index_size dd ?
.cur_index_buf dd ? .cur_index_buf dd ?
if $ > fs_dependent_data_end if $ > fs_dependent_data_end
ERROR: increase sizeof(fs_dependent_data)! ERROR:
increase sizeof(fs_dependent_data)!
end if end if
end virtual end virtual
@@ -99,7 +101,8 @@ ext2_data:
.sb dd ? ; superblock .sb dd ? ; superblock
.groups_count dd ? .groups_count dd ?
if $ > fs_dependent_data_end if $ > fs_dependent_data_end
ERROR: increase sizeof(fs_dependent_data)! ERROR:
increase sizeof(fs_dependent_data)!
end if end if
end virtual end virtual

View File

@@ -131,7 +131,8 @@ syscall_button: ;///// system function 8 //////////////////////////////////////
call button._.incecx2 call button._.incecx2
; set button height counter ; set button height counter
@@: mov edx, edi @@:
mov edx, edi
.next_line: .next_line:
call button._.button_dececx call button._.button_dececx
@@ -380,14 +381,17 @@ button._.dececx: ;/////////////////////////////////////////////////////////////
sub cl, 0x20 sub cl, 0x20
jnc @f jnc @f
xor cl, cl xor cl, cl
@@: sub ch, 0x20 @@:
sub ch, 0x20
jnc @f jnc @f
xor ch, ch xor ch, ch
@@: rol ecx, 16 @@:
rol ecx, 16
sub cl, 0x20 sub cl, 0x20
jnc @f jnc @f
xor cl, cl xor cl, cl
@@: rol ecx, 16 @@:
rol ecx, 16
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@@ -398,14 +402,17 @@ button._.incecx: ;/////////////////////////////////////////////////////////////
add cl, 0x20 add cl, 0x20
jnc @f jnc @f
or cl, -1 or cl, -1
@@: add ch, 0x20 @@:
add ch, 0x20
jnc @f jnc @f
or ch, -1 or ch, -1
@@: rol ecx, 16 @@:
rol ecx, 16
add cl, 0x20 add cl, 0x20
jnc @f jnc @f
or cl, -1 or cl, -1
@@: rol ecx, 16 @@:
rol ecx, 16
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@@ -416,14 +423,17 @@ button._.incecx2: ;////////////////////////////////////////////////////////////
add cl, 0x14 add cl, 0x14
jnc @f jnc @f
or cl, -1 or cl, -1
@@: add ch, 0x14 @@:
add ch, 0x14
jnc @f jnc @f
or ch, -1 or ch, -1
@@: rol ecx, 16 @@:
rol ecx, 16
add cl, 0x14 add cl, 0x14
jnc @f jnc @f
or cl, -1 or cl, -1
@@: rol ecx, 16 @@:
rol ecx, 16
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@@ -440,17 +450,21 @@ button._.button_dececx: ;//////////////////////////////////////////////////////
jg @f jg @f
mov al, 2 mov al, 2
@@: sub cl, al @@:
jnc @f
xor cl, cl
@@: sub ch, al
jnc @f
xor ch, ch
@@: rol ecx, 16
sub cl, al sub cl, al
jnc @f jnc @f
xor cl, cl xor cl, cl
@@: rol ecx, 16 @@:
sub ch, al
jnc @f
xor ch, ch
@@:
rol ecx, 16
sub cl, al
jnc @f
xor cl, cl
@@:
rol ecx, 16
pop eax pop eax

View File

@@ -32,7 +32,8 @@ init_events: ;; used from kernel.asm
mov ecx, EV_SPACE ; current - in allocated space mov ecx, EV_SPACE ; current - in allocated space
mov ebx, FreeEvents ; previos - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> mov ebx, FreeEvents ; previos - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
push ebx ; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> push ebx ; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@: mov [ebx+EVENT.fd],eax @@:
mov [ebx+EVENT.fd], eax
mov [eax+EVENT.bk], ebx mov [eax+EVENT.bk], ebx
mov ebx, eax ; previos <- current mov ebx, eax ; previos <- current
add eax, EVENT.size ; new current add eax, EVENT.size ; new current
@@ -40,7 +41,8 @@ init_events: ;; used from kernel.asm
pop eax ; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> pop eax ; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov [ebx+EVENT.fd], eax mov [ebx+EVENT.fd], eax
mov [eax+EVENT.bk], ebx mov [eax+EVENT.bk], ebx
.fail: ret .fail:
ret
EVENT_WATCHED equ 0x10000000 ;<EFBFBD><EFBFBD><EFBFBD> 28 EVENT_WATCHED equ 0x10000000 ;<EFBFBD><EFBFBD><EFBFBD> 28
EVENT_SIGNALED equ 0x20000000 ;<EFBFBD><EFBFBD><EFBFBD> 29 EVENT_SIGNALED equ 0x20000000 ;<EFBFBD><EFBFBD><EFBFBD> 29
@@ -87,7 +89,8 @@ set_event: ;; INTERNAL use !!! don't use
call init_events call init_events
popad popad
jz RemoveEventTo.break ; POPF+RET jz RemoveEventTo.break ; POPF+RET
@@: mov eax,[eax+EVENT.fd] @@:
mov eax, [eax+EVENT.fd]
mov [eax+EVENT.magic], 'EVNT' mov [eax+EVENT.magic], 'EVNT'
mov [eax+EVENT.destroy], destroy_event.internal mov [eax+EVENT.destroy], destroy_event.internal
mov [eax+EVENT.state], ecx mov [eax+EVENT.state], ecx
@@ -115,7 +118,8 @@ RemoveEventTo: ;; INTERNAL use !!! don't use
xchg ecx, [eax+EVENT.fd] ; Self.fd=NewRight, ecx=OldRight xchg ecx, [eax+EVENT.fd] ; Self.fd=NewRight, ecx=OldRight
mov [ebx+EVENT.fd], ecx ; OldLeft.fd=OldRight mov [ebx+EVENT.fd], ecx ; OldLeft.fd=OldRight
mov [ecx+EVENT.bk], ebx ; OldRight.bk=OldLeft mov [ecx+EVENT.bk], ebx ; OldRight.bk=OldLeft
.break: popfd .break:
popfd
ret ret
align 4 align 4
@@ -213,9 +217,11 @@ DummyTest: ;; INTERNAL use (not returned
jne @f jne @f
cmp [eax+EVENT.id], ebx cmp [eax+EVENT.id], ebx
je .ret je .ret
@@: pop eax @@:
pop eax
xor eax, eax xor eax, eax
.ret: ret .ret:
ret
align 4 align 4
@@ -254,7 +260,8 @@ Wait_events_ex:
mov [eax+TASKDATA.state], 5 mov [eax+TASKDATA.state], 5
call change_task call change_task
mov eax, [esi+APPDATA.wait_param] mov eax, [esi+APPDATA.wait_param]
@@: ret @@:
ret
align 4 align 4
wait_event: ;; EXPORT use wait_event: ;; EXPORT use
@@ -346,7 +353,8 @@ get_event_queue:
mov eax, [ebx+APPOBJ.bk] ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FIFO mov eax, [ebx+APPOBJ.bk] ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FIFO
cmp eax, ebx ; empty ??? cmp eax, ebx ; empty ???
je get_event_alone.ret0 je get_event_alone.ret0
.ret: ret .ret:
ret
align 4 align 4
get_event_alone: get_event_alone:
@@ -364,8 +372,10 @@ get_event_alone:
test byte[eax+EVENT.state+3], EVENT_SIGNALED shr 24 test byte[eax+EVENT.state+3], EVENT_SIGNALED shr 24
jnz .ret jnz .ret
or byte[eax+EVENT.state+3], EVENT_WATCHED shr 24 or byte[eax+EVENT.state+3], EVENT_WATCHED shr 24
.ret0: xor eax,eax ; NO event!!! .ret0:
.ret: ret xor eax, eax; NO event!!!
.ret:
ret
align 4 align 4
sys_sendwindowmsg: ;; f72 sys_sendwindowmsg: ;; f72
@@ -393,7 +403,8 @@ sys_sendwindowmsg: ;; f72
.result: .result:
setae byte[esp+32] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: dword[esp+32]==72 setae byte[esp+32] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: dword[esp+32]==72
.retf: ;popfd .retf: ;popfd
.ret: ret .ret:
ret
align 4 align 4
sys_getevent: ;; f11 sys_getevent: ;; f11
@@ -487,8 +498,10 @@ get_event_for_app: ;; used from f10,f11,f23
jne @f ; not Top ??? jne @f ; not Top ???
cmp [KEY_COUNT], al; al==1 cmp [KEY_COUNT], al; al==1
jae .result ; not empty ??? jae .result ; not empty ???
@@: mov edx, hotkey_buffer @@:
@@: cmp [edx],bh ; bh - slot for testing mov edx, hotkey_buffer
@@:
cmp [edx], bh ; bh - slot for testing
je .result je .result
add edx, 8 add edx, 8
cmp edx, hotkey_buffer+120*8 cmp edx, hotkey_buffer+120*8

View File

@@ -72,7 +72,8 @@ mouse_check_events: ;//////////////////////////////////////////////////////////
jmp .exit jmp .exit
; is there any system button under cursor? ; is there any system button under cursor?
@@: call mouse._.find_sys_button_under_cursor @@:
call mouse._.find_sys_button_under_cursor
or eax, eax or eax, eax
jz .check_buttons_released jz .check_buttons_released
@@ -119,12 +120,14 @@ mouse_check_events: ;//////////////////////////////////////////////////////////
mov eax, [esp + 4] mov eax, [esp + 4]
call .call_left_button_handler call .call_left_button_handler
@@: test byte[esp], mouse.RIGHT_BUTTON_FLAG @@:
test byte[esp], mouse.RIGHT_BUTTON_FLAG
jz @f jz @f
mov eax, [esp + 4] mov eax, [esp + 4]
call .call_right_button_handler call .call_right_button_handler
@@: test byte[esp], mouse.MIDDLE_BUTTON_FLAG @@:
test byte[esp], mouse.MIDDLE_BUTTON_FLAG
jz .check_position jz .check_position
mov eax, [esp + 4] mov eax, [esp + 4]
call .call_middle_button_handler call .call_middle_button_handler
@@ -222,7 +225,8 @@ mouse._.left_button_press_handler: ;///////////////////////////////////////////
call sys_window_maximize_handler call sys_window_maximize_handler
jmp .exit jmp .exit
@@: test [edi + WDATA.fl_wstate], WSTATE_MAXIMIZED @@:
test [edi + WDATA.fl_wstate], WSTATE_MAXIMIZED
jnz .exit jnz .exit
mov [mouse.active_sys_window.pslot], esi mov [mouse.active_sys_window.pslot], esi
lea eax, [edi + WDATA.box] lea eax, [edi + WDATA.box]
@@ -238,15 +242,18 @@ mouse._.left_button_press_handler: ;///////////////////////////////////////////
call .calculate_w_delta call .calculate_w_delta
jmp .call_window_handler jmp .call_window_handler
@@: test dl, mouse.WINDOW_RESIZE_W_FLAG @@:
test dl, mouse.WINDOW_RESIZE_W_FLAG
jz @f jz @f
call .calculate_w_delta call .calculate_w_delta
@@: test dl, mouse.WINDOW_RESIZE_S_FLAG @@:
test dl, mouse.WINDOW_RESIZE_S_FLAG
jz @f jz @f
call .calculate_s_delta call .calculate_s_delta
@@: test dl, mouse.WINDOW_RESIZE_E_FLAG @@:
test dl, mouse.WINDOW_RESIZE_E_FLAG
jz .call_window_handler jz .call_window_handler
call .calculate_e_delta call .calculate_e_delta
@@ -389,17 +396,20 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
jge @f jge @f
xor eax, eax xor eax, eax
mov [mouse.active_sys_window.new_box.left], eax mov [mouse.active_sys_window.new_box.left], eax
@@: add eax, [mouse.active_sys_window.new_box.width] @@:
add eax, [mouse.active_sys_window.new_box.width]
cmp eax, [Screen_Max_X] cmp eax, [Screen_Max_X]
jl @f jl @f
sub eax, [Screen_Max_X] sub eax, [Screen_Max_X]
sub [mouse.active_sys_window.new_box.left], eax sub [mouse.active_sys_window.new_box.left], eax
@@: mov eax, [mouse.active_sys_window.new_box.top] @@:
mov eax, [mouse.active_sys_window.new_box.top]
or eax, eax or eax, eax
jge @f jge @f
xor eax, eax xor eax, eax
mov [mouse.active_sys_window.new_box.top], eax mov [mouse.active_sys_window.new_box.top], eax
@@: add eax, [mouse.active_sys_window.new_box.height] @@:
add eax, [mouse.active_sys_window.new_box.height]
cmp eax, [Screen_Max_Y] cmp eax, [Screen_Max_Y]
jle .call_window_handler jle .call_window_handler
sub eax, [Screen_Max_Y] sub eax, [Screen_Max_Y]
@@ -421,7 +431,8 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
jge @f jge @f
add [mouse.active_sys_window.new_box.left], eax add [mouse.active_sys_window.new_box.left], eax
mov [mouse.active_sys_window.new_box.width], 127 mov [mouse.active_sys_window.new_box.width], 127
@@: mov eax, [mouse.active_sys_window.new_box.left] @@:
mov eax, [mouse.active_sys_window.new_box.left]
or eax, eax or eax, eax
jge .check_resize_s jge .check_resize_s
add [mouse.active_sys_window.new_box.width], eax add [mouse.active_sys_window.new_box.width], eax
@@ -449,7 +460,8 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
jge @f jge @f
mov eax, ecx mov eax, ecx
mov [mouse.active_sys_window.new_box.height], eax mov [mouse.active_sys_window.new_box.height], eax
@@: add eax, [mouse.active_sys_window.new_box.top] @@:
add eax, [mouse.active_sys_window.new_box.top]
cmp eax, [Screen_Max_Y] cmp eax, [Screen_Max_Y]
jle .check_resize_e jle .check_resize_e
sub eax, [Screen_Max_Y] sub eax, [Screen_Max_Y]
@@ -474,7 +486,8 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
jge @f jge @f
mov eax, 127 mov eax, 127
mov [mouse.active_sys_window.new_box.width], eax mov [mouse.active_sys_window.new_box.width], eax
@@: add eax, [mouse.active_sys_window.new_box.left] @@:
add eax, [mouse.active_sys_window.new_box.left]
cmp eax, [Screen_Max_X] cmp eax, [Screen_Max_X]
jle .call_window_handler jle .call_window_handler
sub eax, [Screen_Max_X] sub eax, [Screen_Max_X]

View File

@@ -127,7 +127,8 @@ parse_skin_data:
mov ebx, [ebp+SKIN_HEADER.bitmaps] mov ebx, [ebp+SKIN_HEADER.bitmaps]
add ebx, skin_data add ebx, skin_data
.lp1: cmp dword[ebx],0 .lp1:
cmp dword[ebx], 0
je .end_bitmaps je .end_bitmaps
movzx eax, [ebx+SKIN_BITMAPS.kind] movzx eax, [ebx+SKIN_BITMAPS.kind]
movzx ecx, [ebx+SKIN_BITMAPS.type] movzx ecx, [ebx+SKIN_BITMAPS.type]
@@ -138,7 +139,8 @@ parse_skin_data:
or ecx, ecx or ecx, ecx
jnz @f jnz @f
mov edx, skin_inactive.left.data mov edx, skin_inactive.left.data
@@: jmp .next_bitmap @@:
jmp .next_bitmap
.not_left: .not_left:
dec eax dec eax
jnz .not_oper jnz .not_oper
@@ -150,7 +152,8 @@ parse_skin_data:
or ecx, ecx or ecx, ecx
jnz @f jnz @f
mov edx, skin_inactive.oper.data mov edx, skin_inactive.oper.data
@@: jmp .next_bitmap @@:
jmp .next_bitmap
.not_oper: .not_oper:
dec eax dec eax
jnz .not_base jnz .not_base
@@ -160,7 +163,8 @@ parse_skin_data:
jnz @f jnz @f
mov eax, [skin_inactive.left.width] mov eax, [skin_inactive.left.width]
mov edx, skin_inactive.base.data mov edx, skin_inactive.base.data
@@: jmp .next_bitmap @@:
jmp .next_bitmap
.not_base: .not_base:
add ebx, 8 add ebx, 8
jmp .lp1 jmp .lp1
@@ -178,7 +182,8 @@ parse_skin_data:
mov ebx, [ebp+SKIN_HEADER.buttons] mov ebx, [ebp+SKIN_HEADER.buttons]
add ebx, skin_data add ebx, skin_data
.lp2: cmp dword[ebx],0 .lp2:
cmp dword[ebx], 0
je .end_buttons je .end_buttons
mov eax, [ebx+SKIN_BUTTONS.type] mov eax, [ebx+SKIN_BUTTONS.type]
dec eax dec eax
@@ -213,7 +218,8 @@ sys_putimage_with_check:
or ebx, ebx or ebx, ebx
jz @f jz @f
call sys_putimage.forced call sys_putimage.forced
@@: ret @@:
ret
drawwindow_IV_caption: drawwindow_IV_caption:

View File

@@ -56,7 +56,8 @@ syscall_draw_window: ;///// system function 0 /////////////////////////////////
call drawwindow_I call drawwindow_I
jmp window._.draw_window_caption.2 jmp window._.draw_window_caption.2
@@: dec al @@:
dec al
jnz @f jnz @f
; type II - only reserve area, no draw ; type II - only reserve area, no draw
@@ -65,7 +66,8 @@ syscall_draw_window: ;///// system function 0 /////////////////////////////////
call [draw_pointer] call [draw_pointer]
jmp .exit jmp .exit
@@: dec al @@:
dec al
jnz @f jnz @f
; type III - new style ; type III - new style
@@ -73,7 +75,8 @@ syscall_draw_window: ;///// system function 0 /////////////////////////////////
jmp window._.draw_window_caption.2 jmp window._.draw_window_caption.2
; type IV & V - skinned window (resizable & not) ; type IV & V - skinned window (resizable & not)
@@: mov eax, [TASK_COUNT] @@:
mov eax, [TASK_COUNT]
movzx eax, word[WIN_POS + eax * 2] movzx eax, word[WIN_POS + eax * 2]
cmp eax, [CURRENT_TASK] cmp eax, [CURRENT_TASK]
setz al setz al
@@ -133,7 +136,8 @@ syscall_display_settings: ;///// system function 48 ///////////////////////////
cmp ebx, .sizeof.ftable / 4 cmp ebx, .sizeof.ftable / 4
ja @f ja @f
jmp [.ftable + ebx * 4] jmp [.ftable + ebx * 4]
@@: ret @@:
ret
align 4 align 4
@@ -210,11 +214,13 @@ syscall_display_settings.06:
or eax, eax or eax, eax
jge @f jge @f
xor eax, eax xor eax, eax
@@: mov [screen_workarea.left], eax @@:
mov [screen_workarea.left], eax
cmp ebx, edi cmp ebx, edi
jle @f jle @f
mov ebx, edi mov ebx, edi
@@: mov [screen_workarea.right], ebx @@:
mov [screen_workarea.right], ebx
.check_horizontal: .check_horizontal:
mov edi, [Screen_Max_Y] mov edi, [Screen_Max_Y]
@@ -227,11 +233,13 @@ syscall_display_settings.06:
or eax, eax or eax, eax
jge @f jge @f
xor eax, eax xor eax, eax
@@: mov [screen_workarea.top], eax @@:
mov [screen_workarea.top], eax
cmp ebx, edi cmp ebx, edi
jle @f jle @f
mov ebx, edi mov ebx, edi
@@: mov [screen_workarea.bottom], ebx @@:
mov [screen_workarea.bottom], ebx
.check_if_redraw_needed: .check_if_redraw_needed:
or esi, esi or esi, esi
@@ -328,17 +336,21 @@ syscall_move_window: ;///// system function 67 ////////////////////////////////
cmp ebx, -1 cmp ebx, -1
jne @f jne @f
mov ebx, [edi + WDATA.box.left] mov ebx, [edi + WDATA.box.left]
@@: cmp ecx, -1 @@:
cmp ecx, -1
jne @f jne @f
mov ecx, [edi + WDATA.box.top] mov ecx, [edi + WDATA.box.top]
@@: cmp edx, -1 @@:
cmp edx, -1
jne @f jne @f
mov edx, [edi + WDATA.box.width] mov edx, [edi + WDATA.box.width]
@@: cmp esi, -1 @@:
cmp esi, -1
jne @f jne @f
mov esi, [edi + WDATA.box.height] mov esi, [edi + WDATA.box.height]
@@: push esi edx ecx ebx @@:
push esi edx ecx ebx
mov eax, esp mov eax, esp
mov bl, [edi + WDATA.fl_wstate] mov bl, [edi + WDATA.fl_wstate]
call window._.set_window_box call window._.set_window_box
@@ -399,7 +411,8 @@ set_window_defaults: ;/////////////////////////////////////////////////////////
push eax ecx push eax ecx
xor eax, eax xor eax, eax
mov ecx, WIN_STACK mov ecx, WIN_STACK
@@: inc eax @@:
inc eax
add ecx, 2 add ecx, 2
; process no ; process no
mov [ecx + 0x000], ax mov [ecx + 0x000], ax
@@ -466,17 +479,21 @@ calculatescreen: ;/////////////////////////////////////////////////////////////
cmp eax, [esp + RECT.left] cmp eax, [esp + RECT.left]
jae @f jae @f
mov eax, [esp + RECT.left] mov eax, [esp + RECT.left]
@@: cmp ebx, [esp + RECT.top] @@:
cmp ebx, [esp + RECT.top]
jae @f jae @f
mov ebx, [esp + RECT.top] mov ebx, [esp + RECT.top]
@@: cmp ecx, [esp + RECT.right] @@:
cmp ecx, [esp + RECT.right]
jbe @f jbe @f
mov ecx, [esp + RECT.right] mov ecx, [esp + RECT.right]
@@: cmp edx, [esp + RECT.bottom] @@:
cmp edx, [esp + RECT.bottom]
jbe @f jbe @f
mov edx, [esp + RECT.bottom] mov edx, [esp + RECT.bottom]
@@: push esi @@:
push esi
movzx esi, word[WIN_POS + esi * 2] movzx esi, word[WIN_POS + esi * 2]
call window._.set_screen call window._.set_screen
pop esi pop esi
@@ -520,7 +537,8 @@ repos_windows: ;///////////////////////////////////////////////////////////////
sub eax, ebx sub eax, ebx
jle @f jle @f
mov [edi + WDATA.box.width], ebx mov [edi + WDATA.box.width], ebx
@@: sub ebx, [edi + WDATA.box.width] @@:
sub ebx, [edi + WDATA.box.width]
mov [edi + WDATA.box.left], ebx mov [edi + WDATA.box.left], ebx
.fix_vertical: .fix_vertical:
@@ -533,7 +551,8 @@ repos_windows: ;///////////////////////////////////////////////////////////////
sub eax, ebx sub eax, ebx
jle @f jle @f
mov [edi + WDATA.box.height], ebx mov [edi + WDATA.box.height], ebx
@@: sub ebx, [edi + WDATA.box.height] @@:
sub ebx, [edi + WDATA.box.height]
mov [edi + WDATA.box.top], ebx mov [edi + WDATA.box.top], ebx
jmp .fix_client_box jmp .fix_client_box
@@ -655,7 +674,8 @@ drawwindow_I_caption: ;////////////////////////////////////////////////////////
cmp ebx, eax cmp ebx, eax
jbe @f jbe @f
mov ebx, eax mov ebx, eax
@@: push ebx @@:
push ebx
xor edi, edi xor edi, edi
@@ -674,7 +694,8 @@ drawwindow_I_caption: ;////////////////////////////////////////////////////////
jz @f jz @f
sub ecx, 0x00040404 sub ecx, 0x00040404
mov [esi + WDATA.cl_titlebar], ecx mov [esi + WDATA.cl_titlebar], ecx
@@: and ecx, 0x00ffffff @@:
and ecx, 0x00ffffff
call [draw_line] call [draw_line]
inc edx inc edx
cmp edx, [esp] cmp edx, [esp]
@@ -753,7 +774,8 @@ drawwindow_III_caption: ;/////////////////////////////////////////////////////
cmp ebx, eax cmp ebx, eax
jb @f jb @f
mov ebx, eax mov ebx, eax
@@: push ebx @@:
push ebx
xor edi, edi xor edi, edi
@@ -770,10 +792,12 @@ drawwindow_III_caption: ;/////////////////////////////////////////////////////
test ecx, 0x40000000 test ecx, 0x40000000
jz @f jz @f
add ecx, 0x00040404 add ecx, 0x00040404
@@: test ecx, 0x80000000 @@:
test ecx, 0x80000000
jz @f jz @f
sub ecx, 0x00040404 sub ecx, 0x00040404
@@: mov [esi + WDATA.cl_titlebar], ecx @@:
mov [esi + WDATA.cl_titlebar], ecx
and ecx, 0x00ffffff and ecx, 0x00ffffff
call [draw_line] call [draw_line]
inc edx inc edx
@@ -987,7 +1011,8 @@ restore_minimized_window: ;////////////////////////////////////////////////////
cmp eax, [TASK_COUNT] cmp eax, [TASK_COUNT]
jz @f jz @f
mov ebp, calculatescreen mov ebp, calculatescreen
@@: mov eax, [edi + WDATA.box.left] @@:
mov eax, [edi + WDATA.box.left]
mov ebx, [edi + WDATA.box.top] mov ebx, [edi + WDATA.box.top]
mov ecx, [edi + WDATA.box.width] mov ecx, [edi + WDATA.box.width]
mov edx, [edi + WDATA.box.height] mov edx, [edi + WDATA.box.height]
@@ -1022,7 +1047,8 @@ window_check_events: ;/////////////////////////////////////////////////////////
call minimize_window call minimize_window
jmp .exit jmp .exit
@@: call restore_minimized_window @@:
call restore_minimized_window
.exit: .exit:
ret ret
@@ -1083,7 +1109,8 @@ sys_window_maximize_handler: ;/////////////////////////////////////////////////
mov [ecx + BOX.height], eax mov [ecx + BOX.height], eax
xchg eax, ecx xchg eax, ecx
@@: call window._.set_window_box @@:
call window._.set_window_box
add esp, BOX.sizeof add esp, BOX.sizeof
.exit: .exit:
@@ -1124,7 +1151,8 @@ sys_window_rollup_handler: ;///////////////////////////////////////////////////
lea eax, [edx + APPDATA.saved_box] lea eax, [edx + APPDATA.saved_box]
jmp .set_box jmp .set_box
@@: mov eax, [screen_workarea.top] @@:
mov eax, [screen_workarea.top]
push [screen_workarea.bottom] \ push [screen_workarea.bottom] \
[edi + WDATA.box.width] \ [edi + WDATA.box.width] \
eax \ eax \
@@ -1232,27 +1260,31 @@ window._.invalidate_screen: ;//////////////////////////////////////////////////
cmp ecx, edx cmp ecx, edx
jle @f jle @f
mov ecx, edx mov ecx, edx
@@: mov [draw_limits.left], ecx @@:
mov [draw_limits.left], ecx
mov ecx, [eax + BOX.left] mov ecx, [eax + BOX.left]
add ecx, [eax + BOX.width] add ecx, [eax + BOX.width]
add edx, [ebx + BOX.width] add edx, [ebx + BOX.width]
cmp ecx, edx cmp ecx, edx
jae @f jae @f
mov ecx, edx mov ecx, edx
@@: mov [draw_limits.right], ecx @@:
mov [draw_limits.right], ecx
mov ecx, [eax + BOX.top] mov ecx, [eax + BOX.top]
mov edx, [ebx + BOX.top] mov edx, [ebx + BOX.top]
cmp ecx, edx cmp ecx, edx
jle @f jle @f
mov ecx, edx mov ecx, edx
@@: mov [draw_limits.top], ecx @@:
mov [draw_limits.top], ecx
mov ecx, [eax + BOX.top] mov ecx, [eax + BOX.top]
add ecx, [eax + BOX.height] add ecx, [eax + BOX.height]
add edx, [ebx + BOX.height] add edx, [ebx + BOX.height]
cmp ecx, edx cmp ecx, edx
jae @f jae @f
mov ecx, edx mov ecx, edx
@@: mov [draw_limits.bottom], ecx @@:
mov [draw_limits.bottom], ecx
; recalculate screen buffer at old position ; recalculate screen buffer at old position
push ebx push ebx
@@ -1477,7 +1509,8 @@ window._.sys_set_window: ;/////////////////////////////////////////////////////
xor eax, eax xor eax, eax
@@: mov [edi + APPDATA.wnd_caption], eax @@:
mov [edi + APPDATA.wnd_caption], eax
mov esi, [esp] mov esi, [esp]
add edi, APPDATA.saved_box add edi, APPDATA.saved_box
@@ -1601,7 +1634,8 @@ window._.get_titlebar_height: ;////////////////////////////////////////////////
jne @f jne @f
mov eax, [_skinh] mov eax, [_skinh]
ret ret
@@: mov eax, 21 @@:
mov eax, 21
ret ret
align 4 align 4
@@ -1619,11 +1653,13 @@ window._.get_rolledup_height: ;////////////////////////////////////////////////
mov eax, [_skinh] mov eax, [_skinh]
add eax, 3 add eax, 3
ret ret
@@: or al, al @@:
or al, al
jnz @f jnz @f
mov eax, 21 mov eax, 21
ret ret
@@: mov eax, 21 + 2 @@:
mov eax, 21 + 2
ret ret
align 4 align 4
@@ -1770,7 +1806,8 @@ end virtual
mov eax, esi mov eax, esi
mov [ebp], al mov [ebp], al
; -- end body -- ; -- end body --
@@: inc ebp @@:
inc ebp
inc edx inc edx
cmp edx, [ff_xsz] cmp edx, [ff_xsz]
jb .ff_new_x jb .ff_new_x
@@ -2014,7 +2051,8 @@ window._.draw_window_caption: ;////////////////////////////////////////////////
cmp edx, [CURRENT_TASK] cmp edx, [CURRENT_TASK]
jne @f jne @f
inc eax inc eax
@@: mov edx, [CURRENT_TASK] @@:
mov edx, [CURRENT_TASK]
shl edx, 5 shl edx, 5
add edx, window_data add edx, window_data
movzx ebx, [edx + WDATA.fl_wstyle] movzx ebx, [edx + WDATA.fl_wstyle]
@@ -2045,7 +2083,8 @@ window._.draw_window_caption: ;////////////////////////////////////////////////
call drawwindow_I_caption call drawwindow_I_caption
.2: mov edi, [CURRENT_TASK] .2:
mov edi, [CURRENT_TASK]
shl edi, 5 shl edi, 5
test [edi + window_data + WDATA.fl_wstyle], WSTYLE_HASCAPTION test [edi + window_data + WDATA.fl_wstyle], WSTYLE_HASCAPTION
jz .exit jz .exit

View File

@@ -28,7 +28,8 @@ endg
iglobal iglobal
mouse_delay dd 10 mouse_delay dd 10
mouse_speed_factor: dd 3 mouse_speed_factor:
dd 3
mouse_timer_ticks dd 0 mouse_timer_ticks dd 0
endg endg

View File

@@ -288,7 +288,8 @@ init_BIOS32:
mov esi, edi mov esi, edi
xor eax, eax xor eax, eax
cld ; paranoia cld ; paranoia
@@: lodsb @@:
lodsb
add ah, al add ah, al
loop @b loop @b
jnz .pcibios_nxt2; control summ must be zero jnz .pcibios_nxt2; control summ must be zero

View File

@@ -171,17 +171,20 @@ include "detect/biosdisk.inc"
mov al, 255 ; mask all irqs mov al, 255 ; mask all irqs
out 0xa1, al out 0xa1, al
out 0x21, al out 0x21, al
l.5: in al, 0x64 ; Enable A20 l.5:
in al, 0x64 ; Enable A20
test al, 2 test al, 2
jnz l.5 jnz l.5
mov al, 0xD1 mov al, 0xD1
out 0x64, al out 0x64, al
l.6: in al, 0x64 l.6:
in al, 0x64
test al, 2 test al, 2
jnz l.6 jnz l.6
mov al, 0xDF mov al, 0xDF
out 0x60, al out 0x60, al
l.7: in al, 0x64 l.7:
in al, 0x64
test al, 2 test al, 2
jnz l.7 jnz l.7
mov al, 0xFF mov al, 0xFF
@@ -982,7 +985,8 @@ end if
if preboot_blogesc if preboot_blogesc
mov esi, boot_tasking mov esi, boot_tasking
call boot_log call boot_log
.bll1: in al, 0x60 ; wait for ESC key press .bll1:
in al, 0x60 ; wait for ESC key press
cmp al, 129 cmp al, 129
jne .bll1 jne .bll1
end if end if
@@ -1978,7 +1982,8 @@ sysfn_shutdown: ; 18.9 = system shutdown
exit_for_anyone: exit_for_anyone:
ret ret
uglobal uglobal
shutdown_processes: dd 0x0 shutdown_processes:
dd 0x0
endg endg
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_terminate: ; 18.2 = TERMINATE sysfn_terminate: ; 18.2 = TERMINATE
@@ -2779,7 +2784,8 @@ align 4
sys_clock: sys_clock:
cli cli
; Mikhail Lisovin xx Jan 2005 ; Mikhail Lisovin xx Jan 2005
@@: mov al, 10 @@:
mov al, 10
out 0x70, al out 0x70, al
in al, 0x71 in al, 0x71
test al, al test al, al
@@ -2816,7 +2822,8 @@ align 4
sys_date: sys_date:
cli cli
@@: mov al, 10 @@:
mov al, 10
out 0x70, al out 0x70, al
in al, 0x71 in al, 0x71
test al, al test al, al
@@ -3329,7 +3336,8 @@ delay_ms: ; delay in 1/1000 sec
mov ah, al mov ah, al
cld cld
cnt1: in al,0x61 cnt1:
in al, 0x61
and al, 0x10 and al, 0x10
cmp al, ah cmp al, ah
jz cnt1 jz cnt1
@@ -4178,7 +4186,8 @@ sys_msg_board_dword:
ret ret
uglobal uglobal
msg_board_data: times 4096 db 0 msg_board_data:
times 4096 db 0
msg_board_count dd 0x0 msg_board_count dd 0x0
endg endg

View File

@@ -67,7 +67,8 @@ uglobal
endg endg
iglobal iglobal
NumARP: dd ARP_TABLE_ENTRIES NumARP:
dd ARP_TABLE_ENTRIES
ARPTable_ptr dd ARPTable ;pointer to ARPTable ARPTable_ptr dd ARPTable ;pointer to ARPTable
endg endg

View File

@@ -344,42 +344,68 @@ end if
e3c59x_upd_buff = e3c59x_dpd_buff+(E3C59X_DPD_SIZE*E3C59X_NUM_TX_DESC) e3c59x_upd_buff = e3c59x_dpd_buff+(E3C59X_DPD_SIZE*E3C59X_NUM_TX_DESC)
uglobal uglobal
e3c59x_curr_upd: dd 0 e3c59x_curr_upd:
e3c59x_prev_dpd: dd 0 dd 0
e3c59x_prev_tx_frame: dd 0 e3c59x_prev_dpd:
e3c59x_transmit_function: dd 0 dd 0
e3c59x_receive_function: dd 0 e3c59x_prev_tx_frame:
dd 0
e3c59x_transmit_function:
dd 0
e3c59x_receive_function:
dd 0
endg endg
iglobal iglobal
e3c59x_ver_id: db 17 e3c59x_ver_id:
db 17
endg endg
uglobal uglobal
e3c59x_full_bus_master: db 0 e3c59x_full_bus_master:
e3c59x_has_hwcksm: db 0 db 0
e3c59x_preamble: db 0 e3c59x_has_hwcksm:
e3c59x_dn_list_ptr_cleared: db 0 db 0
e3c59x_self_directed_packet: rb 6 e3c59x_preamble:
db 0
e3c59x_dn_list_ptr_cleared:
db 0
e3c59x_self_directed_packet:
rb 6
endg endg
if defined E3C59X_DEBUG if defined E3C59X_DEBUG
e3c59x_hw_type_str: db "Detected hardware type : ", 0 e3c59x_hw_type_str:
e3c59x_device_str: db "Device ID : 0x" db "Detected hardware type : ", 0
e3c59x_device_id_str: db "ffff", 13, 10, 0 e3c59x_device_str:
e3c59x_vendor_str: db "Vendor ID : 0x" db "Device ID : 0x"
e3c59x_vendor_id_str: db "ffff", 13, 10, 0 e3c59x_device_id_str:
e3c59x_io_info_str: db "IO address : 0x" db "ffff", 13, 10, 0
e3c59x_io_addr_str: db "ffff", 13, 10, 0 e3c59x_vendor_str:
e3c59x_mac_info_str: db "MAC address : " db "Vendor ID : 0x"
e3c59x_mac_addr_str: db "ff:ff:ff:ff:ff:ff", 13, 10, 0 e3c59x_vendor_id_str:
e3c59x_boomerang_str: db " (boomerang)", 13, 10, 0 db "ffff", 13, 10, 0
e3c59x_vortex_str: db " (vortex)", 13, 10, 0 e3c59x_io_info_str:
e3c59x_link_type_str: db "Established link type : ", 0 db "IO address : 0x"
e3c59x_new_line_str: db 13, 10, 0 e3c59x_io_addr_str:
e3c59x_link_type: dd 0 db "ffff", 13, 10, 0
e3c59x_mac_info_str:
db "MAC address : "
e3c59x_mac_addr_str:
db "ff:ff:ff:ff:ff:ff", 13, 10, 0
e3c59x_boomerang_str:
db " (boomerang)", 13, 10, 0
e3c59x_vortex_str:
db " (vortex)", 13, 10, 0
e3c59x_link_type_str:
db "Established link type : ", 0
e3c59x_new_line_str:
db 13, 10, 0
e3c59x_link_type:
dd 0
e3c59x_charset: db '0123456789abcdef' e3c59x_charset:
db '0123456789abcdef'
strtbl e3c59x_link_str, \ strtbl e3c59x_link_str, \
"No valid link type detected", \ "No valid link type detected", \

View File

@@ -819,7 +819,8 @@ forcedeth_probe:
jz @f jz @f
and eax, PCI_BASE_ADDRESS_IO_MASK and eax, PCI_BASE_ADDRESS_IO_MASK
jmp .next jmp .next
@@: push eax @@:
push eax
and eax, PCI_BASE_ADDRESS_MEM_TYPE_MASK and eax, PCI_BASE_ADDRESS_MEM_TYPE_MASK
cmp eax, PCI_BASE_ADDRESS_MEM_TYPE_64 cmp eax, PCI_BASE_ADDRESS_MEM_TYPE_64
jne .not64 jne .not64
@@ -878,7 +879,8 @@ forcedeth_probe:
jz @f jz @f
and eax, PCI_BASE_ADDRESS_IO_MASK and eax, PCI_BASE_ADDRESS_IO_MASK
jmp .next2 jmp .next2
@@: and eax, PCI_BASE_ADDRESS_MEM_MASK @@:
and eax, PCI_BASE_ADDRESS_MEM_MASK
.next2: .next2:
; Find the lowest bit set ; Find the lowest bit set
mov ecx, eax mov ecx, eax
@@ -913,7 +915,8 @@ forcedeth_probe:
je .ver1 je .ver1
mov dword [forcedeth_desc_ver], DESC_VER_2 mov dword [forcedeth_desc_ver], DESC_VER_2
jmp @f jmp @f
.ver1: mov dword [forcedeth_desc_ver], DESC_VER_1 .ver1:
mov dword [forcedeth_desc_ver], DESC_VER_1
@@: @@:
; read the mac address ; read the mac address
; map memory ; map memory
@@ -981,7 +984,8 @@ forcedeth_probe:
jne @f jne @f
or dword [forcedeth_txflags], NV_TX_LASTPACKET1 or dword [forcedeth_txflags], NV_TX_LASTPACKET1
jmp .end_switch jmp .end_switch
@@: or dword [forcedeth_txflags], NV_TX2_LASTPACKET1 @@:
or dword [forcedeth_txflags], NV_TX2_LASTPACKET1
jmp .end_switch jmp .end_switch
.next_0x0086: .next_0x0086:

View File

@@ -50,39 +50,61 @@ rxfd_packet equ eth_data_start + 16
uglobal uglobal
eeprom_data: times 16 dd 0 eeprom_data:
times 16 dd 0
align 4 align 4
lstats: lstats:
tx_good_frames: dd 0 tx_good_frames:
tx_coll16_errs: dd 0 dd 0
tx_late_colls: dd 0 tx_coll16_errs:
tx_underruns: dd 0 dd 0
tx_lost_carrier: dd 0 tx_late_colls:
tx_deferred: dd 0 dd 0
tx_one_colls: dd 0 tx_underruns:
tx_multi_colls: dd 0 dd 0
tx_total_colls: dd 0 tx_lost_carrier:
rx_good_frames: dd 0 dd 0
rx_crc_errs: dd 0 tx_deferred:
rx_align_errs: dd 0 dd 0
rx_resource_errs: dd 0 tx_one_colls:
rx_overrun_errs: dd 0 dd 0
rx_colls_errs: dd 0 tx_multi_colls:
rx_runt_errs: dd 0 dd 0
done_marker: dd 0 tx_total_colls:
dd 0
rx_good_frames:
dd 0
rx_crc_errs:
dd 0
rx_align_errs:
dd 0
rx_resource_errs:
dd 0
rx_overrun_errs:
dd 0
rx_colls_errs:
dd 0
rx_runt_errs:
dd 0
done_marker:
dd 0
align 4 align 4
confcmd: confcmd:
confcmd_status: dw 0 confcmd_status:
confcmd_command: dw 0 dw 0
confcmd_link: dd 0 confcmd_command:
dw 0
confcmd_link:
dd 0
endg endg
iglobal iglobal
confcmd_data: db 22, 0x08, 0, 0, 0, 0x80, 0x32, 0x03, 1 confcmd_data:
db 22, 0x08, 0, 0, 0, 0x80, 0x32, 0x03, 1
db 0, 0x2e, 0, 0x60, 0, 0xf2, 0x48, 0, 0x40, 0xf2 db 0, 0x2e, 0, 0x60, 0, 0xf2, 0x48, 0, 0x40, 0xf2
db 0x80, 0x3f, 0x05 db 0x80, 0x3f, 0x05
endg endg
@@ -91,22 +113,34 @@ uglobal
align 4 align 4
txfd: txfd:
txfd_status: dw 0 txfd_status:
txfd_command: dw 0 dw 0
txfd_link: dd 0 txfd_command:
txfd_tx_desc_addr: dd 0 dw 0
txfd_count: dd 0 txfd_link:
txfd_tx_buf_addr0: dd 0 dd 0
txfd_tx_buf_size0: dd 0 txfd_tx_desc_addr:
txfd_tx_buf_addr1: dd 0 dd 0
txfd_tx_buf_size1: dd 0 txfd_count:
dd 0
txfd_tx_buf_addr0:
dd 0
txfd_tx_buf_size0:
dd 0
txfd_tx_buf_addr1:
dd 0
txfd_tx_buf_size1:
dd 0
align 4 align 4
hdr: hdr:
hdr_dst_addr: times 6 db 0 hdr_dst_addr:
hdr_src_addr: times 6 db 0 times 6 db 0
hdr_type: dw 0 hdr_src_addr:
times 6 db 0
hdr_type:
dw 0
endg endg

View File

@@ -143,29 +143,46 @@ MEM_32768 equ 128
ISA_MAX_ADDR equ 0x400 ISA_MAX_ADDR equ 0x400
uglobal uglobal
eth_flags: db 0 eth_flags:
eth_vendor: db 0 db 0
eth_nic_base: dw 0 eth_vendor:
eth_asic_base: dw 0 db 0
eth_memsize: db 0 eth_nic_base:
eth_rx_start: db 0 dw 0
eth_tx_start: db 0 eth_asic_base:
eth_bmem: dd 0 dw 0
eth_rmem: dd 0 eth_memsize:
romdata: db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 db 0
eth_rx_start:
db 0
eth_tx_start:
db 0
eth_bmem:
dd 0
eth_rmem:
dd 0
romdata:
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
endg endg
iglobal iglobal
test_data: db 'NE*000 memory',0 test_data:
test_buffer: db ' ',0 db 'NE*000 memory',0
test_buffer:
db ' ',0
endg endg
uglobal uglobal
eth_type: dw 0 eth_type:
pkthdr: db 0,0,0,0 ; status, next, (short) len dw 0
pktoff: dw 0 pkthdr:
eth_rx_data_ptr: dd 0 db 0,0,0,0 ; status, next, (short) len
eth_tmp_len: dw 0 pktoff:
dw 0
eth_rx_data_ptr:
dd 0
eth_tmp_len:
dw 0
endg endg

View File

@@ -183,18 +183,21 @@ rtl8139_tx_buff equ rtl8139_rx_buff + (RTL8139_RX_BUFFER_SIZE + MAX_ETH_
uglobal uglobal
align 4 align 4
rtl8139_rx_buff_offset: dd 0 rtl8139_rx_buff_offset:
dd 0
curr_tx_desc dd 0 curr_tx_desc dd 0
endg endg
iglobal iglobal
hw_ver_array: db VER_RTL8139, VER_RTL8139A, VER_RTL8139B, VER_RTL8139C hw_ver_array:
db VER_RTL8139, VER_RTL8139A, VER_RTL8139B, VER_RTL8139C
db VER_RTL8100, VER_RTL8139D, VER_RTL8139CP, VER_RTL8101 db VER_RTL8100, VER_RTL8139D, VER_RTL8139CP, VER_RTL8101
HW_VER_ARRAY_SIZE = $-hw_ver_array HW_VER_ARRAY_SIZE = $-hw_ver_array
endg endg
uglobal uglobal
hw_ver_id: db 0 hw_ver_id:
db 0
endg endg
;*************************************************************************** ;***************************************************************************

View File

@@ -550,7 +550,8 @@ proc pci_bar_start,index:dword
jz @f jz @f
and eax, PCI_BASE_ADDRESS_IO_MASK and eax, PCI_BASE_ADDRESS_IO_MASK
jmp .exit jmp .exit
@@: push eax @@:
push eax
and eax, PCI_BASE_ADDRESS_MEM_TYPE_MASK and eax, PCI_BASE_ADDRESS_MEM_TYPE_MASK
cmp eax, PCI_BASE_ADDRESS_MEM_TYPE_64 cmp eax, PCI_BASE_ADDRESS_MEM_TYPE_64
jne .not64 jne .not64
@@ -583,7 +584,8 @@ proc rtl8169_init_board
; Check that the chip has finished the reset ; Check that the chip has finished the reset
mov ecx, 1000 mov ecx, 1000
@@: RTL_R8 RTL8169_REG_ChipCmd @@:
RTL_R8 RTL8169_REG_ChipCmd
test al, RTL8169_CMD_Reset test al, RTL8169_CMD_Reset
jz @f jz @f
stdcall udelay, 10 stdcall udelay, 10
@@ -594,7 +596,8 @@ proc rtl8169_init_board
and eax, 0x7c800000 and eax, 0x7c800000
; DEBUGF 1,"K : rtl8169_init_board: TxConfig & 0x7c800000 = 0x%x\n",eax ; DEBUGF 1,"K : rtl8169_init_board: TxConfig & 0x7c800000 = 0x%x\n",eax
mov esi, mac_info-8 mov esi, mac_info-8
@@: add esi,8 @@:
add esi, 8
mov ecx, eax mov ecx, eax
and ecx, [esi] and ecx, [esi]
cmp ecx, [esi] cmp ecx, [esi]
@@ -609,7 +612,8 @@ proc rtl8169_init_board
jnz @f jnz @f
mov [rtl8169_tpc.pcfg], PCFG_METHOD_1 mov [rtl8169_tpc.pcfg], PCFG_METHOD_1
jmp .pconf jmp .pconf
@@: dec al @@:
dec al
jnz .pconf jnz .pconf
mov [rtl8169_tpc.pcfg], PCFG_METHOD_2 mov [rtl8169_tpc.pcfg], PCFG_METHOD_2
.pconf: .pconf:
@@ -617,7 +621,8 @@ proc rtl8169_init_board
; identify chip attached to board ; identify chip attached to board
mov ecx, 10 mov ecx, 10
mov eax, [rtl8169_tpc.mcfg] mov eax, [rtl8169_tpc.mcfg]
@@: dec ecx @@:
dec ecx
js @f js @f
cmp eax, [rtl_chip_info+ecx*8] cmp eax, [rtl_chip_info+ecx*8]
jne @b jne @b
@@ -661,7 +666,8 @@ proc rtl8169_hw_PHY_config
je @f je @f
cmp [rtl8169_tpc.mcfg], MCFG_METHOD_03 cmp [rtl8169_tpc.mcfg], MCFG_METHOD_03
jne .not_2_or_3 jne .not_2_or_3
@@: stdcall RTL8169_WRITE_GMII_REG,0x1F,0x0001 @@:
stdcall RTL8169_WRITE_GMII_REG, 0x1F, 0x0001
stdcall RTL8169_WRITE_GMII_REG, 0x15, 0x1000 stdcall RTL8169_WRITE_GMII_REG, 0x15, 0x1000
stdcall RTL8169_WRITE_GMII_REG, 0x18, 0x65C7 stdcall RTL8169_WRITE_GMII_REG, 0x18, 0x65C7
stdcall RTL8169_WRITE_GMII_REG, 0x04, 0x0000 stdcall RTL8169_WRITE_GMII_REG, 0x04, 0x0000
@@ -727,7 +733,8 @@ proc RTL8169_WRITE_GMII_REG,RegAddr:byte,value:dword
mov ecx, 2000 mov ecx, 2000
; Check if the RTL8169 has completed writing to the specified MII register ; Check if the RTL8169 has completed writing to the specified MII register
@@: RTL_R32 RTL8169_REG_PHYAR @@:
RTL_R32 RTL8169_REG_PHYAR
test eax, 0x80000000 test eax, 0x80000000
jz .exit jz .exit
stdcall udelay, 1 ;;;100 stdcall udelay, 1 ;;;100
@@ -749,7 +756,8 @@ proc RTL8169_READ_GMII_REG,RegAddr:byte
mov ecx, 2000 mov ecx, 2000
; Check if the RTL8169 has completed retrieving data from the specified MII register ; Check if the RTL8169 has completed retrieving data from the specified MII register
@@: RTL_R32 RTL8169_REG_PHYAR @@:
RTL_R32 RTL8169_REG_PHYAR
test eax, 0x80000000 test eax, 0x80000000
jnz .exit jnz .exit
stdcall udelay, 1 ;;;100 stdcall udelay, 1 ;;;100
@@ -802,7 +810,8 @@ proc rtl8169_init_ring
mov edi, rtl8169_tpc.Tx_skbuff mov edi, rtl8169_tpc.Tx_skbuff
mov eax, rtl8169_txb mov eax, rtl8169_txb
mov ecx, NUM_TX_DESC mov ecx, NUM_TX_DESC
@@: stosd @@:
stosd
inc eax ; add eax,RX_BUF_SIZE ??? inc eax ; add eax,RX_BUF_SIZE ???
loop @b loop @b
@@ -818,7 +827,8 @@ proc rtl8169_init_ring
mov edi, [rtl8169_tpc.RxDescArray] mov edi, [rtl8169_tpc.RxDescArray]
mov eax, rtl8169_rxb mov eax, rtl8169_rxb
mov ecx, NUM_RX_DESC mov ecx, NUM_RX_DESC
@@: mov [esi],eax @@:
mov [esi], eax
mov [edi+rtl8169_RxDesc.buf_addr], eax mov [edi+rtl8169_RxDesc.buf_addr], eax
sub [edi+rtl8169_RxDesc.buf_addr], OS_BASE ; shurf 28.09.2008 sub [edi+rtl8169_RxDesc.buf_addr], OS_BASE ; shurf 28.09.2008
mov [edi+rtl8169_RxDesc.status], RTL8169_DSB_OWNbit or RX_BUF_SIZE mov [edi+rtl8169_RxDesc.status], RTL8169_DSB_OWNbit or RX_BUF_SIZE
@@ -840,7 +850,8 @@ proc rtl8169_hw_start
RTL_W8 RTL8169_REG_ChipCmd,RTL8169_CMD_Reset RTL_W8 RTL8169_REG_ChipCmd,RTL8169_CMD_Reset
; Check that the chip has finished the reset ; Check that the chip has finished the reset
mov ecx, 1000 mov ecx, 1000
@@: RTL_R8 RTL8169_REG_ChipCmd @@:
RTL_R8 RTL8169_REG_ChipCmd
and al, RTL8169_CMD_Reset and al, RTL8169_CMD_Reset
jz @f jz @f
stdcall udelay, 10 stdcall udelay, 10
@@ -872,7 +883,8 @@ proc rtl8169_hw_start
; DEBUGF 1,"K : Set MAC Reg C+CR Offset 0xE0: bit-3 and bit-14\n" ; DEBUGF 1,"K : Set MAC Reg C+CR Offset 0xE0: bit-3 and bit-14\n"
jmp .set jmp .set
@@:;DEBUGF 1,"K : Set MAC Reg C+CR Offset 0xE0: bit-3\n" @@:;DEBUGF 1,"K : Set MAC Reg C+CR Offset 0xE0: bit-3\n"
.set: RTL_W16 RTL8169_REG_CPlusCmd,ax .set:
RTL_W16 RTL8169_REG_CPlusCmd,ax
; RTL_W16 0xE2,0x1517 ; RTL_W16 0xE2,0x1517
; RTL_W16 0xE2,0x152a ; RTL_W16 0xE2,0x152a
@@ -929,7 +941,8 @@ proc rtl8169_probe
add edx, RTL8169_REG_MAC0 add edx, RTL8169_REG_MAC0
xor ebx, ebx xor ebx, ebx
; Get MAC address. FIXME: read EEPROM ; Get MAC address. FIXME: read EEPROM
@@: RTL_R8 dx @@:
RTL_R8 dx
mov [node_addr+ebx], al mov [node_addr+ebx], al
inc edx inc edx
inc ebx inc ebx
@@ -969,7 +982,8 @@ proc rtl8169_probe
stdcall udelay, 100 stdcall udelay, 100
mov ecx, 10000 mov ecx, 10000
; wait for auto-negotiation process ; wait for auto-negotiation process
@@: dec ecx @@:
dec ecx
jz @f jz @f
stdcall RTL8169_READ_GMII_REG, RTL8169_PHY_STAT_REG stdcall RTL8169_READ_GMII_REG, RTL8169_PHY_STAT_REG
stdcall udelay, 100 stdcall udelay, 100
@@ -1081,12 +1095,14 @@ proc rtl8169_transmit
and ecx, 0x0FFF and ecx, 0x0FFF
xor al, al xor al, al
add edi, ecx add edi, ecx
@@: cmp ecx,ETH_ZLEN @@:
cmp ecx, ETH_ZLEN
jae @f jae @f
stosb stosb
inc ecx inc ecx
jmp @b jmp @b
@@: pop eax @@:
pop eax
mov ebx, eax mov ebx, eax
mov eax, sizeof.rtl8169_TxDesc mov eax, sizeof.rtl8169_TxDesc
@@ -1100,11 +1116,13 @@ proc rtl8169_transmit
cmp eax, ETH_ZLEN cmp eax, ETH_ZLEN
jae @f jae @f
mov eax, ETH_ZLEN mov eax, ETH_ZLEN
@@: or eax,RTL8169_DSB_OWNbit or RTL8169_DSB_FSbit or RTL8169_DSB_LSbit @@:
or eax, RTL8169_DSB_OWNbit or RTL8169_DSB_FSbit or RTL8169_DSB_LSbit
cmp [rtl8169_tpc.cur_tx], NUM_TX_DESC - 1 cmp [rtl8169_tpc.cur_tx], NUM_TX_DESC - 1
jne @f jne @f
or eax, RTL8169_DSB_EORbit or eax, RTL8169_DSB_EORbit
@@: mov [ebx + rtl8169_TxDesc.status],eax @@:
mov [ebx + rtl8169_TxDesc.status], eax
RTL_W8 RTL8169_REG_TxPoll,0x40 ; set polling bit RTL_W8 RTL8169_REG_TxPoll,0x40 ; set polling bit
@@ -1114,7 +1132,8 @@ proc rtl8169_transmit
;!!! to = currticks() + TX_TIMEOUT; ;!!! to = currticks() + TX_TIMEOUT;
;!!! while ((tpc->TxDescArray[entry].status & OWNbit) && (currticks() < to)); /* wait */ ;!!! while ((tpc->TxDescArray[entry].status & OWNbit) && (currticks() < to)); /* wait */
mov ecx, TX_TIMEOUT / 10 mov ecx, TX_TIMEOUT / 10
@@: test [ebx + rtl8169_TxDesc.status],RTL8169_DSB_OWNbit @@:
test [ebx + rtl8169_TxDesc.status], RTL8169_DSB_OWNbit
jnz @f jnz @f
stdcall udelay, 10 stdcall udelay, 10
loop @b loop @b
@@ -1195,7 +1214,8 @@ proc rtl8169_poll
cmp [rtl8169_tpc.cur_rx], NUM_RX_DESC - 1 cmp [rtl8169_tpc.cur_rx], NUM_RX_DESC - 1
jne @f jne @f
or eax, RTL8169_DSB_EORbit or eax, RTL8169_DSB_EORbit
@@: mov [ebx + rtl8169_RxDesc.status],eax @@:
mov [ebx + rtl8169_RxDesc.status], eax
mov [ebx + rtl8169_RxDesc.buf_addr], edx mov [ebx + rtl8169_RxDesc.buf_addr], edx
sub [ebx + rtl8169_RxDesc.buf_addr], OS_BASE ; shurf 28.09.2008 sub [ebx + rtl8169_RxDesc.buf_addr], OS_BASE ; shurf 28.09.2008

View File

@@ -80,8 +80,10 @@ TX_BUFF_SZ equ 1516 ;* Buffer size for each Tx buffer *
uglobal uglobal
align 4 align 4
txd: times (3 * NUM_TX_DESC) dd 0 txd:
rxd: times (3 * NUM_RX_DESC) dd 0 times (3 * NUM_TX_DESC) dd 0
rxd:
times (3 * NUM_RX_DESC) dd 0
endg endg
txb equ eth_data_start txb equ eth_data_start
@@ -218,7 +220,8 @@ SIS900_RFADDR_shift equ 16
SIS900_EEDONE equ 0x00000200 SIS900_EEDONE equ 0x00000200
SIS900_EEGNT equ 0x00000100 SIS900_EEGNT equ 0x00000100
;General Varibles ;General Varibles
SIS900_pci_revision: db 0 SIS900_pci_revision:
db 0
SIS900_Status dd 0x03000000 SIS900_Status dd 0x03000000
sis900_specific_table: sis900_specific_table:
; dd SIS630A_900_REV,Get_Mac_SIS630A_900_REV,0 ; dd SIS630A_900_REV,Get_Mac_SIS630A_900_REV,0
@@ -230,9 +233,12 @@ sis900_specific_table:
dd SIS900_960_REV,SIS960_get_mac_addr,0 dd SIS900_960_REV,SIS960_get_mac_addr,0
dd SIS900B_900_REV,SIS900_get_mac_addr,0 dd SIS900B_900_REV,SIS900_get_mac_addr,0
dd 0,0,0,0 ; end of list dd 0,0,0,0 ; end of list
sis900_get_mac_func: dd 0 sis900_get_mac_func:
sis900_special_func: dd 0 dd 0
sis900_table_entries: db 8 sis900_special_func:
dd 0
sis900_table_entries:
db 8
;*************************************************************************** ;***************************************************************************
; Function ; Function
@@ -567,7 +573,8 @@ SIS900_set_tx_mode:
;* 0x00600000 = 128 bytes ;* 0x00600000 = 128 bytes
;* 0x00700000 = 256 bytes ;* 0x00700000 = 256 bytes
;*************************************************************************** ;***************************************************************************
SIS900_mc_filter: times 16 dw 0 SIS900_mc_filter:
times 16 dw 0
SIS900_set_rx_mode: SIS900_set_rx_mode:
mov ebp, [io_addr] mov ebp, [io_addr]
;**************update Multicast Hash Table in Receive Filter ;**************update Multicast Hash Table in Receive Filter
@@ -1081,7 +1088,8 @@ if defined SIS900_DEBUG
SIS900_Char_String db '0','1','2','3','4','5','6','7','8','9' SIS900_Char_String db '0','1','2','3','4','5','6','7','8','9'
db 'A','B','C','D','E','F' db 'A','B','C','D','E','F'
Mac_str_build: times 20 db 0 Mac_str_build:
times 20 db 0
Create_Mac_String: Create_Mac_String:
pusha pusha
xor ecx, ecx xor ecx, ecx

View File

@@ -243,31 +243,49 @@ endg
uglobal uglobal
;Net-stack's interface's settings ;Net-stack's interface's settings
node_addr: db 0,0,0,0,0,0 node_addr:
gateway_ip: dd 0 db 0,0,0,0,0,0
dns_ip: dd 0 gateway_ip:
dd 0
dns_ip:
dd 0
eth_rx_data_len: dw 0 eth_rx_data_len:
eth_status: dd 0 dw 0
io_addr: dd 0 eth_status:
hdrtype: db 0 dd 0
vendor_device: dd 0 io_addr:
pci_data: dd 0 dd 0
pci_dev: dd 0 hdrtype:
pci_bus: dd 0 db 0
vendor_device:
dd 0
pci_data:
dd 0
pci_dev:
dd 0
pci_bus:
dd 0
; These will hold pointers to the selected driver functions ; These will hold pointers to the selected driver functions
drvr_probe: dd 0 drvr_probe:
drvr_reset: dd 0 dd 0
drvr_poll: dd 0 drvr_reset:
drvr_transmit: dd 0 dd 0
drvr_cable: dd 0 drvr_poll:
dd 0
drvr_transmit:
dd 0
drvr_cable:
dd 0
endg endg
iglobal iglobal
broadcast_add: db 0xff,0xff,0xff,0xff,0xff,0xff broadcast_add:
subnet_mask: dd 0x00ffffff ; 255.255.255.0 db 0xff,0xff,0xff,0xff,0xff,0xff
subnet_mask:
dd 0x00ffffff ; 255.255.255.0
endg endg
include "arp.inc" ;arp-protocol functions include "arp.inc" ;arp-protocol functions

View File

@@ -473,7 +473,8 @@ local sockAddr dd ?
cmp esi, SOCKET_PASSIVE cmp esi, SOCKET_PASSIVE
je @f je @f
mov ebx, TCB_SYN_SENT mov ebx, TCB_SYN_SENT
@@: mov [eax + SOCKET.TCBState], ebx ; Indicate the state of the TCB @@:
mov [eax + SOCKET.TCBState], ebx ; Indicate the state of the TCB
cmp ebx, TCB_LISTEN cmp ebx, TCB_LISTEN
je .exit je .exit
@@ -570,7 +571,8 @@ local sockAddr dd ?
add esi, 8 add esi, 8
jmp .next_resendq jmp .next_resendq
@@: mov dword[esi + 4], 0 @@:
mov dword[esi + 4], 0
inc ecx inc ecx
add esi, 8 add esi, 8
jmp .next_resendq jmp .next_resendq
@@ -961,7 +963,8 @@ proc socket_write stdcall
jnz @f jnz @f
mov ax, 0xffff mov ax, 0xffff
@@: xchg al, ah @@:
xchg al, ah
mov [edx + 20 + UDP_PACKET.Checksum], ax mov [edx + 20 + UDP_PACKET.Checksum], ax
; Fill in the IP header checksum ; Fill in the IP header checksum
@@ -1079,7 +1082,8 @@ local sockAddr dd ?
add esi, 8 add esi, 8
jmp .next_resendq jmp .next_resendq
@@: push ebx @@:
push ebx
; OK, we have a buffer descriptor ptr in esi. ; OK, we have a buffer descriptor ptr in esi.
; resend entry # in ecx ; resend entry # in ecx
@@ -1098,7 +1102,8 @@ local sockAddr dd ?
; Now get buffer location, and copy buffer across. argh! more copying,, ; Now get buffer location, and copy buffer across. argh! more copying,,
mov edi, resendBuffer - IPBUFFSIZE mov edi, resendBuffer - IPBUFFSIZE
@@: add edi, IPBUFFSIZE @@:
add edi, IPBUFFSIZE
loop @b loop @b
; we have dest buffer location in edi ; we have dest buffer location in edi

View File

@@ -36,10 +36,14 @@ $Revision$
uglobal uglobal
StackCounters: StackCounters:
dumped_rx_count dd 0 dumped_rx_count dd 0
arp_tx_count: dd 0 arp_tx_count:
arp_rx_count: dd 0 dd 0
ip_rx_count: dd 0 arp_rx_count:
ip_tx_count: dd 0 dd 0
ip_rx_count:
dd 0
ip_tx_count:
dd 0
endg endg
; socket buffers ; socket buffers

View File

@@ -669,7 +669,8 @@ proc tcpStateMachine stdcall, sockAddr:DWORD
add esi, 8 add esi, 8
jmp .next_resendq jmp .next_resendq
@@: mov dword[esi + 4], 0 @@:
mov dword[esi + 4], 0
inc ecx inc ecx
add esi, 8 add esi, 8
jmp .next_resendq jmp .next_resendq
@@ -911,7 +912,8 @@ proc stateTCB_ESTABLISHED stdcall, sockAddr:DWORD
add esi, 8 add esi, 8
jmp .next_resendq jmp .next_resendq
@@: mov dword[esi + 4], 0 @@:
mov dword[esi + 4], 0
inc ecx inc ecx
add esi, 8 add esi, 8
jmp .next_resendq jmp .next_resendq
@@ -1052,12 +1054,14 @@ proc stateTCB_FIN_WAIT_1 stdcall, sockAddr:DWORD
mov [ebx + SOCKET.TCBState], TCB_FIN_WAIT_2 mov [ebx + SOCKET.TCBState], TCB_FIN_WAIT_2
jmp .exit jmp .exit
@@: mov [ebx + SOCKET.TCBState], TCB_CLOSING @@:
mov [ebx + SOCKET.TCBState], TCB_CLOSING
cmp al, TH_FIN cmp al, TH_FIN
je @f je @f
mov [ebx + SOCKET.TCBState], TCB_TIMED_WAIT mov [ebx + SOCKET.TCBState], TCB_TIMED_WAIT
@@: lea esi, [ebx + SOCKET.RCV_NXT] @@:
lea esi, [ebx + SOCKET.RCV_NXT]
call inc_inet_esi call inc_inet_esi
; Send an ACK ; Send an ACK

View File

@@ -47,7 +47,8 @@
mov si, load_question + 100h - 600h mov si, load_question + 100h - 600h
call out_string call out_string
; mov si, answer + 100h - 0600h ; already is ; mov si, answer + 100h - 0600h ; already is
xxy: mov ah, 0 xxy:
mov ah, 0
int 16h int 16h
or al, 20h or al, 20h
mov [si], al mov [si], al
@@ -904,7 +905,8 @@ cur_chunk_ptr dw ?
rootcache_size dw ? ; must be immediately before foldcache_clus rootcache_size dw ? ; must be immediately before foldcache_clus
if $-dat >= 0x80 if $-dat >= 0x80
warning: unoptimal data displacement! warning:
unoptimal data displacement!
end if end if
foldcache_clus rd 7 foldcache_clus rd 7
foldcache_mark rw 7 foldcache_mark rw 7
@@ -912,7 +914,8 @@ foldcache_size rw 7
fat_filename rb 11 fat_filename rb 11
if $ > 2000h if $ > 2000h
error: file is too big error:
file is too big
end if end if
; for NT/2k/XP, file must be 16 sectors = 0x2000 bytes long ; for NT/2k/XP, file must be 16 sectors = 0x2000 bytes long

View File

@@ -663,5 +663,6 @@ foldcache_mark rw 7
foldcache_size rw 7 foldcache_size rw 7
filename rb 11 filename rb 11
if $ > 0x8200 if $ > 0x8200
error: table overwritten error:
table overwritten
end if end if

View File

@@ -82,7 +82,8 @@ findir id
macro stof id, name macro stof id, name
{ {
id#_base: file name id#_base:
file name
id#_size=$-id#_base id#_size=$-id#_base
reset id reset id
} }

View File

@@ -35,7 +35,8 @@ cur_line_pos = 75
; store byte ' ' at d80x25_top+cur_line_pos ; store byte ' ' at d80x25_top+cur_line_pos
; store dword ' SVN' at d80x25_top+cur_line_pos-4 ; store dword ' SVN' at d80x25_top+cur_line_pos-4
space_msg: line_space space_msg:
line_space
;verstr: ;verstr:
; line_space ; line_space
; version string ; version string

View File

@@ -93,7 +93,8 @@ int2str:
push edx push edx
call int2str call int2str
pop eax pop eax
@@: or al,0x30 @@:
or al, 0x30
mov [ds:di], al mov [ds:di], al
inc di inc di
ret ret
@@ -106,7 +107,8 @@ int2strnz:
push edx push edx
call int2strnz call int2strnz
pop eax pop eax
@@: or al,0x30 @@:
or al, 0x30
mov [es:di], al mov [es:di], al
inc di inc di
ret ret
@@ -243,7 +245,8 @@ calc_vmodes_table:
jb .lp1 jb .lp1
or cx, 0x4000 ; use LFB or cx, 0x4000 ; use LFB
.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 ; size of record add bx, size_of_step ; size of record
@@ -402,7 +405,8 @@ check_first_parm:
mov ecx, long_v_table mov ecx, long_v_table
.loop: add ax,size_of_step .loop:
add ax, size_of_step
cmp ax, word [end_cursor] cmp ax, word [end_cursor]
jae .next_step jae .next_step
loop .loop loop .loop
@@ -435,13 +439,16 @@ check_first_parm:
je .ok je .ok
cmp word [es:si+8], 24 cmp word [es:si+8], 24
je .ok je .ok
.next: add si,size_of_step .next:
add si, size_of_step
cmp word [es:si], -1 cmp word [es:si], -1
je .exit je .exit
jmp .loops jmp .loops
.ok: xor ax,ax .ok:
xor ax, ax
ret ret
.exit: or ax,-1 .exit:
or ax, -1
ret ret
@@ -484,7 +491,8 @@ draw_vmodes_table:
jmp .ok jmp .ok
.low: sub cx,size_of_step .low:
sub cx, size_of_step
cmp cx, modes_table cmp cx, modes_table
jb .ok jb .ok
push cx push cx

View File

@@ -455,14 +455,16 @@ cfgmanager:
sub word [cursor_pos], size_of_step sub word [cursor_pos], size_of_step
jmp .loops jmp .loops
.down: cmp ah,0x50;x,0x50E0 ; down .down:
cmp ah, 0x50;x,0x50E0 ; down
jne .pgup jne .pgup
cmp word[es:si+10], -1 cmp word[es:si+10], -1
je .loops je .loops
add word [cursor_pos], size_of_step add word [cursor_pos], size_of_step
jmp .loops jmp .loops
.pgup: cmp ah,0x49 ; page up .pgup:
cmp ah, 0x49 ; page up
jne .pgdn jne .pgdn
sub si, size_of_step*long_v_table sub si, size_of_step*long_v_table
cmp si, modes_table cmp si, modes_table
@@ -479,7 +481,8 @@ cfgmanager:
mov word [home_cursor], si mov word [home_cursor], si
jmp .loops jmp .loops
.pgdn: cmp ah,0x51 ; page down .pgdn:
cmp ah, 0x51 ; page down
jne .enter jne .enter
mov ax, [end_cursor] mov ax, [end_cursor]
add si, size_of_step*long_v_table add si, size_of_step*long_v_table
@@ -499,7 +502,8 @@ cfgmanager:
mov word [home_cursor], si mov word [home_cursor], si
jmp .loops jmp .loops
.enter: cmp al,0x0D;x,0x1C0D ; enter .enter:
cmp al, 0x0D;x,0x1C0D ; enter
jne .loops jne .loops
push word [cursor_pos] push word [cursor_pos]
pop bp pop bp
@@ -535,7 +539,8 @@ cfgmanager:
popf popf
jz @f jz @f
mov si, off_msg mov si, off_msg
@@: jmp printplain @@:
jmp printplain
; novesa and vervesa strings are not used at the moment of executing this code ; novesa and vervesa strings are not used at the moment of executing this code
virtual at novesa virtual at novesa
.oldtimer dd ? .oldtimer dd ?
@@ -576,7 +581,8 @@ if lang eq ru
mov cl, '<27>' mov cl, '<27>'
jz @f jz @f
mov cl, '<27>' mov cl, '<27>'
@@: mov [time_str+9], cl @@:
mov [time_str+9], cl
else if lang eq et else if lang eq et
cmp al, 1 cmp al, 1
ja @f ja @f
@@ -589,7 +595,8 @@ else
mov cl, 's' mov cl, 's'
ja @f ja @f
mov cl, ' ' mov cl, ' '
@@: mov [time_str+9], cl @@:
mov [time_str+9], cl
end if end if
add al, '0' add al, '0'
mov [time_str+1], al mov [time_str+1], al

View File

@@ -219,7 +219,8 @@ clear_timer_msg
mov point_default, ax mov point_default, ax
jmp .show_active_cursor jmp .show_active_cursor
@@: call find_next_sect @@:
call find_next_sect
jmp .show_all_scr jmp .show_all_scr
.pgup: .pgup:
@@ -624,7 +625,8 @@ local .show_mess_prev_eq
push di push di
xor ax, ax xor ax, ax
@@: mov cx,38 @@:
mov cx, 38
push di push di
rep stosw rep stosw
pop di pop di
@@ -637,7 +639,8 @@ local .show_mess_prev_eq
dec bx dec bx
jnz @b jnz @b
@@: pop di @@:
pop di
;enter in mess ;enter in mess
.show_mess_prev_eq: .show_mess_prev_eq:
lodsb lodsb

View File

@@ -135,7 +135,8 @@ local .found_end_str
mov word [es:di-4], ax mov word [es:di-4], ax
mov word [es:di-2], 16 ;<EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD> =64 <EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> mov word [es:di-2], 16 ;<EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD> =64 <EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@: mov al,byte [es:di] @@:
mov al, byte [es:di]
cmp al, ' ' cmp al, ' '
jz .found_end_str jz .found_end_str
cmp al, 0xa cmp al, 0xa
@@ -280,7 +281,8 @@ local ._end_parse_RS
;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
xor bx, bx xor bx, bx
mov cx, 5 mov cx, 5
@@: mov al,byte [es:di] @@:
mov al, byte [es:di]
cmp al, '0' cmp al, '0'
jb .CS jb .CS
cmp al, '9' cmp al, '9'
@@ -494,9 +496,11 @@ use_RamdiskSector ;
test ax, ax test ax, ax
jnz @f ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ... jnz @f ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ...
.RS1: mov word [fat12_buffer.BPB_BytsPerSec],512 .RS1:
mov word [fat12_buffer.BPB_BytsPerSec], 512
;;;;;;;;;;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>... ;;;;;;;;;;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...
@@: mov word [fat12_buffer.BPB_BytsPerSec],ax ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> @@:
mov word [fat12_buffer.BPB_BytsPerSec], ax;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
;BPB_SecPerClus <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;BPB_SecPerClus <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
use_RamdiskCluster ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> al use_RamdiskCluster ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> al
@@ -758,7 +762,8 @@ macro use_RamdiskSector
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
xor bx, bx xor bx, bx
mov cx, 4 mov cx, 4
@@: movzx ax,byte [es:di] @@:
movzx ax, byte [es:di]
cmp al, '0' cmp al, '0'
jb .end_RamdiskSector jb .end_RamdiskSector
cmp al, '9' cmp al, '9'
@@ -852,7 +857,8 @@ macro use_RamdiskCluster
inc cx inc cx
dec di dec di
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@: movzx ax,byte [es:di] @@:
movzx ax, byte [es:di]
cmp al, '0' cmp al, '0'
jb .end_RamdiskCluster jb .end_RamdiskCluster
cmp al, '9' cmp al, '9'
@@ -955,7 +961,8 @@ local .found_end_str
mov word [es:di-4], ax mov word [es:di-4], ax
mov word [es:di-2], 16 ;<EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD> =64 <EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> mov word [es:di-2], 16 ;<EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD> =64 <EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@: mov al,byte [es:di] @@:
mov al, byte [es:di]
cmp al, ' ' cmp al, ' '
jz .found_end_str jz .found_end_str
cmp al, 0xa cmp al, 0xa
@@ -1089,7 +1096,8 @@ local .error
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2 word ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2 word
; ;
@@: mov al,byte [es:di] @@:
mov al, byte [es:di]
cmp al, ',' ; <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> cmp al, ',' ; <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jz .found_end_str jz .found_end_str
inc di inc di
@@ -1430,7 +1438,8 @@ end if
mov si, shot_name_fat mov si, shot_name_fat
mov cx, 11 mov cx, 11
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
@@: lodsb @@:
lodsb
stosb stosb
loop @b loop @b
@@ -1489,7 +1498,8 @@ end if
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
mov ebx, save_file_size ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> mov ebx, save_file_size ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@: sub ebx,eax @@:
sub ebx, eax
cmp ebx, eax cmp ebx, eax
jbe .eof_file jbe .eof_file
@@ -1510,7 +1520,8 @@ end if
add cx, ax add cx, ax
jmp @b jmp @b
.step2: and cx,0x0FFF .step2:
and cx, 0x0FFF
mov word[es:si], cx mov word[es:si], cx
inc si inc si
add cx, ax add cx, ax
@@ -1524,10 +1535,12 @@ end if
mov word[es:si], cx mov word[es:si], cx
jmp .end jmp .end
.step3: and cx,0x0FFF .step3:
and cx, 0x0FFF
mov word[es:si], cx mov word[es:si], cx
.end: inc point_next_fat_str .end:
inc point_next_fat_str
pop di pop di
;DIR_FileSize 32-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DWORD <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. ;DIR_FileSize 32-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DWORD <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
@@ -1549,7 +1562,8 @@ if DEBUG
mov cx, 11 mov cx, 11
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
@@: mov al,byte [es:di] @@:
mov al, byte [es:di]
inc di inc di
mov byte [ds:si], al mov byte [ds:si], al
inc si inc si
@@ -1776,7 +1790,8 @@ if DEBUG
lea si, [check_name_fat_msg_y] lea si, [check_name_fat_msg_y]
call printplain call printplain
lea si, [alarm_msg] lea si, [alarm_msg]
@@: call printplain @@:
call printplain
popad popad
end if end if
@@ -1883,23 +1898,28 @@ local .st5
jbe .st2_l jbe .st2_l
xor al, 0x20;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> xor al, 0x20;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.st2_l: mov byte [si],al .st2_l:
mov byte [si], al
inc di inc di
inc si inc si
; dec cx ; dec cx
; jnz @b ; jnz @b
loop @b loop @b
.st5: xor ax,ax .st5:
xor ax, ax
jmp @f jmp @f
;;;;;;;;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;;;;;;;;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.st4_s: mov al,' ' .st4_s:
.st4: mov byte [si],al mov al, ' '
.st4:
mov byte [si], al
inc si inc si
loop .st4 loop .st4
jmp .st5 jmp .st5
.error: or ax,-1 .error:
or ax, -1
@@: @@:
if DEBUG if DEBUG
@@ -1909,7 +1929,8 @@ if DEBUG
test ax, ax test ax, ax
jz @f jz @f
mov si, convertion_file_name_msg_n mov si, convertion_file_name_msg_n
@@: call printplain @@:
call printplain
mov si, shot_name_fat mov si, shot_name_fat
mov byte [si+12], 0 mov byte [si+12], 0
@@ -1971,7 +1992,8 @@ end if
mov dl, 0x10 mov dl, 0x10
@@: cmp eax,0x00010000 @@:
cmp eax, 0x00010000
jb @f jb @f
sub eax, 0x00010000 sub eax, 0x00010000
@@ -1979,7 +2001,8 @@ end if
jmp @b jmp @b
@@: mov byte [si+8*3+3],dl ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> @@:
mov byte [si+8*3+3], dl ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov word [si+8*3+2], ax mov word [si+8*3+2], ax
mov ecx, save_file_size ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. mov ecx, save_file_size ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
@@ -2000,13 +2023,15 @@ end if
;/<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;/<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
pop eax ;restore size of claster pop eax ;restore size of claster
push ecx push ecx
@@: inc data_offset @@:
inc data_offset
cmp eax, ecx cmp eax, ecx
jae @f jae @f
sub ecx, eax sub ecx, eax
jmp @b jmp @b
@@: pop ecx @@:
pop ecx
@@ -2014,7 +2039,8 @@ end if
test ecx, 0x1 test ecx, 0x1
jz .st1 jz .st1
inc ecx inc ecx
.st1: shr ecx,1 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 0x87 function .st1:
shr ecx, 1 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 0x87 function
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD> ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>
push es push es
@@ -2068,7 +2094,8 @@ local .st1
test ecx, 0x1 test ecx, 0x1
jz .st1 jz .st1
inc ecx inc ecx
.st1: shr ecx,1 .st1:
shr ecx, 1
push es push es
push ds push ds

View File

@@ -130,7 +130,8 @@ end if
mov bx, cx mov bx, cx
mov dx, di mov dx, di
@@: mov al,byte [es:di] @@:
mov al, byte [es:di]
inc di inc di
dec cx dec cx
test cx, cx test cx, cx
@@ -291,7 +292,8 @@ end if
push cx push cx
xor bx, bx xor bx, bx
mov cx, 2 mov cx, 2
@@: mov al,byte [es:di] @@:
mov al, byte [es:di]
cmp al, '0' cmp al, '0'
jb .end_get_val_t jb .end_get_val_t
cmp al, '9' cmp al, '9'
@@ -317,7 +319,8 @@ end if
mov word [value_timeout], default_timeout_value mov word [value_timeout], default_timeout_value
mov si, set_default_timeout_val mov si, set_default_timeout_val
call printplain call printplain
@@: pop cx @@:
pop cx
jmp .get_next_str jmp .get_next_str
;///////here end block loader ;///////here end block loader

View File

@@ -48,7 +48,8 @@ decode:
push edx push edx
call decode call decode
pop eax pop eax
@@: or al,0x30 @@:
or al, 0x30
mov [ds:di], al mov [ds:di], al
inc di inc di
ret ret
@@ -146,7 +147,8 @@ get_firs_sym:
.not_space: .not_space:
cmp al, ';' cmp al, ';'
jz .first_com jz .first_com
.exit: ret .exit:
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
show_name_section: show_name_section:
@@ -226,7 +228,8 @@ end if
jz @f jz @f
cmp al, "'" cmp al, "'"
jnz .end_sh_name_sec jnz .end_sh_name_sec
@@: lodsb @@:
lodsb
@@: @@:
stosw stosw
lodsb lodsb
@@ -473,7 +476,8 @@ newtimer:
push dx push dx
call .decode call .decode
pop ax pop ax
@@: or al,0x30 @@:
or al, 0x30
push ax push ax
mov ah, 9 mov ah, 9
stosw stosw

View File

@@ -219,7 +219,8 @@ end if
cmp bl, 10 cmp bl, 10
jb @f jb @f
mov al, 6 mov al, 6
@@: sub bl, al @@:
sub bl, al
jmp .main_loop jmp .main_loop
.1: .1:
lea eax, [.IsRep*4 + ebx*4] lea eax, [.IsRep*4 + ebx*4]