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>
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>
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>
;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>
;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>
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>
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>

View File

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

View File

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

View File

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

View File

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

View File

@@ -94,7 +94,8 @@ int2str:
push edx
call int2str
pop eax
@@: or al,0x30
@@:
or al, 0x30
mov [ds:di], al
inc di
ret
@@ -107,7 +108,8 @@ int2strnz:
push edx
call int2strnz
pop eax
@@: or al,0x30
@@:
or al, 0x30
mov [es:di], al
inc di
ret
@@ -244,7 +246,8 @@ calc_vmodes_table:
jb .lp1
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]
mov word [es:bx+8], ax ; +8 : bits per pixel
add bx, size_of_step ; size of record
@@ -363,7 +366,8 @@ if defined extended_primary_loader
je .ok_found_mode
cmp word [es:si+8], 24
je .ok_found_mode
@@: add si,size_of_step
@@:
add si, size_of_step
cmp word [es:si], -1
jnz .findvbemode
.novbemode:
@@ -438,7 +442,8 @@ end if
mov ecx, long_v_table
.loop: add ax,size_of_step
.loop:
add ax, size_of_step
cmp ax, word [end_cursor]
jae .next_step
loop .loop
@@ -471,13 +476,16 @@ end if
je .ok
cmp word [es:si+8], 24
je .ok
.next: add si,size_of_step
.next:
add si, size_of_step
cmp word [es:si], -1
je .exit
jmp .loops
.ok: xor ax,ax
.ok:
xor ax, ax
ret
.exit: or ax,-1
.exit:
or ax, -1
ret
@@ -520,7 +528,8 @@ draw_vmodes_table:
jmp .ok
.low: sub cx,size_of_step
.low:
sub cx, size_of_step
cmp cx, modes_table
jb .ok
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
if $>0x200
ERROR: prebooting parameters must fit in first sector!!!
ERROR:
prebooting parameters must fit in first sector!!!
end if
hdsysimage db 'KOLIBRI IMG' ; load from
image_save db 'KOLIBRI IMG' ; save to

View File

@@ -47,7 +47,8 @@
mov si, load_question + 100h - 600h
call out_string
; mov si, answer + 100h - 0600h ; already is
xxy: mov ah, 0
xxy:
mov ah, 0
int 16h
or al, 20h
mov [si], al
@@ -904,7 +905,8 @@ cur_chunk_ptr dw ?
rootcache_size dw ? ; must be immediately before foldcache_clus
if $-dat >= 0x80
warning: unoptimal data displacement!
warning:
unoptimal data displacement!
end if
foldcache_clus rd 7
foldcache_mark rw 7
@@ -912,7 +914,8 @@ foldcache_size rw 7
fat_filename rb 11
if $ > 2000h
error: file is too big
error:
file is too big
end if
; 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
filename rb 11
if $ > 0x8200
error: table overwritten
error:
table overwritten
end if

View File

