fasm updated to 1.67.15

git-svn-id: svn://kolibrios.org@220 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
heavyiron 2006-11-26 01:43:33 +00:00
parent 0d0ebf947b
commit eefd849556
6 changed files with 51 additions and 34 deletions

View File

@ -618,7 +618,7 @@ load_directive:
load_from_code:
cmp byte [esi],'.'
je invalid_value
call get_qword_value
call get_address_value
call calculate_relative_offset
push esi edi
cmp [next_pass_needed],0
@ -676,7 +676,7 @@ store_directive:
jne invalid_argument
cmp byte [esi],'.'
je invalid_value
call get_qword_value
call get_address_value
call calculate_relative_offset
push esi edi
cmp [next_pass_needed],0

View File

@ -2,7 +2,7 @@
; flat assembler core
; Copyright (c) 1999-2006, Tomasz Grysztar.
; All rights reserved.
convert_expression:
push ebp
call get_fp_value
@ -1828,10 +1828,10 @@ get_word_value:
mov [value_size],2
mov [size_override],-1
call calculate_expression
mov eax,[edi+16]
mov [symbol_identifier],eax
cmp word [edi+8],0
jne invalid_value
mov eax,[edi+16]
mov [symbol_identifier],eax
mov al,[edi+12]
mov [value_type],al
cmp al,2
@ -1859,10 +1859,10 @@ get_dword_value:
mov [value_size],4
mov [size_override],-1
call calculate_expression
mov eax,[edi+16]
mov [symbol_identifier],eax
cmp word [edi+8],0
jne invalid_value
mov eax,[edi+16]
mov [symbol_identifier],eax
mov al,[edi+12]
mov [value_type],al
cmp al,4
@ -1913,10 +1913,10 @@ get_qword_value:
mov [value_size],8
mov [size_override],-1
call calculate_expression
mov eax,[edi+16]
mov [symbol_identifier],eax
cmp word [edi+8],0
jne invalid_value
mov eax,[edi+16]
mov [symbol_identifier],eax
mov al,[edi+12]
mov [value_type],al
check_qword_value:
@ -1963,6 +1963,18 @@ get_value:
xor edx,edx
movzx eax,al
ret
get_address_word_value:
mov [address_size],2
mov [value_size],2
jmp calculate_address
get_address_dword_value:
mov [address_size],4
mov [value_size],4
jmp calculate_address
get_address_qword_value:
mov [address_size],8
mov [value_size],8
jmp calculate_address
get_address_value:
mov [address_size],0
mov [value_size],8
@ -2093,26 +2105,32 @@ get_address_value:
je special_index_scale
check_index_scale:
or cl,cl
jz address_registers_ok
jz check_immediate_address
cmp cl,1
je address_registers_ok
je check_immediate_address
cmp cl,2
je address_registers_ok
je check_immediate_address
cmp cl,4
je address_registers_ok
je check_immediate_address
cmp cl,8
je address_registers_ok
je check_immediate_address
jmp invalid_address
special_index_scale:
mov bh,bl
dec cl
address_registers_ok:
jmp check_dword_value
check_immediate_address:
mov al,[address_size]
and al,0Fh
cmp al,2
je check_word_value
cmp al,4
je check_dword_value
cmp al,8
je check_qword_value
or al,al
jnz invalid_value
cmp [code_type],64
jne check_dword_value
cmp [address_size],4
je check_dword_value
jmp check_qword_value
calculate_relative_offset:
cmp [value_undefined],0
@ -2131,7 +2149,8 @@ calculate_relative_offset:
cmp bl,[labels_type]
jne invalid_use_of_symbol
mov [value_type],0
mov ecx,[symbol_identifier]
mov ecx,[address_symbol]
mov [symbol_identifier],ecx
cmp ecx,[org_symbol]
je relative_offset_ok
mov [value_type],3

View File

@ -145,7 +145,7 @@ draw_window:
get_sys_colors 1,0
mov eax,0
xor eax,eax
mov ebx,50*65536+280
mov ecx,50*65536+250
mov edx,[sc.work]

View File

@ -1,5 +1,5 @@
; flat assembler version 1.60
; Copyright (c) 1999-2005, Tomasz Grysztar
; flat assembler
; Copyright (c) 1999-2006, Tomasz Grysztar
; All rights reserved.
;
; MenuetOS system.inc by VT

View File

@ -33,7 +33,7 @@
; cannot simply be copied and put under another distribution licence
; (including the GNU Public Licence).
VERSION_STRING equ "1.67.14"
VERSION_STRING equ "1.67.15"
VERSION_MAJOR = 1
VERSION_MINOR = 67

View File

@ -3115,7 +3115,7 @@ jmp_instruction:
jmp_imm_32bit:
cmp [code_type],64
je invalid_operand_size
call get_dword_value
call get_address_dword_value
cmp [code_type],16
jne jmp_imm_32bit_prefix_ok
mov byte [edi],66h
@ -3137,7 +3137,7 @@ jmp_instruction:
jmp_imm_64bit:
cmp [code_type],64
jne invalid_operand_size
call get_qword_value
call get_address_qword_value
call calculate_jump_offset
mov ecx,edx
cdq
@ -3151,7 +3151,7 @@ jmp_instruction:
stos word [edi]
jmp instruction_assembled
jmp_imm_16bit:
call get_word_value
call get_address_word_value
cmp [code_type],16
je jmp_imm_16bit_prefix_ok
mov byte [edi],66h
@ -3290,7 +3290,7 @@ conditional_jump:
conditional_jump_32bit:
cmp [code_type],64
je invalid_operand_size
call get_dword_value
call get_address_dword_value
cmp [code_type],16
jne conditional_jump_32bit_prefix_ok
mov byte [edi],66h
@ -3314,7 +3314,7 @@ conditional_jump:
conditional_jump_64bit:
cmp [code_type],64
jne invalid_operand_size
call get_qword_value
call get_address_qword_value
call calculate_jump_offset
mov ecx,edx
cdq
@ -3328,7 +3328,7 @@ conditional_jump:
stos word [edi]
jmp instruction_assembled
conditional_jump_16bit:
call get_word_value
call get_address_word_value
cmp [code_type],16
je conditional_jump_16bit_prefix_ok
mov byte [edi],66h
@ -3392,7 +3392,7 @@ loop_instruction:
loop_jump_32bit:
cmp [code_type],64
je invalid_operand_size
call get_dword_value
call get_address_dword_value
cmp [code_type],16
jne loop_jump_32bit_prefix_ok
mov byte [edi],66h
@ -3407,7 +3407,7 @@ loop_instruction:
loop_jump_64bit:
cmp [code_type],64
jne invalid_operand_size
call get_qword_value
call get_address_qword_value
call calculate_jump_offset
mov ecx,edx
cdq
@ -3415,7 +3415,7 @@ loop_instruction:
jne value_out_of_range
jmp make_loop_jump
loop_jump_16bit:
call get_word_value
call get_address_word_value
cmp [code_type],16
je loop_jump_16bit_prefix_ok
mov byte [edi],66h
@ -6020,8 +6020,6 @@ get_address:
cdq
cmp edx,[address_high]
jne value_out_of_range
mov edx,[symbol_identifier]
mov [address_symbol],edx
mov edx,eax
ror ecx,16
mov cl,[value_type]