kolibrios-gitea/programs/network/icq/trunk/parser.inc

697 lines
10 KiB
PHP
Raw Normal View History

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