@@ -545,7 +545,8 @@ end if
uglobal
align 4
; 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
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
align 4
@@ -579,7 +580,8 @@ sys_pcibios:
cmp ebp, 2 ; FIND_PCI_DEVICE
jne .not_FIND_PCI_DEVICE
mov ebx, pci_emu_dat
..nxt: cmp [ebx], dx
..nxt:
cmp [ebx], dx
jne ..no
cmp [ebx + 2], cx
jne ..no
@@ -588,7 +590,8 @@ sys_pcibios:
mov bx, [ebx + 4]
xor ah, ah
jmp .return_ab
..no: cmp word[ebx], 0
..no:
cmp word[ebx], 0
je ..dev_not_found
add ebx, 10
jmp ..nxt
@@ -601,12 +604,14 @@ sys_pcibios:
jne .not_FIND_PCI_CLASS_CODE
mov esi, pci_emu_dat
shl ecx, 8
..nxt2: cmp [esi], ecx
..nxt2:
cmp [esi], ecx
jne ..no2
mov bx, [esi]
xor ah, ah
jmp .return_ab
..no2: cmp dword[esi], 0
..no2:
cmp dword[esi], 0
je ..dev_not_found
add esi, 10
jmp ..nxt2
@@ -641,7 +646,8 @@ sys_pcibios:
.not_WRITE_CONFIG:
.unsupported_func:
mov ah, 0x81 ; FUNC_NOT_SUPPORTED
.return:mov dword[esp + 4 ], edi
.return:
mov dword[esp + 4 ], edi
mov dword[esp + 8], esi
.return_abcd:
mov dword[esp + 24], edx

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -20,7 +20,8 @@ build_interrupt_table:
mov esi, sys_int
mov ecx, 0x40
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
movsw ;high word of code-entry
loop @b
@@ -138,13 +139,15 @@ exc_c: ;
cmp bl, 14 ; #PF
jne @f
call page_fault_handler ; SEE: core/memory.inc
@@: mov esi, [current_slot]
@@:
mov esi, [current_slot]
btr [esi+APPDATA.except_mask], ebx
jnc @f
mov eax, [esi+APPDATA.exc_handler]
test eax, eax
jnz IRetToUserHook
@@: cli
@@:
cli
mov eax, [esi+APPDATA.debugger_slot]
test eax, eax
jnz .debug
@@ -165,10 +168,12 @@ exc_c: ;
mov dr6, edx
mov edx, dr7
mov cl, not 8
.l1: shl dl,2
.l1:
shl dl, 2
jc @f
and bl, cl
@@: sar cl,1
@@:
sar cl, 1
jc .l1
mov cl, 3 ; debug_message code=debug_exception
.notify:
@@ -213,8 +218,10 @@ show_error_parameters:
jb .l0
cmp bl, 0x0e
jbe .l1
.l0: mov bl, 0x09
.l1: mov eax,[msg_fault_sel+ebx*4 - 0x08*4]
.l0:
mov bl, 0x09
.l1:
mov eax, [msg_fault_sel+ebx*4 - 0x08*4]
DEBUGF 1, "K : %s\n", eax
mov eax, [reg_cs3+4]
mov edi, msg_sel_app
@@ -223,7 +230,8 @@ show_error_parameters:
je @f
mov edi, msg_sel_ker
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 : 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

View File

@@ -371,7 +371,8 @@ v86_exc_c:
jne @f
xor eax, 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
jnz @f
shr eax, 16

View File

@@ -12,7 +12,8 @@ flm db 0
preboot_lfb db 0
preboot_bootlog 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>
; # <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
cur_saved_data rb 4096
fpu_data: rb 512
fpu_data:
rb 512
mem_block_list rd 64*2
mem_used_list rd 64*2

View File

@@ -124,7 +124,8 @@ ReadHDD_ID:
ret
@@Error6:
mov [DevErrorCode], 6
@@End: ret
@@End:
ret
iglobal
@@ -258,15 +259,20 @@ SendCommandToHDD:
mov [DevErrorCode], 0
ret
; <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
@@Err2: mov [DevErrorCode],2
@@Err2:
mov [DevErrorCode], 2
ret
@@Err3: mov [DevErrorCode],3
@@Err3:
mov [DevErrorCode], 3
ret
@@Err4: mov [DevErrorCode],4
@@Err4:
mov [DevErrorCode], 4
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>
ret
@@ -373,11 +379,14 @@ DeviceReset:
mov [DevErrorCode], 0
ret
; <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
@@Err3_2: mov [DevErrorCode],3
@@Err3_2:
mov [DevErrorCode], 3
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>
ret

View File

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

View File

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

View File

