release 1.44

This commit is contained in:
Tomasz Grysztar 2003-01-19 12:00:00 +00:00
parent e9e710ec4b
commit 2edc86c9b2
12 changed files with 421 additions and 340 deletions

554
FASM.TXT

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
flat assembler version 1.43
flat assembler version 1.44
Copyright (c) 1999-2003, Tomasz Grysztar.
All rights reserved.

View file

@ -4,9 +4,15 @@
; All rights reserved.
assembler:
mov edi,[labels_list]
mov ecx,[memory_end]
sub ecx,edi
mov edi,ecx
sub ecx,[labels_list]
shr ecx,3
imul ecx,20
sub edi,ecx
cmp edi,[code_start]
jbe out_of_memory
mov [labels_list],edi
shr ecx,2
xor eax,eax
rep stos dword [edi]
@ -68,17 +74,17 @@ assembler:
jz symbol_defined_ok
sub cl,[eax+9]
cmp cl,1
jne check_next_symbol
jne symbol_defined_ok
and byte [eax+8],not 1
or [next_pass_needed],-1
symbol_defined_ok:
test byte [eax+8],10h
jz check_next_symbol
mov cl,[current_pass]
cmp cl,[eax+18]
jne check_next_symbol
cmp byte [eax+19],1
je check_used_prediction
cmp byte [eax+19],2
cmp cl,[eax+17]
jne check_next_symbol
test byte [eax+8],20h
jnz check_used_prediction
cmp cl,[eax+16]
jne check_next_symbol
test byte [eax+8],8
@ -200,6 +206,12 @@ assemble_line:
jmp continue_line
define_constant:
lods dword [esi]
inc esi
or eax,eax
jz org_directive
cmp eax,0Fh
jb invalid_use_of_symbol
je reserved_word_used_as_symbol
mov edx,[eax+8]
push edx
cmp [current_pass],0
@ -213,7 +225,7 @@ assemble_line:
mov [eax+8],dl
get_constant_value:
push eax
lods byte [esi]
mov al,byte [esi-1]
push eax
call get_value
pop ebx

View file

@ -654,7 +654,10 @@ make_timestamp:
mov eax,ecx
shr eax,1
add ebp,eax
cmp ecx,2
jb months_correction_ok
sub ebp,2
months_correction_ok:
cmp ecx,2
jbe day_correction_ok
pop cx

View file

@ -1999,6 +1999,8 @@ get_logical_value:
find_eq_symbol:
cmp byte [esi],81h
je compare_symbols
cmp byte [esi],87h
je compare_symbol_types
cmp byte [esi],83h
je scan_symbols_list
call check_character
@ -2031,6 +2033,40 @@ get_logical_value:
call check_character
jc return_true
jmp symbols_different
compare_symbol_types:
inc esi
pop ebx
type_comparision:
call check_character
jc types_compared
mov al,[esi]
cmp al,[ebx]
jne symbols_different
cmp al,'('
jne equal_type
mov al,[esi+1]
mov ah,[ebx+1]
cmp al,ah
je equal_type
or al,al
jz symbols_different
or ah,ah
jz symbols_different
cmp al,'.'
je symbols_different
cmp ah,'.'
je symbols_different
equal_type:
call skip_symbol
xchg esi,ebx
call skip_symbol
xchg esi,ebx
jmp type_comparision
types_compared:
cmp byte [ebx],87h
jne return_false
jmp return_true
scan_symbols_list:
or bl,bl
jnz invalid_expression
@ -2211,25 +2247,22 @@ get_logical_value:
jb invalid_use_of_symbol
je reserved_word_used_as_symbol
inc esi
or byte [eax+8],10h
test byte [eax+8],8
jz never_used
jz not_used
mov cl,[current_pass]
sub cl,[eax+16]
cmp cl,1
jb return_true
ja not_used
mov cl,[current_pass]
mov [eax+18],cl
mov byte [eax+19],1
mov [eax+17],cl
or byte [eax+8],20h
jmp return_true
never_used:
cmp [current_pass],0
jne not_used
or [next_pass_needed],-1
not_used:
mov cl,[current_pass]
mov [eax+18],cl
mov byte [eax+19],2
mov [eax+17],cl
and byte [eax+8],not 20h
return_false:
xor al,al
jmp logical_value_ok

View file

