forked from KolibriOS/kolibrios
697 lines
10 KiB
PHP
697 lines
10 KiB
PHP
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㭪樨 70
|
|||
|
;
|
|||
|
|
|||
|
struc sinfo
|
|||
|
{
|
|||
|
.subfnc_name dd 0
|
|||
|
.pos_in_file dd 0
|
|||
|
.reserved dd 0
|
|||
|
.bytes_to_read dd 0
|
|||
|
.pbuffer dd 0
|
|||
|
.null db 0
|
|||
|
.pname dd 0
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
;
|
|||
|
; ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
; +----+-------------+-----------------+
|
|||
|
; | in | Variable | Variable |
|
|||
|
; | de | name | string |
|
|||
|
; | x | | |
|
|||
|
; | | | |
|
|||
|
; +----+-------------+-----------------+
|
|||
|
; | | | |
|
|||
|
; | | | |
|
|||
|
; | 1 | UIN | 'XXXXX..XX',0 |
|
|||
|
; | | | |
|
|||
|
; +----+-------------+-----------------+
|
|||
|
; | | |
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD>㧪<EFBFBD> int <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> ॠ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
; +----+-------------+-----------------+
|
|||
|
; | in | Variable | Variable |
|
|||
|
; | de | name | int |
|
|||
|
; | x | | |
|
|||
|
; | | | |
|
|||
|
; +----+-------------+-----------------+
|
|||
|
; | | | |
|
|||
|
; | | | |
|
|||
|
; | 1 | BUFFSIZE | XXXXXXXX |
|
|||
|
; | | | |
|
|||
|
; +----+-------------+-----------------+
|
|||
|
; | | |
|
|||
|
;
|
|||
|
;
|
|||
|
|
|||
|
|
|||
|
TABLE_SIZE equ 16
|
|||
|
VNAME_LEN equ 8
|
|||
|
VAR_LEN equ 16
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD>ᠭ<EFBFBD><EFBFBD> ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD>
|
|||
|
|
|||
|
virtual at 0
|
|||
|
vartable:
|
|||
|
.uin db VAR_LEN dup ?
|
|||
|
.pass db VAR_LEN dup ?
|
|||
|
.icqip db VAR_LEN dup ?
|
|||
|
|
|||
|
|
|||
|
|
|||
|
end virtual
|
|||
|
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>訡<EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⥬<EFBFBD>
|
|||
|
;
|
|||
|
|
|||
|
FIO_SUCCESS equ 0
|
|||
|
FIO_UNSUPPORTED equ 2
|
|||
|
FIO_UNKNOWNFS equ 3
|
|||
|
FIO_FILENOTFOUND equ 5
|
|||
|
FIO_EOF equ 6
|
|||
|
FIO_BADPOINTER equ 7
|
|||
|
FIO_DISKFULL equ 8
|
|||
|
FIO_FATDAMAGED equ 9
|
|||
|
FIO_DENIED equ 10
|
|||
|
FIO_ERRORDEVICE equ 11
|
|||
|
|
|||
|
|
|||
|
IOBUFF_SIZE equ 128
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᪠ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <EFBFBD> eax <EFBFBD><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>
|
|||
|
macro findchar string, len, char
|
|||
|
{
|
|||
|
local ..fc_endstr, ..fc_end
|
|||
|
|
|||
|
push ebx
|
|||
|
push ecx
|
|||
|
push edi
|
|||
|
|
|||
|
|
|||
|
mov edi, string
|
|||
|
mov ecx, len
|
|||
|
mov ebx, ecx
|
|||
|
cld
|
|||
|
mov al, char
|
|||
|
repne scasb
|
|||
|
jcxz ..fc_endstr
|
|||
|
|
|||
|
sub ebx, ecx ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =
|
|||
|
mov eax, ebx
|
|||
|
jmp ..fc_end
|
|||
|
|
|||
|
..fc_endstr:
|
|||
|
mov eax, -1
|
|||
|
|
|||
|
|
|||
|
..fc_end:
|
|||
|
pop edi
|
|||
|
pop ecx
|
|||
|
pop ebx
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᪠ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>, <EFBFBD>⫨<EFBFBD><EFBFBD><EFBFBD>饣<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
macro findother string, len, char
|
|||
|
{
|
|||
|
local ..fc_endstr, ..fc_end
|
|||
|
|
|||
|
push ebx
|
|||
|
push ecx
|
|||
|
push edi
|
|||
|
|
|||
|
|
|||
|
mov edi, string
|
|||
|
mov ecx, len
|
|||
|
mov ebx, ecx
|
|||
|
cld
|
|||
|
mov al, char
|
|||
|
repe scasb ; <EFBFBD> ᨬ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> char - <EFBFBD><EFBFBD>室<EFBFBD><EFBFBD>
|
|||
|
jcxz ..fc_endstr ; <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD> char
|
|||
|
|
|||
|
sub ebx, ecx ; <EFBFBD> ebx - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⫨筮<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> char
|
|||
|
mov eax, ebx
|
|||
|
jmp ..fc_end
|
|||
|
|
|||
|
..fc_endstr:
|
|||
|
mov eax, -1
|
|||
|
|
|||
|
|
|||
|
..fc_end:
|
|||
|
pop edi
|
|||
|
pop ecx
|
|||
|
pop ebx
|
|||
|
}
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப
|
|||
|
;
|
|||
|
macro mstrcpy from, to, leng
|
|||
|
{
|
|||
|
|
|||
|
push ecx
|
|||
|
push esi
|
|||
|
push edi
|
|||
|
|
|||
|
mov ecx, leng
|
|||
|
mov esi, from
|
|||
|
mov edi, to
|
|||
|
cld
|
|||
|
rep movsb
|
|||
|
|
|||
|
pop edi
|
|||
|
pop esi
|
|||
|
pop ecx
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD>樠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
|
|||
|
; inittables:
|
|||
|
;
|
|||
|
;
|
|||
|
; mstrcpy name1, nvtable, VNAME_LEN
|
|||
|
; mstrcpy name2, (nvtable + NAME_LEN), VNAME_LEN
|
|||
|
; mstrcpy name3, (nvtable + NAME_LEN * 2), VNAME_LEN
|
|||
|
;
|
|||
|
;
|
|||
|
;
|
|||
|
; ret
|
|||
|
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD>ﬨ
|
|||
|
; IN eax - ASCIIZ <EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|||
|
; OUT eax - १<EFBFBD><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>
|
|||
|
;
|
|||
|
parseconf:
|
|||
|
push edi
|
|||
|
push esi
|
|||
|
;push eax
|
|||
|
push ebx
|
|||
|
push ecx
|
|||
|
push edx
|
|||
|
|
|||
|
mov [strnum], dword 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> ;, # - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; <EFBFBD><EFBFBD>ଠ<EFBFBD> UIN="1234567890"
|
|||
|
; PASS="******" <EFBFBD> <EFBFBD>.<EFBFBD>.
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᬥ饭<EFBFBD><EFBFBD>
|
|||
|
mov [shift], dword 0
|
|||
|
|
|||
|
mov esi, eax
|
|||
|
|
|||
|
pc_still:
|
|||
|
|
|||
|
mov edx, esi
|
|||
|
mov ecx, IOBUFF_SIZE
|
|||
|
mov ebx, iobuff
|
|||
|
|
|||
|
call getstr
|
|||
|
|
|||
|
inc [strnum]
|
|||
|
|
|||
|
push eax
|
|||
|
|
|||
|
;
|
|||
|
;<EFBFBD><EFBFBD>ઠ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>
|
|||
|
;
|
|||
|
movzx eax, byte [iobuff]
|
|||
|
|
|||
|
test eax, eax
|
|||
|
jz pc_next
|
|||
|
|
|||
|
cmp al, '#'
|
|||
|
jz pc_next
|
|||
|
|
|||
|
cmp al, ';'
|
|||
|
jz pc_next
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
findother iobuff, ebx, ' '
|
|||
|
cmp eax, -1
|
|||
|
jz pc_next
|
|||
|
|
|||
|
mov [stnpos], eax ;<EFBFBD><EFBFBD>砫<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =
|
|||
|
;
|
|||
|
mov ecx, ebx ; <EFBFBD>᪠<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
sub ecx, eax ;
|
|||
|
|
|||
|
mov edi, iobuff
|
|||
|
add edi, eax
|
|||
|
|
|||
|
findchar edi, ecx, '='
|
|||
|
|
|||
|
cmp eax, -1
|
|||
|
jz pc_badformat
|
|||
|
|
|||
|
mov edi, [stnpos]
|
|||
|
add eax, edi ; <EFBFBD> eax - ᬥ饭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>砫<EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>
|
|||
|
mov [eqpos], eax
|
|||
|
|
|||
|
mov ecx, ebx
|
|||
|
sub ecx, eax
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
|
|||
|
;
|
|||
|
mov dl, [iobuff + eax]
|
|||
|
cmp dl, '"'
|
|||
|
jnz pc_badformat
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
|
|||
|
;
|
|||
|
mov edi, iobuff
|
|||
|
add edi, eax
|
|||
|
|
|||
|
inc edi
|
|||
|
|
|||
|
findchar edi, ecx, '"'
|
|||
|
|
|||
|
cmp eax, -1
|
|||
|
jz pc_badformat
|
|||
|
|
|||
|
inc eax
|
|||
|
|
|||
|
mov edx, [eqpos]
|
|||
|
add eax, edx
|
|||
|
mov [edvpos], eax
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD>⠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>騥 0
|
|||
|
|
|||
|
mov eax, [stnpos]
|
|||
|
dec eax
|
|||
|
|
|||
|
|
|||
|
mov ebx, [eqpos]
|
|||
|
mov ecx, ebx
|
|||
|
dec ecx ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> =
|
|||
|
inc ebx ; <EFBFBD>ய<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
|
|||
|
|
|||
|
mov [iobuff + ecx], byte 0
|
|||
|
|
|||
|
mov edx, [edvpos]
|
|||
|
dec edx
|
|||
|
|
|||
|
mov [iobuff + edx], byte 0
|
|||
|
|
|||
|
lea eax, [iobuff + eax]
|
|||
|
lea ebx, [iobuff + ebx]
|
|||
|
call setavar
|
|||
|
|
|||
|
jmp pc_next
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
pc_badformat:
|
|||
|
pop eax
|
|||
|
|
|||
|
mov ebx, [strnum]
|
|||
|
jmp pc_err
|
|||
|
|
|||
|
|
|||
|
pc_next:
|
|||
|
pop eax
|
|||
|
|
|||
|
cmp eax, FIO_EOF
|
|||
|
jz pc_eof
|
|||
|
cmp eax, FIO_SUCCESS
|
|||
|
jnz pc_err
|
|||
|
|
|||
|
jmp pc_still
|
|||
|
|
|||
|
|
|||
|
|
|||
|
pc_eof:
|
|||
|
pc_err:
|
|||
|
pop edx
|
|||
|
pop ecx
|
|||
|
pop ebx
|
|||
|
;pop eax
|
|||
|
pop esi
|
|||
|
pop edi
|
|||
|
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>
|
|||
|
; IN eax - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> ASCIIZ
|
|||
|
; IN ebx - <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> ASCIIZ
|
|||
|
; OUT eax -१<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0 = OK, -1 = <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; OUT <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
setavar:
|
|||
|
;push ebx
|
|||
|
push ecx
|
|||
|
push edx
|
|||
|
push esi
|
|||
|
push edi
|
|||
|
push ebx
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD><EFBFBD><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 edi, eax
|
|||
|
push eax
|
|||
|
|
|||
|
mov ecx, VNAME_LEN
|
|||
|
|
|||
|
xor eax, eax ;<EFBFBD>饬 \0
|
|||
|
cld
|
|||
|
repne scasb
|
|||
|
|
|||
|
mov eax, VNAME_LEN
|
|||
|
sub eax, ecx ; <EFBFBD> ecx - <EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮪ <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᨬ<EFBFBD><EFBFBD>쭮<EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>
|
|||
|
mov ebx, eax
|
|||
|
|
|||
|
|
|||
|
pop eax
|
|||
|
;
|
|||
|
; <EFBFBD>᪠<EFBFBD><EFBFBD> <EFBFBD> ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>室<EFBFBD>饥 <EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
xor edx, edx ;index
|
|||
|
|
|||
|
sv_next:
|
|||
|
mov ecx, ebx
|
|||
|
push eax
|
|||
|
mov esi, eax
|
|||
|
mov edi, nvtable
|
|||
|
mov eax, edx
|
|||
|
imul eax, VNAME_LEN ;offset
|
|||
|
add edi, eax
|
|||
|
pop eax
|
|||
|
cld
|
|||
|
|
|||
|
repe cmpsb
|
|||
|
jz sv_match
|
|||
|
|
|||
|
sv_inc:
|
|||
|
inc edx
|
|||
|
cmp edx, TABLE_SIZE
|
|||
|
jae sv_fail
|
|||
|
jmp sv_next
|
|||
|
|
|||
|
sv_match:
|
|||
|
cmp ebx, VNAME_LEN ;<EFBFBD> ebx - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>室<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>窨
|
|||
|
jz sv_match2
|
|||
|
|
|||
|
push eax
|
|||
|
mov edi, nvtable
|
|||
|
mov eax, edx
|
|||
|
imul eax, VNAME_LEN ;offset
|
|||
|
add edi, eax
|
|||
|
pop eax
|
|||
|
|
|||
|
cmp [edi + ebx], byte 0 ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᨬ<EFBFBD><EFBFBD>쭮<EFBFBD><EFBFBD>,
|
|||
|
jnz sv_inc ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>稢<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0
|
|||
|
|
|||
|
sv_match2:
|
|||
|
pop edi ;
|
|||
|
push edi
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> - <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
xor eax, eax
|
|||
|
mov ecx, VAR_LEN
|
|||
|
cld
|
|||
|
repne scasb
|
|||
|
|
|||
|
mov eax, VAR_LEN
|
|||
|
sub eax, ecx
|
|||
|
mov ecx, eax
|
|||
|
mov ebx, eax
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
|
|||
|
pop esi
|
|||
|
push esi
|
|||
|
|
|||
|
mov eax, VAR_LEN
|
|||
|
imul eax, edx
|
|||
|
mov edi, vtable
|
|||
|
add edi, eax
|
|||
|
cld
|
|||
|
rep movsb
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ⠡<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0
|
|||
|
;
|
|||
|
cmp ebx, VAR_LEN
|
|||
|
jz sv_end
|
|||
|
mov [edi + ebx], byte 0
|
|||
|
|
|||
|
|
|||
|
|
|||
|
sv_end:
|
|||
|
xor eax, eax
|
|||
|
jmp sv_fin
|
|||
|
|
|||
|
sv_fail:
|
|||
|
mov eax, -1
|
|||
|
|
|||
|
sv_fin:
|
|||
|
|
|||
|
pop ebx
|
|||
|
pop edi
|
|||
|
pop esi
|
|||
|
pop edx
|
|||
|
pop ecx
|
|||
|
;pop ebx
|
|||
|
ret
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD>⥭<EFBFBD><EFBFBD> ASCIIZ <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|||
|
; IN ebx - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; ecx - ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; edx - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|||
|
; OUT ebx - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>
|
|||
|
; eax - १<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⥭<EFBFBD><EFBFBD>
|
|||
|
|
|||
|
getstr:
|
|||
|
;push eax
|
|||
|
;push ebx
|
|||
|
push ecx
|
|||
|
push edx
|
|||
|
push esi
|
|||
|
|
|||
|
;xor edx, edx
|
|||
|
xor esi, esi
|
|||
|
|
|||
|
gs_read:
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
mov [finfo.subfnc_name], 0
|
|||
|
mov eax, [shift]
|
|||
|
mov [finfo.pos_in_file], eax
|
|||
|
mov [finfo.bytes_to_read], ecx
|
|||
|
mov [finfo.pbuffer], ebx
|
|||
|
mov [finfo.pname], edx
|
|||
|
|
|||
|
push ebx
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD>⥬
|
|||
|
;
|
|||
|
;mov eax, 70
|
|||
|
;mov ebx, finfo
|
|||
|
;int 40h
|
|||
|
mcall 70, finfo
|
|||
|
|
|||
|
mov ecx, ebx ; <EFBFBD> ebx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥭<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
pop ebx
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> १<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⥭<EFBFBD><EFBFBD> - <EFBFBD> <EFBFBD><EFBFBD> EOF <EFBFBD> 0,
|
|||
|
; <EFBFBD><EFBFBD>室<EFBFBD><EFBFBD>
|
|||
|
cmp eax, FIO_EOF
|
|||
|
jz gs_loop
|
|||
|
cmp eax, 0
|
|||
|
jz gs_loop
|
|||
|
|
|||
|
jmp gs_ok
|
|||
|
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD>ࠡ<EFBFBD>⪠ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
gs_loop:
|
|||
|
mov dl, [ebx + esi]
|
|||
|
cmp dl, 0Ah ;cr
|
|||
|
jz gs_cr
|
|||
|
inc esi
|
|||
|
cmp esi, ecx
|
|||
|
jnb gs_err
|
|||
|
jmp gs_loop
|
|||
|
|
|||
|
gs_err:
|
|||
|
;
|
|||
|
; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>७<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>, <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD>ப<EFBFBD> 誮<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>襣<EFBFBD> ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>७<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>
|
|||
|
; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> - <EFBFBD><EFBFBD>室<EFBFBD><EFBFBD>
|
|||
|
cmp eax, FIO_EOF
|
|||
|
jz gs_endf
|
|||
|
add [shift], ecx
|
|||
|
jmp gs_read
|
|||
|
|
|||
|
|
|||
|
gs_endf:
|
|||
|
xor ebx, ebx
|
|||
|
jmp gs_ok
|
|||
|
|
|||
|
gs_cr:
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> १<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⥭<EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
xor eax, eax
|
|||
|
|
|||
|
mov dl, [ebx + esi - 1]
|
|||
|
cmp dl, 0Dh ;le
|
|||
|
jz gs_le
|
|||
|
|
|||
|
mov [ebx + esi], byte 0
|
|||
|
mov ebx, esi
|
|||
|
|
|||
|
|
|||
|
inc esi
|
|||
|
add [shift], esi
|
|||
|
|
|||
|
jmp gs_ok
|
|||
|
|
|||
|
gs_le:
|
|||
|
mov [ebx + esi - 1], byte 0
|
|||
|
mov [ebx + esi], byte 0
|
|||
|
lea ebx, [esi - 1]
|
|||
|
|
|||
|
inc esi
|
|||
|
add [shift], esi
|
|||
|
|
|||
|
gs_ok:
|
|||
|
|
|||
|
|
|||
|
pop esi
|
|||
|
pop edx
|
|||
|
pop ecx
|
|||
|
;pop ebx
|
|||
|
;pop eax
|
|||
|
ret
|
|||
|
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>뢮<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>㦥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;
|
|||
|
|
|||
|
showcfg:
|
|||
|
push eax
|
|||
|
push ebx
|
|||
|
push ecx
|
|||
|
push edx
|
|||
|
push edi
|
|||
|
|
|||
|
|
|||
|
xor edx, edx ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD>稪
|
|||
|
|
|||
|
sc_loop:
|
|||
|
|
|||
|
cmp edx, TABLE_SIZE
|
|||
|
jnb sc_end
|
|||
|
|
|||
|
;
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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 eax, VNAME_LEN
|
|||
|
imul eax, edx
|
|||
|
lea eax, [nvtable + eax]
|
|||
|
|
|||
|
mov cl, [eax]
|
|||
|
cmp cl, byte 0
|
|||
|
jz sc_next
|
|||
|
|
|||
|
push eax
|
|||
|
call strlen
|
|||
|
|
|||
|
mov ecx, eax
|
|||
|
pop eax
|
|||
|
|
|||
|
mov ebx, cfgbuff
|
|||
|
|
|||
|
call strcpy
|
|||
|
|
|||
|
mov [cfgbuff + ecx], ':'
|
|||
|
|
|||
|
lea ebx, [cfgbuff + ecx + 1]
|
|||
|
|
|||
|
mov eax, VAR_LEN
|
|||
|
imul eax, edx
|
|||
|
lea eax, [vtable + eax]
|
|||
|
|
|||
|
push eax
|
|||
|
call strlen
|
|||
|
|
|||
|
mov ecx, eax
|
|||
|
pop eax
|
|||
|
|
|||
|
call strcpy
|
|||
|
|
|||
|
mov [ebx + ecx], byte 0
|
|||
|
|
|||
|
mov eax, cfgbuff
|
|||
|
xor ebx, ebx
|
|||
|
call writemsg
|
|||
|
|
|||
|
sc_next:
|
|||
|
|
|||
|
inc edx
|
|||
|
|
|||
|
jmp sc_loop
|
|||
|
|
|||
|
|
|||
|
|
|||
|
sc_end:
|
|||
|
pop edi
|
|||
|
pop edx
|
|||
|
pop ecx
|
|||
|
pop ebx
|
|||
|
pop eax
|
|||
|
|
|||
|
ret
|
|||
|
|