@@ -344,7 +344,8 @@ end if
align 4
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
@@ -376,8 +377,10 @@ msgErrDMAsetup db 'failed to setup DMA - bad channel',13,10,0
msgDSPFound db 'DSP found at port 2'
label port_second_digit_num dword at $
db '00h',13,10,'DSP version '
sb_DSP_version: db '0.00 - SB'
sb_DSP_description: db 32,32,32,32,13,10,0
sb_DSP_version:
db '0.00 - SB'
sb_DSP_description:
db 32,32,32,32,13,10,0
;-------------------------------------------------------------------------------
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,
struct usb_device *dev,
unsigned int pipe,
unsigned char *setup_packet,
void *transfer_buffer,
int buffer_length,
usb_complete_t complete_fn,
void *context)
{
urb->dev = dev;
urb->pipe = pipe;
urb->setup_packet = setup_packet;
urb->transfer_buffer = transfer_buffer;
urb->transfer_buffer_length = buffer_length;
urb->complete = complete_fn;
urb->context = context;
}
;void usb_fill_control_urb (struct urb *urb,
; struct usb_device *dev,
; unsigned int pipe,
; unsigned char *setup_packet,
; void *transfer_buffer,
; int buffer_length,
; usb_complete_t complete_fn,
; void *context)
;{
;
; urb->dev = dev;
; urb->pipe = pipe;
; urb->setup_packet = setup_packet;
; urb->transfer_buffer = transfer_buffer;
; urb->transfer_buffer_length = buffer_length;
; urb->complete = complete_fn;
; 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
call StallExec
stdcall codec_valid,
stdcall codec_valid
cmp eax, 0
pop eax
jge .ok

View File

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

View File

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

View File

@@ -21,12 +21,14 @@ $Revision$
iglobal
dir0: db 'HARDDISK '
dir0:
db 'HARDDISK '
db 'RAMDISK '
db 'FLOPPYDISK '
db 0
dir1: db 'FIRST '
dir1:
db 'FIRST '
db 'SECOND '
db 'THIRD '
db 'FOURTH '
@@ -34,7 +36,8 @@ dir1: db 'FIRST '
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
endg
@@ -793,5 +796,6 @@ error:
stc
jmp i4
partition_string: dd 0
partition_string:
dd 0
db 32

View File

@@ -1018,9 +1018,11 @@ max_cur_dir equ 0x1000
stosb
mov ecx, edx
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]
ret
.set:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -344,42 +344,68 @@ end if
e3c59x_upd_buff = e3c59x_dpd_buff+(E3C59X_DPD_SIZE*E3C59X_NUM_TX_DESC)
uglobal
e3c59x_curr_upd: dd 0
e3c59x_prev_dpd: dd 0
e3c59x_prev_tx_frame: dd 0
e3c59x_transmit_function: dd 0
e3c59x_receive_function: dd 0
e3c59x_curr_upd:
dd 0
e3c59x_prev_dpd:
dd 0
e3c59x_prev_tx_frame:
dd 0
e3c59x_transmit_function:
dd 0
e3c59x_receive_function:
dd 0
endg
iglobal
e3c59x_ver_id: db 17
e3c59x_ver_id:
db 17
endg
uglobal
e3c59x_full_bus_master: db 0
e3c59x_has_hwcksm: db 0
e3c59x_preamble: db 0
e3c59x_dn_list_ptr_cleared: db 0
e3c59x_self_directed_packet: rb 6
e3c59x_full_bus_master:
db 0
e3c59x_has_hwcksm:
db 0
e3c59x_preamble:
db 0
e3c59x_dn_list_ptr_cleared:
db 0
e3c59x_self_directed_packet:
rb 6
endg
if defined E3C59X_DEBUG
e3c59x_hw_type_str: db "Detected hardware type : ", 0
e3c59x_device_str: db "Device ID : 0x"
e3c59x_device_id_str: db "ffff", 13, 10, 0
e3c59x_vendor_str: db "Vendor ID : 0x"
e3c59x_vendor_id_str: db "ffff", 13, 10, 0
e3c59x_io_info_str: db "IO address : 0x"
e3c59x_io_addr_str: 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_hw_type_str:
db "Detected hardware type : ", 0
e3c59x_device_str:
db "Device ID : 0x"
e3c59x_device_id_str:
db "ffff", 13, 10, 0
e3c59x_vendor_str:
db "Vendor ID : 0x"
e3c59x_vendor_id_str:
db "ffff", 13, 10, 0
e3c59x_io_info_str:
db "IO address : 0x"
e3c59x_io_addr_str:
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, \
"No valid link type detected", \

View File

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

View File

