mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-28 19:53:12 +03:00
fasm 1.67.23
git-svn-id: svn://kolibrios.org@624 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
63328e8522
commit
48a2a652db
@ -579,7 +579,8 @@ get_fp_value:
|
|||||||
pop dword [edi+4]
|
pop dword [edi+4]
|
||||||
pop dword [edi]
|
pop dword [edi]
|
||||||
pop ecx
|
pop ecx
|
||||||
loop fp_after_dot
|
dec ecx
|
||||||
|
jnz fp_after_dot
|
||||||
jmp fp_done
|
jmp fp_done
|
||||||
fp_exponent:
|
fp_exponent:
|
||||||
or [fp_format],80h
|
or [fp_format],80h
|
||||||
|
@ -276,9 +276,19 @@ public_directive:
|
|||||||
bt [format_flags],0
|
bt [format_flags],0
|
||||||
jc illegal_instruction
|
jc illegal_instruction
|
||||||
public_allowed:
|
public_allowed:
|
||||||
|
mov [base_code],0C0h
|
||||||
|
lods byte [esi]
|
||||||
|
cmp al,2
|
||||||
|
je public_label
|
||||||
|
cmp al,1Dh
|
||||||
|
jne invalid_argument
|
||||||
|
lods byte [esi]
|
||||||
|
and al,7
|
||||||
|
add [base_code],al
|
||||||
lods byte [esi]
|
lods byte [esi]
|
||||||
cmp al,2
|
cmp al,2
|
||||||
jne invalid_argument
|
jne invalid_argument
|
||||||
|
public_label:
|
||||||
lods dword [esi]
|
lods dword [esi]
|
||||||
cmp eax,0Fh
|
cmp eax,0Fh
|
||||||
jb invalid_use_of_symbol
|
jb invalid_use_of_symbol
|
||||||
@ -304,7 +314,8 @@ public_directive:
|
|||||||
mov [ebx+4],esi
|
mov [ebx+4],esi
|
||||||
lods dword [esi]
|
lods dword [esi]
|
||||||
lea esi,[esi+eax+1]
|
lea esi,[esi+eax+1]
|
||||||
mov byte [ebx],80h
|
mov al,[base_code]
|
||||||
|
mov [ebx],al
|
||||||
jmp instruction_assembled
|
jmp instruction_assembled
|
||||||
extrn_directive:
|
extrn_directive:
|
||||||
mov al,[output_format]
|
mov al,[output_format]
|
||||||
@ -326,7 +337,7 @@ extrn_directive:
|
|||||||
cmp eax,[structures_buffer]
|
cmp eax,[structures_buffer]
|
||||||
jae out_of_memory
|
jae out_of_memory
|
||||||
mov [free_additional_memory],eax
|
mov [free_additional_memory],eax
|
||||||
mov byte [edx],81h
|
mov byte [edx],80h
|
||||||
mov [edx+4],ebx
|
mov [edx+4],ebx
|
||||||
lods byte [esi]
|
lods byte [esi]
|
||||||
cmp al,86h
|
cmp al,86h
|
||||||
@ -2408,9 +2419,10 @@ coff_formatter:
|
|||||||
mov dl,[esi]
|
mov dl,[esi]
|
||||||
or dl,dl
|
or dl,dl
|
||||||
jz enumerate_section
|
jz enumerate_section
|
||||||
|
cmp dl,0C0h
|
||||||
|
jae enumerate_public
|
||||||
cmp dl,80h
|
cmp dl,80h
|
||||||
je enumerate_public
|
jae enumerate_extrn
|
||||||
ja enumerate_extrn
|
|
||||||
add esi,0Ch
|
add esi,0Ch
|
||||||
jmp enumerate_symbols
|
jmp enumerate_symbols
|
||||||
enumerate_section:
|
enumerate_section:
|
||||||
@ -2425,7 +2437,7 @@ coff_formatter:
|
|||||||
enumerate_public:
|
enumerate_public:
|
||||||
mov edx,eax
|
mov edx,eax
|
||||||
shl edx,8
|
shl edx,8
|
||||||
mov dl,80h
|
mov dl,[esi]
|
||||||
mov [esi],edx
|
mov [esi],edx
|
||||||
mov edx,[esi+8]
|
mov edx,[esi+8]
|
||||||
add esi,10h
|
add esi,10h
|
||||||
@ -2433,14 +2445,16 @@ coff_formatter:
|
|||||||
cmp byte [edx+11],2
|
cmp byte [edx+11],2
|
||||||
jne enumerate_symbols
|
jne enumerate_symbols
|
||||||
mov edx,[edx+20]
|
mov edx,[edx+20]
|
||||||
cmp byte [edx],81h
|
cmp byte [edx],0C0h
|
||||||
jne enumerate_symbols
|
jae enumerate_symbols
|
||||||
|
cmp byte [edx],80h
|
||||||
|
jb enumerate_symbols
|
||||||
inc eax
|
inc eax
|
||||||
jmp enumerate_symbols
|
jmp enumerate_symbols
|
||||||
enumerate_extrn:
|
enumerate_extrn:
|
||||||
mov edx,eax
|
mov edx,eax
|
||||||
shl edx,8
|
shl edx,8
|
||||||
mov dl,81h
|
mov dl,[esi]
|
||||||
mov [esi],edx
|
mov [esi],edx
|
||||||
add esi,0Ch
|
add esi,0Ch
|
||||||
inc eax
|
inc eax
|
||||||
@ -2461,9 +2475,10 @@ coff_formatter:
|
|||||||
mov al,[ebx]
|
mov al,[ebx]
|
||||||
or al,al
|
or al,al
|
||||||
jz skip_other_section
|
jz skip_other_section
|
||||||
|
cmp al,0C0h
|
||||||
|
jae check_public_reference
|
||||||
cmp al,80h
|
cmp al,80h
|
||||||
je check_public_reference
|
jae next_reference
|
||||||
ja next_reference
|
|
||||||
cmp edx,[ebx+8]
|
cmp edx,[ebx+8]
|
||||||
je default_section_ok
|
je default_section_ok
|
||||||
next_reference:
|
next_reference:
|
||||||
@ -2500,8 +2515,8 @@ coff_formatter:
|
|||||||
or al,al
|
or al,al
|
||||||
jz section_found
|
jz section_found
|
||||||
add esi,0Ch
|
add esi,0Ch
|
||||||
cmp al,80h
|
cmp al,0C0h
|
||||||
jne find_section
|
jb find_section
|
||||||
add esi,4
|
add esi,4
|
||||||
jmp find_section
|
jmp find_section
|
||||||
section_found:
|
section_found:
|
||||||
@ -2545,7 +2560,8 @@ coff_formatter:
|
|||||||
jz section_relocations_done
|
jz section_relocations_done
|
||||||
cmp al,80h
|
cmp al,80h
|
||||||
jb add_relocation
|
jb add_relocation
|
||||||
ja next_relocation
|
cmp al,0C0h
|
||||||
|
jb next_relocation
|
||||||
add esi,10h
|
add esi,10h
|
||||||
jmp find_relocations
|
jmp find_relocations
|
||||||
add_relocation:
|
add_relocation:
|
||||||
@ -2622,9 +2638,10 @@ coff_formatter:
|
|||||||
cmp esi,[free_additional_memory]
|
cmp esi,[free_additional_memory]
|
||||||
je symbols_table_ok
|
je symbols_table_ok
|
||||||
mov al,[esi]
|
mov al,[esi]
|
||||||
|
cmp al,0C0h
|
||||||
|
jae add_public_symbol
|
||||||
cmp al,80h
|
cmp al,80h
|
||||||
je add_public_symbol
|
jae add_extrn_symbol
|
||||||
ja add_extrn_symbol
|
|
||||||
or al,al
|
or al,al
|
||||||
jz add_section_symbol
|
jz add_section_symbol
|
||||||
add esi,0Ch
|
add esi,0Ch
|
||||||
@ -2666,7 +2683,7 @@ coff_formatter:
|
|||||||
jne invalid_use_of_symbol
|
jne invalid_use_of_symbol
|
||||||
public_symbol_type_ok:
|
public_symbol_type_ok:
|
||||||
mov ecx,[eax+20]
|
mov ecx,[eax+20]
|
||||||
cmp byte [ecx],81h
|
cmp byte [ecx],80h
|
||||||
je alias_symbol
|
je alias_symbol
|
||||||
cmp byte [ecx],0
|
cmp byte [ecx],0
|
||||||
jne invalid_use_of_symbol
|
jne invalid_use_of_symbol
|
||||||
@ -2682,7 +2699,15 @@ coff_formatter:
|
|||||||
store_public_symbol:
|
store_public_symbol:
|
||||||
mov eax,[eax]
|
mov eax,[eax]
|
||||||
mov [ebx+8],eax
|
mov [ebx+8],eax
|
||||||
mov byte [ebx+10h],2
|
mov al,2
|
||||||
|
cmp byte [esi],0C0h
|
||||||
|
je store_symbol_class
|
||||||
|
inc al
|
||||||
|
cmp byte [esi],0C1h
|
||||||
|
je store_symbol_class
|
||||||
|
mov al,105
|
||||||
|
store_symbol_class:
|
||||||
|
mov byte [ebx+10h],al
|
||||||
add esi,10h
|
add esi,10h
|
||||||
add ebx,12h
|
add ebx,12h
|
||||||
jmp make_symbols_table
|
jmp make_symbols_table
|
||||||
@ -2971,8 +2996,8 @@ elf_formatter:
|
|||||||
mov al,[esi]
|
mov al,[esi]
|
||||||
or al,al
|
or al,al
|
||||||
jz first_section_found
|
jz first_section_found
|
||||||
cmp al,80h
|
cmp al,0C0h
|
||||||
jne skip_other_symbol
|
jb skip_other_symbol
|
||||||
add esi,4
|
add esi,4
|
||||||
skip_other_symbol:
|
skip_other_symbol:
|
||||||
add esi,0Ch
|
add esi,0Ch
|
||||||
@ -2989,9 +3014,10 @@ elf_formatter:
|
|||||||
mov al,[esi]
|
mov al,[esi]
|
||||||
or al,al
|
or al,al
|
||||||
jz make_section_symbol
|
jz make_section_symbol
|
||||||
|
cmp al,0C0h
|
||||||
|
jae skip_public
|
||||||
cmp al,80h
|
cmp al,80h
|
||||||
je skip_public
|
jae skip_extrn
|
||||||
ja skip_extrn
|
|
||||||
or byte [ebx+14h],40h
|
or byte [ebx+14h],40h
|
||||||
skip_extrn:
|
skip_extrn:
|
||||||
add esi,0Ch
|
add esi,0Ch
|
||||||
@ -3050,9 +3076,10 @@ elf_formatter:
|
|||||||
mov al,[esi]
|
mov al,[esi]
|
||||||
or al,al
|
or al,al
|
||||||
jz skip_section
|
jz skip_section
|
||||||
|
cmp al,0C0h
|
||||||
|
jae make_public_symbol
|
||||||
cmp al,80h
|
cmp al,80h
|
||||||
je make_public_symbol
|
jae make_extrn_symbol
|
||||||
ja make_extrn_symbol
|
|
||||||
add esi,0Ch
|
add esi,0Ch
|
||||||
jmp find_other_symbols
|
jmp find_other_symbols
|
||||||
skip_section:
|
skip_section:
|
||||||
@ -3061,6 +3088,8 @@ elf_formatter:
|
|||||||
make_public_symbol:
|
make_public_symbol:
|
||||||
mov eax,[esi+0Ch]
|
mov eax,[esi+0Ch]
|
||||||
mov [current_line],eax
|
mov [current_line],eax
|
||||||
|
cmp byte [esi],0C0h
|
||||||
|
jne invalid_argument
|
||||||
mov ebx,[esi+8]
|
mov ebx,[esi+8]
|
||||||
test byte [ebx+8],1
|
test byte [ebx+8],1
|
||||||
jz undefined_symbol
|
jz undefined_symbol
|
||||||
@ -3133,7 +3162,7 @@ elf_formatter:
|
|||||||
inc ecx
|
inc ecx
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov al,80h
|
mov al,0C0h
|
||||||
mov [esi],eax
|
mov [esi],eax
|
||||||
add esi,10h
|
add esi,10h
|
||||||
jmp find_other_symbols
|
jmp find_other_symbols
|
||||||
@ -3173,7 +3202,7 @@ elf_formatter:
|
|||||||
inc ecx
|
inc ecx
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
shl eax,8
|
shl eax,8
|
||||||
mov al,81h
|
mov al,80h
|
||||||
mov [esi],eax
|
mov [esi],eax
|
||||||
add esi,0Ch
|
add esi,0Ch
|
||||||
jmp find_other_symbols
|
jmp find_other_symbols
|
||||||
@ -3312,7 +3341,8 @@ elf_formatter:
|
|||||||
jz relocations_converted
|
jz relocations_converted
|
||||||
cmp al,80h
|
cmp al,80h
|
||||||
jb make_relocation_entry
|
jb make_relocation_entry
|
||||||
ja relocation_entry_ok
|
cmp al,0C0h
|
||||||
|
jb relocation_entry_ok
|
||||||
add esi,10h
|
add esi,10h
|
||||||
jmp convert_relocations
|
jmp convert_relocations
|
||||||
make_relocation_entry:
|
make_relocation_entry:
|
||||||
|
@ -639,6 +639,18 @@ parse_line_contents:
|
|||||||
push esi
|
push esi
|
||||||
movzx ecx,byte [esi]
|
movzx ecx,byte [esi]
|
||||||
inc esi
|
inc esi
|
||||||
|
push esi ecx
|
||||||
|
push edi
|
||||||
|
call get_symbol
|
||||||
|
pop edi
|
||||||
|
jc parse_public_label
|
||||||
|
cmp al,1Dh
|
||||||
|
jne parse_public_label
|
||||||
|
add esp,12
|
||||||
|
stos word [edi]
|
||||||
|
jmp parse_public_directive
|
||||||
|
parse_public_label:
|
||||||
|
pop ecx esi
|
||||||
mov al,2
|
mov al,2
|
||||||
stos byte [edi]
|
stos byte [edi]
|
||||||
call get_label_id
|
call get_label_id
|
||||||
|
@ -333,6 +333,7 @@ symbols_6:
|
|||||||
db 'fixups',1Ah,5
|
db 'fixups',1Ah,5
|
||||||
db 'import',1Ah,1
|
db 'import',1Ah,1
|
||||||
db 'native',1Bh,1
|
db 'native',1Bh,1
|
||||||
|
db 'static',1Dh,1
|
||||||
symbols_7:
|
symbols_7:
|
||||||
db 'console',1Bh,3
|
db 'console',1Bh,3
|
||||||
symbols_8:
|
symbols_8:
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
; cannot simply be copied and put under another distribution licence
|
; cannot simply be copied and put under another distribution licence
|
||||||
; (including the GNU Public Licence).
|
; (including the GNU Public Licence).
|
||||||
|
|
||||||
VERSION_STRING equ "1.67.22"
|
VERSION_STRING equ "1.67.23"
|
||||||
|
|
||||||
VERSION_MAJOR = 1
|
VERSION_MAJOR = 1
|
||||||
VERSION_MINOR = 67
|
VERSION_MINOR = 67
|
||||||
|
Loading…
Reference in New Issue
Block a user