fasm: update to 1.71.54

git-svn-id: svn://kolibrios.org@6467 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2016-08-01 01:31:26 +00:00
parent 3e57c7257b
commit 25b23034ea
14 changed files with 4741 additions and 2176 deletions
+36 -12
View File
@@ -1,6 +1,6 @@
; flat assembler core
; Copyright (c) 1999-2013, Tomasz Grysztar.
; Copyright (c) 1999-2016, Tomasz Grysztar.
; All rights reserved.
parser:
@@ -34,6 +34,7 @@ parser:
add esi,16
parse_line:
mov [formatter_symbols_allowed],0
mov [decorator_symbols_allowed],0
cmp byte [esi],1Ah
jne empty_instruction
push edi
@@ -529,15 +530,20 @@ parse_line_contents:
cmp al,']'
je separator
cmp al,'{'
je unallowed_character
je open_decorator
cmp al,'}'
je unallowed_character
je close_decorator
cmp al,'#'
je unallowed_character
cmp al,'`'
je unallowed_character
cmp al,3Bh
je foreign_argument
cmp [decorator_symbols_allowed],0
je not_a_separator
cmp al,'-'
je separator
not_a_separator:
dec esi
cmp al,1Ah
jne expression_argument
@@ -825,7 +831,7 @@ parse_line_contents:
jb stack_overflow
push esi edi
inc esi
mov al,'{'
mov al,91h
stos byte [edi]
inc [parenthesis_stack]
jmp parse_argument
@@ -879,10 +885,16 @@ parse_line_contents:
lods byte [esi]
cmp al,']'
je address_parsed
cmp al,','
je divided_address
dec esi
mov al,')'
stos byte [edi]
jmp argument_parsed
divided_address:
mov ax,'),'
stos word [edi]
jmp expression
address_parsed:
mov al,']'
stos byte [edi]
@@ -908,8 +920,9 @@ parse_line_contents:
jne unknown_segment_prefix
mov al,ah
and ah,11110000b
cmp ah,60h
cmp ah,30h
jne unknown_segment_prefix
add al,30h
stos byte [edi]
jmp convert_address
unknown_segment_prefix:
@@ -928,13 +941,19 @@ parse_line_contents:
cmp byte [esi],'('
jne argument_parsed
inc esi
mov al,'{'
mov al,91h
jmp separator
unallowed_character:
mov al,0FFh
jmp separator
open_decorator:
inc [decorator_symbols_allowed]
jmp separator
close_decorator:
dec [decorator_symbols_allowed]
jmp separator
close_parenthesis:
mov al,'}'
mov al,92h
separator:
stos byte [edi]
argument_parsed:
@@ -1049,7 +1068,7 @@ get_symbol:
mov ecx,ebp
cmp cl,11
ja no_symbol
sub cl,2
sub cl,1
jc no_symbol
movzx ebx,word [symbols+ecx*4]
add ebx,symbols
@@ -1070,6 +1089,8 @@ get_symbol:
mov ax,[edi]
cmp al,18h
jb symbol_ok
cmp al,1Fh
je decorator_symbol
cmp [formatter_symbols_allowed],0
je no_symbol
symbol_ok:
@@ -1077,6 +1098,9 @@ get_symbol:
add esi,ebp
clc
ret
decorator_symbol:
cmp [decorator_symbols_allowed],0
jne symbol_ok
no_symbol:
pop esi
mov ecx,ebp
@@ -1258,7 +1282,7 @@ get_label_id:
inc esi
cmp byte [esi-1],'$'
je get_org_origin_id
sub esi,ecx
sub esi,2
jmp find_label
get_current_offset_id:
xor eax,eax
@@ -1363,12 +1387,12 @@ get_label_id:
cmp al,30h
jb name_first_char_ok
cmp al,39h
jbe invalid_name
jbe numeric_name
name_first_char_ok:
cmp al,'$'
jne check_for_reserved_word
cmp ecx,1
jne invalid_name
numeric_name:
add esi,ecx
reserved_word:
mov eax,0Fh
pop edi