@@ -50,39 +50,61 @@ rxfd_packet equ eth_data_start + 16
uglobal
eeprom_data: times 16 dd 0
eeprom_data:
times 16 dd 0
align 4
lstats:
tx_good_frames: dd 0
tx_coll16_errs: dd 0
tx_late_colls: dd 0
tx_underruns: dd 0
tx_lost_carrier: dd 0
tx_deferred: dd 0
tx_one_colls: dd 0
tx_multi_colls: 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
tx_good_frames:
dd 0
tx_coll16_errs:
dd 0
tx_late_colls:
dd 0
tx_underruns:
dd 0
tx_lost_carrier:
dd 0
tx_deferred:
dd 0
tx_one_colls:
dd 0
tx_multi_colls:
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
confcmd:
confcmd_status: dw 0
confcmd_command: dw 0
confcmd_link: dd 0
confcmd_status:
dw 0
confcmd_command:
dw 0
confcmd_link:
dd 0
endg
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 0x80, 0x3f, 0x05
endg
@@ -91,22 +113,34 @@ uglobal
align 4
txfd:
txfd_status: dw 0
txfd_command: dw 0
txfd_link: dd 0
txfd_tx_desc_addr: 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
txfd_status:
dw 0
txfd_command:
dw 0
txfd_link:
dd 0
txfd_tx_desc_addr:
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
hdr:
hdr_dst_addr: times 6 db 0
hdr_src_addr: times 6 db 0
hdr_type: dw 0
hdr_dst_addr:
times 6 db 0
hdr_src_addr:
times 6 db 0
hdr_type:
dw 0
endg

View File

@@ -143,29 +143,46 @@ MEM_32768 equ 128
ISA_MAX_ADDR equ 0x400
uglobal
eth_flags: db 0
eth_vendor: db 0
eth_nic_base: dw 0
eth_asic_base: dw 0
eth_memsize: 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
eth_flags:
db 0
eth_vendor:
db 0
eth_nic_base:
dw 0
eth_asic_base:
dw 0
eth_memsize:
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
iglobal
test_data: db 'NE*000 memory',0
test_buffer: db ' ',0
test_data:
db 'NE*000 memory',0
test_buffer:
db ' ',0
endg
uglobal
eth_type: dw 0
pkthdr: db 0,0,0,0 ; status, next, (short) len
pktoff: dw 0
eth_rx_data_ptr: dd 0
eth_tmp_len: dw 0
eth_type:
dw 0
pkthdr:
db 0,0,0,0 ; status, next, (short) len
pktoff:
dw 0
eth_rx_data_ptr:
dd 0
eth_tmp_len:
dw 0
endg

View File

