forked from KolibriOS/kolibrios
fasm updated to 1.67.15
git-svn-id: svn://kolibrios.org@220 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
0d0ebf947b
commit
eefd849556
@ -618,7 +618,7 @@ load_directive:
|
|||||||
load_from_code:
|
load_from_code:
|
||||||
cmp byte [esi],'.'
|
cmp byte [esi],'.'
|
||||||
je invalid_value
|
je invalid_value
|
||||||
call get_qword_value
|
call get_address_value
|
||||||
call calculate_relative_offset
|
call calculate_relative_offset
|
||||||
push esi edi
|
push esi edi
|
||||||
cmp [next_pass_needed],0
|
cmp [next_pass_needed],0
|
||||||
@ -676,7 +676,7 @@ store_directive:
|
|||||||
jne invalid_argument
|
jne invalid_argument
|
||||||
cmp byte [esi],'.'
|
cmp byte [esi],'.'
|
||||||
je invalid_value
|
je invalid_value
|
||||||
call get_qword_value
|
call get_address_value
|
||||||
call calculate_relative_offset
|
call calculate_relative_offset
|
||||||
push esi edi
|
push esi edi
|
||||||
cmp [next_pass_needed],0
|
cmp [next_pass_needed],0
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
; flat assembler core
|
; flat assembler core
|
||||||
; Copyright (c) 1999-2006, Tomasz Grysztar.
|
; Copyright (c) 1999-2006, Tomasz Grysztar.
|
||||||
; All rights reserved.
|
; All rights reserved.
|
||||||
|
|
||||||
convert_expression:
|
convert_expression:
|
||||||
push ebp
|
push ebp
|
||||||
call get_fp_value
|
call get_fp_value
|
||||||
@ -1828,10 +1828,10 @@ get_word_value:
|
|||||||
mov [value_size],2
|
mov [value_size],2
|
||||||
mov [size_override],-1
|
mov [size_override],-1
|
||||||
call calculate_expression
|
call calculate_expression
|
||||||
mov eax,[edi+16]
|
|
||||||
mov [symbol_identifier],eax
|
|
||||||
cmp word [edi+8],0
|
cmp word [edi+8],0
|
||||||
jne invalid_value
|
jne invalid_value
|
||||||
|
mov eax,[edi+16]
|
||||||
|
mov [symbol_identifier],eax
|
||||||
mov al,[edi+12]
|
mov al,[edi+12]
|
||||||
mov [value_type],al
|
mov [value_type],al
|
||||||
cmp al,2
|
cmp al,2
|
||||||
@ -1859,10 +1859,10 @@ get_dword_value:
|
|||||||
mov [value_size],4
|
mov [value_size],4
|
||||||
mov [size_override],-1
|
mov [size_override],-1
|
||||||
call calculate_expression
|
call calculate_expression
|
||||||
mov eax,[edi+16]
|
|
||||||
mov [symbol_identifier],eax
|
|
||||||
cmp word [edi+8],0
|
cmp word [edi+8],0
|
||||||
jne invalid_value
|
jne invalid_value
|
||||||
|
mov eax,[edi+16]
|
||||||
|
mov [symbol_identifier],eax
|
||||||
mov al,[edi+12]
|
mov al,[edi+12]
|
||||||
mov [value_type],al
|
mov [value_type],al
|
||||||
cmp al,4
|
cmp al,4
|
||||||
@ -1913,10 +1913,10 @@ get_qword_value:
|
|||||||
mov [value_size],8
|
mov [value_size],8
|
||||||
mov [size_override],-1
|
mov [size_override],-1
|
||||||
call calculate_expression
|
call calculate_expression
|
||||||
mov eax,[edi+16]
|
|
||||||
mov [symbol_identifier],eax
|
|
||||||
cmp word [edi+8],0
|
cmp word [edi+8],0
|
||||||
jne invalid_value
|
jne invalid_value
|
||||||
|
mov eax,[edi+16]
|
||||||
|
mov [symbol_identifier],eax
|
||||||
mov al,[edi+12]
|
mov al,[edi+12]
|
||||||
mov [value_type],al
|
mov [value_type],al
|
||||||
check_qword_value:
|
check_qword_value:
|
||||||
@ -1963,6 +1963,18 @@ get_value:
|
|||||||
xor edx,edx
|
xor edx,edx
|
||||||
movzx eax,al
|
movzx eax,al
|
||||||
ret
|
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:
|
get_address_value:
|
||||||
mov [address_size],0
|
mov [address_size],0
|
||||||
mov [value_size],8
|
mov [value_size],8
|
||||||
@ -2093,26 +2105,32 @@ get_address_value:
|
|||||||
je special_index_scale
|
je special_index_scale
|
||||||
check_index_scale:
|
check_index_scale:
|
||||||
or cl,cl
|
or cl,cl
|
||||||
jz address_registers_ok
|
jz check_immediate_address
|
||||||
cmp cl,1
|
cmp cl,1
|
||||||
je address_registers_ok
|
je check_immediate_address
|
||||||
cmp cl,2
|
cmp cl,2
|
||||||
je address_registers_ok
|
je check_immediate_address
|
||||||
cmp cl,4
|
cmp cl,4
|
||||||
je address_registers_ok
|
je check_immediate_address
|
||||||
cmp cl,8
|
cmp cl,8
|
||||||
je address_registers_ok
|
je check_immediate_address
|
||||||
jmp invalid_address
|
jmp invalid_address
|
||||||
special_index_scale:
|
special_index_scale:
|
||||||
mov bh,bl
|
mov bh,bl
|
||||||
dec cl
|
dec cl
|
||||||
address_registers_ok:
|
|
||||||
jmp check_dword_value
|
|
||||||
check_immediate_address:
|
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
|
cmp [code_type],64
|
||||||
jne check_dword_value
|
jne check_dword_value
|
||||||
cmp [address_size],4
|
|
||||||
je check_dword_value
|
|
||||||
jmp check_qword_value
|
jmp check_qword_value
|
||||||
calculate_relative_offset:
|
calculate_relative_offset:
|
||||||
cmp [value_undefined],0
|
cmp [value_undefined],0
|
||||||
@ -2131,7 +2149,8 @@ calculate_relative_offset:
|
|||||||
cmp bl,[labels_type]
|
cmp bl,[labels_type]
|
||||||
jne invalid_use_of_symbol
|
jne invalid_use_of_symbol
|
||||||
mov [value_type],0
|
mov [value_type],0
|
||||||
mov ecx,[symbol_identifier]
|
mov ecx,[address_symbol]
|
||||||
|
mov [symbol_identifier],ecx
|
||||||
cmp ecx,[org_symbol]
|
cmp ecx,[org_symbol]
|
||||||
je relative_offset_ok
|
je relative_offset_ok
|
||||||
mov [value_type],3
|
mov [value_type],3
|
||||||
|
@ -145,7 +145,7 @@ draw_window:
|
|||||||
|
|
||||||
get_sys_colors 1,0
|
get_sys_colors 1,0
|
||||||
|
|
||||||
mov eax,0
|
xor eax,eax
|
||||||
mov ebx,50*65536+280
|
mov ebx,50*65536+280
|
||||||
mov ecx,50*65536+250
|
mov ecx,50*65536+250
|
||||||
mov edx,[sc.work]
|
mov edx,[sc.work]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
; flat assembler version 1.60
|
; flat assembler
|
||||||
; Copyright (c) 1999-2005, Tomasz Grysztar
|
; Copyright (c) 1999-2006, Tomasz Grysztar
|
||||||
; All rights reserved.
|
; All rights reserved.
|
||||||
;
|
;
|
||||||
; MenuetOS system.inc by VT
|
; MenuetOS system.inc by VT
|
||||||
|
@ -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.14"
|
VERSION_STRING equ "1.67.15"
|
||||||
|
|
||||||
VERSION_MAJOR = 1
|
VERSION_MAJOR = 1
|
||||||
VERSION_MINOR = 67
|
VERSION_MINOR = 67
|
||||||
|
@ -3115,7 +3115,7 @@ jmp_instruction:
|
|||||||
jmp_imm_32bit:
|
jmp_imm_32bit:
|
||||||
cmp [code_type],64
|
cmp [code_type],64
|
||||||
je invalid_operand_size
|
je invalid_operand_size
|
||||||
call get_dword_value
|
call get_address_dword_value
|
||||||
cmp [code_type],16
|
cmp [code_type],16
|
||||||
jne jmp_imm_32bit_prefix_ok
|
jne jmp_imm_32bit_prefix_ok
|
||||||
mov byte [edi],66h
|
mov byte [edi],66h
|
||||||
@ -3137,7 +3137,7 @@ jmp_instruction:
|
|||||||
jmp_imm_64bit:
|
jmp_imm_64bit:
|
||||||
cmp [code_type],64
|
cmp [code_type],64
|
||||||
jne invalid_operand_size
|
jne invalid_operand_size
|
||||||
call get_qword_value
|
call get_address_qword_value
|
||||||
call calculate_jump_offset
|
call calculate_jump_offset
|
||||||
mov ecx,edx
|
mov ecx,edx
|
||||||
cdq
|
cdq
|
||||||
@ -3151,7 +3151,7 @@ jmp_instruction:
|
|||||||
stos word [edi]
|
stos word [edi]
|
||||||
jmp instruction_assembled
|
jmp instruction_assembled
|
||||||
jmp_imm_16bit:
|
jmp_imm_16bit:
|
||||||
call get_word_value
|
call get_address_word_value
|
||||||
cmp [code_type],16
|
cmp [code_type],16
|
||||||
je jmp_imm_16bit_prefix_ok
|
je jmp_imm_16bit_prefix_ok
|
||||||
mov byte [edi],66h
|
mov byte [edi],66h
|
||||||
@ -3290,7 +3290,7 @@ conditional_jump:
|
|||||||
conditional_jump_32bit:
|
conditional_jump_32bit:
|
||||||
cmp [code_type],64
|
cmp [code_type],64
|
||||||
je invalid_operand_size
|
je invalid_operand_size
|
||||||
call get_dword_value
|
call get_address_dword_value
|
||||||
cmp [code_type],16
|
cmp [code_type],16
|
||||||
jne conditional_jump_32bit_prefix_ok
|
jne conditional_jump_32bit_prefix_ok
|
||||||
mov byte [edi],66h
|
mov byte [edi],66h
|
||||||
@ -3314,7 +3314,7 @@ conditional_jump:
|
|||||||
conditional_jump_64bit:
|
conditional_jump_64bit:
|
||||||
cmp [code_type],64
|
cmp [code_type],64
|
||||||
jne invalid_operand_size
|
jne invalid_operand_size
|
||||||
call get_qword_value
|
call get_address_qword_value
|
||||||
call calculate_jump_offset
|
call calculate_jump_offset
|
||||||
mov ecx,edx
|
mov ecx,edx
|
||||||
cdq
|
cdq
|
||||||
@ -3328,7 +3328,7 @@ conditional_jump:
|
|||||||
stos word [edi]
|
stos word [edi]
|
||||||
jmp instruction_assembled
|
jmp instruction_assembled
|
||||||
conditional_jump_16bit:
|
conditional_jump_16bit:
|
||||||
call get_word_value
|
call get_address_word_value
|
||||||
cmp [code_type],16
|
cmp [code_type],16
|
||||||
je conditional_jump_16bit_prefix_ok
|
je conditional_jump_16bit_prefix_ok
|
||||||
mov byte [edi],66h
|
mov byte [edi],66h
|
||||||
@ -3392,7 +3392,7 @@ loop_instruction:
|
|||||||
loop_jump_32bit:
|
loop_jump_32bit:
|
||||||
cmp [code_type],64
|
cmp [code_type],64
|
||||||
je invalid_operand_size
|
je invalid_operand_size
|
||||||
call get_dword_value
|
call get_address_dword_value
|
||||||
cmp [code_type],16
|
cmp [code_type],16
|
||||||
jne loop_jump_32bit_prefix_ok
|
jne loop_jump_32bit_prefix_ok
|
||||||
mov byte [edi],66h
|
mov byte [edi],66h
|
||||||
@ -3407,7 +3407,7 @@ loop_instruction:
|
|||||||
loop_jump_64bit:
|
loop_jump_64bit:
|
||||||
cmp [code_type],64
|
cmp [code_type],64
|
||||||
jne invalid_operand_size
|
jne invalid_operand_size
|
||||||
call get_qword_value
|
call get_address_qword_value
|
||||||
call calculate_jump_offset
|
call calculate_jump_offset
|
||||||
mov ecx,edx
|
mov ecx,edx
|
||||||
cdq
|
cdq
|
||||||
@ -3415,7 +3415,7 @@ loop_instruction:
|
|||||||
jne value_out_of_range
|
jne value_out_of_range
|
||||||
jmp make_loop_jump
|
jmp make_loop_jump
|
||||||
loop_jump_16bit:
|
loop_jump_16bit:
|
||||||
call get_word_value
|
call get_address_word_value
|
||||||
cmp [code_type],16
|
cmp [code_type],16
|
||||||
je loop_jump_16bit_prefix_ok
|
je loop_jump_16bit_prefix_ok
|
||||||
mov byte [edi],66h
|
mov byte [edi],66h
|
||||||
@ -6020,8 +6020,6 @@ get_address:
|
|||||||
cdq
|
cdq
|
||||||
cmp edx,[address_high]
|
cmp edx,[address_high]
|
||||||
jne value_out_of_range
|
jne value_out_of_range
|
||||||
mov edx,[symbol_identifier]
|
|
||||||
mov [address_symbol],edx
|
|
||||||
mov edx,eax
|
mov edx,eax
|
||||||
ror ecx,16
|
ror ecx,16
|
||||||
mov cl,[value_type]
|
mov cl,[value_type]
|
||||||
|
Loading…
Reference in New Issue
Block a user