@ -123,9 +123,8 @@ parse_line:
call get_label_id
cmp eax,10h
jb label_identified
mov ebx,[eax+4]
cmp ebx,eax
je anonymous_label_name
or ebx,ebx
jz anonymous_label_name
dec ebx
mov [current_locals_prefix],ebx
label_identified:
@ -762,37 +761,36 @@ get_label_id:
or eax,eax
jnz anonymous_ok
mov eax,[labels_list]
sub eax,20
sub eax,8
mov [labels_list],eax
cmp eax,edi
jbe out_of_memory
mov dword [eax],0
mov [eax+4],eax
mov [anonymous_forward],eax
anonymous_ok:
ret
xor ebx,ebx
jmp make_label_id
anonymous_back:
add esi,2
mov eax,[anonymous_reverse]
or eax,eax
jz invalid_value
ret
jmp anonymous_ok
new_anonymous:
add esi,2
mov eax,[anonymous_forward]
or eax,eax
jnz new_anonymous_ok
mov eax,[labels_list]
sub eax,20
sub eax,8
mov [labels_list],eax
cmp eax,edi
jbe out_of_memory
mov dword [eax],0
mov [eax+4],eax
new_anonymous_ok:
mov [anonymous_reverse],eax
mov [anonymous_forward],0
ret
jmp anonymous_ok
standard_label:
cmp ecx,1
jne find_label
@ -832,24 +830,10 @@ get_label_id:
mov ebx,esi
mov edx,ecx
mov eax,[labels_list]
check_label:
mov esi,ebx
mov ecx,edx
cmp eax,[memory_end]
je add_label
cmp ebp,[eax]
jne next_label
mov edi,[eax+4]
repe cmps byte [esi],[edi]
je label_found
next_label:
add eax,20
jmp check_label
label_found:
add esp,4
pop edi
ret
jne scan_hashes
add_label:
mov ecx,edx
pop esi
cmp byte [esi-1],0
je label_name_ok
@ -880,20 +864,46 @@ get_label_id:
jnc reserved_word
label_name_ok:
mov eax,[labels_list]
sub eax,20
sub eax,8
mov [labels_list],eax
mov [eax+4],esi
mov ebx,esi
add esi,ecx
mov edx,[label_hash]
mov [eax],edx
pop edi
cmp eax,edi
jbe out_of_memory
ret
jmp make_label_id
reserved_word:
mov eax,0Fh
pop edi
ret
align 16
scan_hashes:
cmp ebp,[eax]
je check_label
next_label:
add eax,8
cmp eax,[memory_end]
jne scan_hashes
jmp add_label
check_label:
mov esi,ebx
mov ecx,edx
mov edi,[eax+4]
repe cmps byte [esi],[edi]
jne next_label
label_found:
add esp,4
pop edi
mov ebx,[eax+4]
make_label_id:
sub eax,[memory_end]
sar eax,3
imul eax,20
add eax,[memory_end]
ret
operators:
db 1,'+',80h
@ -920,6 +930,7 @@ directive_operators:
db 2,'at',80h
db 7,'defined',88h
db 2,'eq',81h
db 6,'eqtype',87h
db 4,'from',82h
db 2,'in',83h
db 2,'on',84h

View file

@ -293,9 +293,23 @@ preprocess_line:
je preprocess_instruction
cmp al,1Ah
jne not_preprocessor_symbol
cmp dword [esi],3+'equ' shl 8
je define_symbolic_constant
lods byte [esi]
cmp al,3
jne not_symbolic_constant
mov ebx,characters
movzx eax,byte [esi]
xlat byte [ebx]
ror eax,8
mov al,[esi+1]
xlat byte [ebx]
ror eax,8
mov al,[esi+2]
xlat byte [ebx]
ror eax,16
cmp eax,'equ'
je define_symbolic_constant
mov al,3
not_symbolic_constant:
mov ah,1
call get_macro
jc not_preprocessor_symbol
@ -370,7 +384,7 @@ process_symbolic_constants:
mov ecx,eax
mov esi,ebx
cmp edx,[additional_memory_end]
je not_symbolic_constant
je symbolic_constants_ok
cmp al,[edx]
jne next_symbolic_constant
mov edi,[edx+4]
@ -379,7 +393,7 @@ process_symbolic_constants:
next_symbolic_constant:
add edx,16
jmp scan_symbolic_constants
not_symbolic_constant:
symbolic_constants_ok:
pop edi
stc
ret
@ -525,7 +539,7 @@ include_file:
jc file_not_found
jmp line_preprocessed
define_symbolic_constant:
add esi,4
add esi,3
push esi
call process_symbolic_constants
pop ebx

View file

@ -1,5 +1,5 @@
; flat assembler version 1.43
; flat assembler version 1.44
; Copyright (c) 1999-2003, Tomasz Grysztar.
; All rights reserved.
;
@ -33,7 +33,7 @@
; cannot simply be copied and put under another distribution licence
; (including the GNU Public Licence).
VERSION_STRING equ "1.43"
VERSION_STRING equ "1.44"
VERSION_MAJOR = 1
VERSION_MINOR = 43
VERSION_MINOR = 44

View file

@ -3,9 +3,9 @@
; Copyright (c) 1999-2003, Tomasz Grysztar.
; All rights reserved.
format PE console on '..\dos\fasm.com'
format PE console on '..\DOS\fasm.com'
macro align value { rb (value-1) - (rva $ + value-1) mod value }
macro align value { rb (value-1) - (RVA $ + value-1) mod value }
start:

View file

@ -463,7 +463,10 @@ make_timestamp:
mov eax,ecx
shr eax,1
add ebp,eax
cmp ecx,2
jb months_correction_ok
sub ebp,2
months_correction_ok:
cmp ecx,2
jbe day_correction_ok
movzx ecx,word [buffer]

View file

@ -7042,6 +7042,10 @@ instructions_5:
dw mmx_instruction-assembler
db 'pavgw',0E3h
dw mmx_instruction-assembler
db 'pf2id',1Dh
dw amd3dnow_instruction-assembler
db 'pf2iw',1Ch
dw amd3dnow_instruction-assembler
db 'pfacc',0AEh
dw amd3dnow_instruction-assembler
db 'pfadd',9Eh
@ -7060,10 +7064,6 @@ instructions_5:
dw amd3dnow_instruction-assembler
db 'pi2fw',0Ch
dw amd3dnow_instruction-assembler
db 'pi2id',1Dh
dw amd3dnow_instruction-assembler
db 'pi2iw',1Ch
dw amd3dnow_instruction-assembler
db 'popad',61h
dw simple_instruction_32bit-assembler
db 'popaw',61h

View file

@ -1,8 +1,15 @@
Visit http://fasm.sourceforge.net for more information
version 1.44
[19-01-2003]
------------
[+] added "eqtype" operator
[-] fixed cache waste in label parser
[-] small fixes and optimizations
version 1.43
[10-01-2002]
[30-12-2002]
------------
[+] introduced ELF output format
[+] extended public and extrn syntax