@@ -183,18 +183,21 @@ rtl8139_tx_buff equ rtl8139_rx_buff + (RTL8139_RX_BUFFER_SIZE + MAX_ETH_
uglobal
align 4
rtl8139_rx_buff_offset: dd 0
rtl8139_rx_buff_offset:
dd 0
curr_tx_desc dd 0
endg
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
HW_VER_ARRAY_SIZE = $-hw_ver_array
endg
uglobal
hw_ver_id: db 0
hw_ver_id:
db 0
endg
;***************************************************************************

View File

@@ -550,7 +550,8 @@ proc pci_bar_start,index:dword
jz @f
and eax, PCI_BASE_ADDRESS_IO_MASK
jmp .exit
@@: push eax
@@:
push eax
and eax, PCI_BASE_ADDRESS_MEM_TYPE_MASK
cmp eax, PCI_BASE_ADDRESS_MEM_TYPE_64
jne .not64
@@ -583,7 +584,8 @@ proc rtl8169_init_board
; Check that the chip has finished the reset
mov ecx, 1000
@@: RTL_R8 RTL8169_REG_ChipCmd
@@:
RTL_R8 RTL8169_REG_ChipCmd
test al, RTL8169_CMD_Reset
jz @f
stdcall udelay, 10
@@ -594,7 +596,8 @@ proc rtl8169_init_board
and eax, 0x7c800000
; DEBUGF 1,"K : rtl8169_init_board: TxConfig & 0x7c800000 = 0x%x\n",eax
mov esi, mac_info-8
@@: add esi,8
@@:
add esi, 8
mov ecx, eax
and ecx, [esi]
cmp ecx, [esi]
@@ -609,7 +612,8 @@ proc rtl8169_init_board
jnz @f
mov [rtl8169_tpc.pcfg], PCFG_METHOD_1
jmp .pconf
@@: dec al
@@:
dec al
jnz .pconf
mov [rtl8169_tpc.pcfg], PCFG_METHOD_2
.pconf:
@@ -617,7 +621,8 @@ proc rtl8169_init_board
; identify chip attached to board
mov ecx, 10
mov eax, [rtl8169_tpc.mcfg]
@@: dec ecx
@@:
dec ecx
js @f
cmp eax, [rtl_chip_info+ecx*8]
jne @b
@@ -661,7 +666,8 @@ proc rtl8169_hw_PHY_config
je @f
cmp [rtl8169_tpc.mcfg], MCFG_METHOD_03
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, 0x18, 0x65C7
stdcall RTL8169_WRITE_GMII_REG, 0x04, 0x0000
@@ -727,7 +733,8 @@ proc RTL8169_WRITE_GMII_REG,RegAddr:byte,value:dword
mov ecx, 2000
; 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
jz .exit
stdcall udelay, 1 ;;;100
@@ -749,7 +756,8 @@ proc RTL8169_READ_GMII_REG,RegAddr:byte
mov ecx, 2000
; 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
jnz .exit
stdcall udelay, 1 ;;;100
@@ -802,7 +810,8 @@ proc rtl8169_init_ring
mov edi, rtl8169_tpc.Tx_skbuff
mov eax, rtl8169_txb
mov ecx, NUM_TX_DESC
@@: stosd
@@:
stosd
inc eax ; add eax,RX_BUF_SIZE ???
loop @b
@@ -818,7 +827,8 @@ proc rtl8169_init_ring
mov edi, [rtl8169_tpc.RxDescArray]
mov eax, rtl8169_rxb
mov ecx, NUM_RX_DESC
@@: mov [esi],eax
@@:
mov [esi], eax
mov [edi+rtl8169_RxDesc.buf_addr], eax
sub [edi+rtl8169_RxDesc.buf_addr], OS_BASE ; shurf 28.09.2008
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
; Check that the chip has finished the reset
mov ecx, 1000
@@: RTL_R8 RTL8169_REG_ChipCmd
@@:
RTL_R8 RTL8169_REG_ChipCmd
and al, RTL8169_CMD_Reset
jz @f
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"
jmp .set
@@:;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,0x152a
@@ -929,7 +941,8 @@ proc rtl8169_probe
add edx, RTL8169_REG_MAC0
xor ebx, ebx
; Get MAC address. FIXME: read EEPROM
@@: RTL_R8 dx
@@:
RTL_R8 dx
mov [node_addr+ebx], al
inc edx
inc ebx
@@ -969,7 +982,8 @@ proc rtl8169_probe
stdcall udelay, 100
mov ecx, 10000
; wait for auto-negotiation process
@@: dec ecx
@@:
dec ecx
jz @f
stdcall RTL8169_READ_GMII_REG, RTL8169_PHY_STAT_REG
stdcall udelay, 100
@@ -1081,12 +1095,14 @@ proc rtl8169_transmit
and ecx, 0x0FFF
xor al, al
add edi, ecx
@@: cmp ecx,ETH_ZLEN
@@:
cmp ecx, ETH_ZLEN
jae @f
stosb
inc ecx
jmp @b
@@: pop eax
@@:
pop eax
mov ebx, eax
mov eax, sizeof.rtl8169_TxDesc
@@ -1100,11 +1116,13 @@ proc rtl8169_transmit
cmp eax, ETH_ZLEN
jae @f
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
jne @f
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
@@ -1114,7 +1132,8 @@ proc rtl8169_transmit
;!!! to = currticks() + TX_TIMEOUT;
;!!! while ((tpc->TxDescArray[entry].status & OWNbit) && (currticks() < to)); /* wait */
mov ecx, TX_TIMEOUT / 10
@@: test [ebx + rtl8169_TxDesc.status],RTL8169_DSB_OWNbit
@@:
test [ebx + rtl8169_TxDesc.status], RTL8169_DSB_OWNbit
jnz @f
stdcall udelay, 10
loop @b
@@ -1195,7 +1214,8 @@ proc rtl8169_poll
cmp [rtl8169_tpc.cur_rx], NUM_RX_DESC - 1
jne @f
or eax, RTL8169_DSB_EORbit
@@: mov [ebx + rtl8169_RxDesc.status],eax
@@:
mov [ebx + rtl8169_RxDesc.status], eax
mov [ebx + rtl8169_RxDesc.buf_addr], edx
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
align 4
txd: times (3 * NUM_TX_DESC) dd 0
rxd: times (3 * NUM_RX_DESC) dd 0
txd:
times (3 * NUM_TX_DESC) dd 0
rxd:
times (3 * NUM_RX_DESC) dd 0
endg
txb equ eth_data_start
@@ -218,7 +220,8 @@ SIS900_RFADDR_shift equ 16
SIS900_EEDONE equ 0x00000200
SIS900_EEGNT equ 0x00000100
;General Varibles
SIS900_pci_revision: db 0
SIS900_pci_revision:
db 0
SIS900_Status dd 0x03000000
sis900_specific_table:
; 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 SIS900B_900_REV,SIS900_get_mac_addr,0
dd 0,0,0,0 ; end of list
sis900_get_mac_func: dd 0
sis900_special_func: dd 0
sis900_table_entries: db 8
sis900_get_mac_func:
dd 0
sis900_special_func:
dd 0
sis900_table_entries:
db 8
;***************************************************************************
; Function
@@ -567,7 +573,8 @@ SIS900_set_tx_mode:
;* 0x00600000 = 128 bytes
;* 0x00700000 = 256 bytes
;***************************************************************************
SIS900_mc_filter: times 16 dw 0
SIS900_mc_filter:
times 16 dw 0
SIS900_set_rx_mode:
mov ebp, [io_addr]
;**************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'
db 'A','B','C','D','E','F'
Mac_str_build: times 20 db 0
Mac_str_build:
times 20 db 0
Create_Mac_String:
pusha
xor ecx, ecx

View File

@@ -243,31 +243,49 @@ endg
uglobal
;Net-stack's interface's settings
node_addr: db 0,0,0,0,0,0
gateway_ip: dd 0
dns_ip: dd 0
node_addr:
db 0,0,0,0,0,0
gateway_ip:
dd 0
dns_ip:
dd 0
eth_rx_data_len: dw 0
eth_status: dd 0
io_addr: dd 0
hdrtype: db 0
vendor_device: dd 0
pci_data: dd 0
pci_dev: dd 0
pci_bus: dd 0
eth_rx_data_len:
dw 0
eth_status:
dd 0
io_addr:
dd 0
hdrtype:
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
drvr_probe: dd 0
drvr_reset: dd 0
drvr_poll: dd 0
drvr_transmit: dd 0
drvr_cable: dd 0
drvr_probe:
dd 0
drvr_reset:
dd 0
drvr_poll:
dd 0
drvr_transmit:
dd 0
drvr_cable:
dd 0
endg
iglobal
broadcast_add: db 0xff,0xff,0xff,0xff,0xff,0xff
subnet_mask: dd 0x00ffffff ; 255.255.255.0
broadcast_add:
db 0xff,0xff,0xff,0xff,0xff,0xff
subnet_mask:
dd 0x00ffffff ; 255.255.255.0
endg
include "arp.inc" ;arp-protocol functions

View File

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

View File

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

View File

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

View File

@@ -47,7 +47,8 @@
mov si, load_question + 100h - 600h
call out_string
; mov si, answer + 100h - 0600h ; already is
xxy: mov ah, 0
xxy:
mov ah, 0
int 16h
or al, 20h
mov [si], al
@@ -904,7 +905,8 @@ cur_chunk_ptr dw ?
rootcache_size dw ? ; must be immediately before foldcache_clus
if $-dat >= 0x80
warning: unoptimal data displacement!
warning:
unoptimal data displacement!
end if
foldcache_clus rd 7
foldcache_mark rw 7
@@ -912,7 +914,8 @@ foldcache_size rw 7
fat_filename rb 11
if $ > 2000h
error: file is too big
error:
file is too big
end if
; 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
filename rb 11
if $ > 0x8200
error: table overwritten
error:
table overwritten
end if

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -135,7 +135,8 @@ local .found_end_str
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>
;;;;;; <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, ' '
jz .found_end_str
cmp al, 0xa
@@ -280,7 +281,8 @@ local ._end_parse_RS
;;;;;;;;;;;;;;;;;;;;;;;;;;
xor bx, bx
mov cx, 5
@@: mov al,byte [es:di]
@@:
mov al, byte [es:di]
cmp al, '0'
jb .CS
cmp al, '9'
@@ -494,9 +496,11 @@ use_RamdiskSector ;
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> ...
.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>...
@@: 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>
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
mov cx, 4
@@: movzx ax,byte [es:di]
@@:
movzx ax, byte [es:di]
cmp al, '0'
jb .end_RamdiskSector
cmp al, '9'
@@ -852,7 +857,8 @@ macro use_RamdiskCluster
inc cx
dec di
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@: movzx ax,byte [es:di]
@@:
movzx ax, byte [es:di]
cmp al, '0'
jb .end_RamdiskCluster
cmp al, '9'
@@ -955,7 +961,8 @@ local .found_end_str
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>
;;;;;; <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, ' '
jz .found_end_str
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
;
@@: 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>
jz .found_end_str
inc di
@@ -1430,7 +1438,8 @@ end if
mov si, shot_name_fat
mov cx, 11
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
@@: lodsb
@@:
lodsb
stosb
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>.
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
jbe .eof_file
@@ -1510,7 +1520,8 @@ end if
add cx, ax
jmp @b
.step2: and cx,0x0FFF
.step2:
and cx, 0x0FFF
mov word[es:si], cx
inc si
add cx, ax
@@ -1524,10 +1535,12 @@ end if
mov word[es:si], cx
jmp .end
.step3: and cx,0x0FFF
.step3:
and cx, 0x0FFF
mov word[es:si], cx
.end: inc point_next_fat_str
.end:
inc point_next_fat_str
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>.
@@ -1549,7 +1562,8 @@ if DEBUG
mov cx, 11
;<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
mov byte [ds:si], al
inc si
@@ -1776,7 +1790,8 @@ if DEBUG
lea si, [check_name_fat_msg_y]
call printplain
lea si, [alarm_msg]
@@: call printplain
@@:
call printplain
popad
end if
@@ -1883,23 +1898,28 @@ local .st5
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>
.st2_l: mov byte [si],al
.st2_l:
mov byte [si], al
inc di
inc si
; dec cx
; jnz @b
loop @b
.st5: xor ax,ax
.st5:
xor ax, ax
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>
.st4_s: mov al,' '
.st4: mov byte [si],al
.st4_s:
mov al, ' '
.st4:
mov byte [si], al
inc si
loop .st4
jmp .st5
.error: or ax,-1
.error:
or ax, -1
@@:
if DEBUG
@@ -1909,7 +1929,8 @@ if DEBUG
test ax, ax
jz @f
mov si, convertion_file_name_msg_n
@@: call printplain
@@:
call printplain
mov si, shot_name_fat
mov byte [si+12], 0
@@ -1971,7 +1992,8 @@ end if
mov dl, 0x10
@@: cmp eax,0x00010000
@@:
cmp eax, 0x00010000
jb @f
sub eax, 0x00010000
@@ -1979,7 +2001,8 @@ end if
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 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>
pop eax ;restore size of claster
push ecx
@@: inc data_offset
@@:
inc data_offset
cmp eax, ecx
jae @f
sub ecx, eax
jmp @b
@@: pop ecx
@@:
pop ecx
@@ -2014,7 +2039,8 @@ end if
test ecx, 0x1
jz .st1
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>
push es
@@ -2068,7 +2094,8 @@ local .st1
test ecx, 0x1
jz .st1
inc ecx
.st1: shr ecx,1
.st1:
shr ecx, 1
push es
push ds

View File

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

View File

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

View File

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