forked from KolibriOS/kolibrios
Fasm updated to 1.67.12
git-svn-id: svn://kolibrios.org@176 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ab3caba8a7
commit
bed870101d
@ -2034,17 +2034,36 @@ get_address_value:
|
|||||||
and ah,0Fh
|
and ah,0Fh
|
||||||
jz address_registers_sizes_ok
|
jz address_registers_sizes_ok
|
||||||
cmp al,ah
|
cmp al,ah
|
||||||
jne invalid_address
|
jne address_sizes_do_not_match
|
||||||
address_registers_sizes_ok:
|
address_registers_sizes_ok:
|
||||||
cmp al,4
|
cmp al,4
|
||||||
je sib_allowed
|
je sib_allowed
|
||||||
cmp al,8
|
cmp al,8
|
||||||
je sib_allowed
|
je sib_allowed
|
||||||
|
cmp al,0Fh
|
||||||
|
je check_ip_relative_address
|
||||||
or cl,cl
|
or cl,cl
|
||||||
jz check_word_value
|
jz check_word_value
|
||||||
cmp cl,1
|
cmp cl,1
|
||||||
je check_word_value
|
je check_word_value
|
||||||
jmp invalid_address
|
jmp invalid_address
|
||||||
|
address_sizes_do_not_match:
|
||||||
|
cmp al,0Fh
|
||||||
|
jne invalid_address
|
||||||
|
mov al,bh
|
||||||
|
and al,0Fh
|
||||||
|
cmp al,ah
|
||||||
|
jne invalid_address
|
||||||
|
check_ip_relative_address:
|
||||||
|
cmp bh,0F4h
|
||||||
|
je check_dword_value
|
||||||
|
cmp bh,0F8h
|
||||||
|
jne invalid_address
|
||||||
|
mov eax,[edi]
|
||||||
|
cdq
|
||||||
|
cmp edx,[edi+4]
|
||||||
|
jne range_exceeded
|
||||||
|
ret
|
||||||
get_address_register:
|
get_address_register:
|
||||||
or al,al
|
or al,al
|
||||||
jz address_register_ok
|
jz address_register_ok
|
||||||
|
@ -23,7 +23,7 @@ APP_MEMORY = 0x00800000
|
|||||||
;; Menuet header
|
;; Menuet header
|
||||||
|
|
||||||
appname equ "FASM "
|
appname equ "FASM "
|
||||||
version equ "1.67.11"
|
version equ "1.67.12"
|
||||||
|
|
||||||
use32
|
use32
|
||||||
|
|
||||||
|
@ -89,6 +89,7 @@ address_registers:
|
|||||||
db 3,'ecx',41h
|
db 3,'ecx',41h
|
||||||
db 3,'edi',47h
|
db 3,'edi',47h
|
||||||
db 3,'edx',42h
|
db 3,'edx',42h
|
||||||
|
db 3,'eip',0F4h
|
||||||
db 3,'esi',46h
|
db 3,'esi',46h
|
||||||
db 3,'esp',44h
|
db 3,'esp',44h
|
||||||
db 3,'r10',8Ah
|
db 3,'r10',8Ah
|
||||||
@ -113,7 +114,7 @@ address_registers:
|
|||||||
db 3,'rcx',81h
|
db 3,'rcx',81h
|
||||||
db 3,'rdi',87h
|
db 3,'rdi',87h
|
||||||
db 3,'rdx',82h
|
db 3,'rdx',82h
|
||||||
db 3,'rip',0F0h
|
db 3,'rip',0F8h
|
||||||
db 3,'rsi',86h
|
db 3,'rsi',86h
|
||||||
db 3,'rsp',84h
|
db 3,'rsp',84h
|
||||||
db 2,'si',26h
|
db 2,'si',26h
|
||||||
@ -514,8 +515,8 @@ instructions_3:
|
|||||||
dw single_operand_instruction-assembler
|
dw single_operand_instruction-assembler
|
||||||
db 'neg',3
|
db 'neg',3
|
||||||
dw single_operand_instruction-assembler
|
dw single_operand_instruction-assembler
|
||||||
;db 'nop',90h
|
db 'nop',90h
|
||||||
;dw nop_instruction-assembler
|
dw nop_instruction-assembler
|
||||||
db 'not',2
|
db 'not',2
|
||||||
dw single_operand_instruction-assembler
|
dw single_operand_instruction-assembler
|
||||||
db 'org',0
|
db 'org',0
|
||||||
|
@ -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.11"
|
VERSION_STRING equ "1.67.12"
|
||||||
|
|
||||||
VERSION_MAJOR = 1
|
VERSION_MAJOR = 1
|
||||||
VERSION_MINOR = 67
|
VERSION_MINOR = 67
|
||||||
|
@ -6008,15 +6008,18 @@ get_address:
|
|||||||
test ch,0Fh
|
test ch,0Fh
|
||||||
jnz address_ok
|
jnz address_ok
|
||||||
calculate_relative_address:
|
calculate_relative_address:
|
||||||
|
mov edx,[address_high]
|
||||||
call calculate_relative_offset
|
call calculate_relative_offset
|
||||||
mov [address_high],edx
|
mov [address_high],edx
|
||||||
|
cdq
|
||||||
|
cmp edx,[address_high]
|
||||||
|
jne value_out_of_range
|
||||||
mov edx,[symbol_identifier]
|
mov edx,[symbol_identifier]
|
||||||
mov [address_symbol],edx
|
mov [address_symbol],edx
|
||||||
mov edx,eax
|
mov edx,eax
|
||||||
mov bx,0FF00h
|
mov bx,0FF00h
|
||||||
address_ok:
|
address_ok:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
operand_16bit:
|
operand_16bit:
|
||||||
cmp [code_type],16
|
cmp [code_type],16
|
||||||
je size_prefix_ok
|
je size_prefix_ok
|
||||||
@ -6146,8 +6149,10 @@ store_instruction:
|
|||||||
call store_segment_prefix_if_necessary
|
call store_segment_prefix_if_necessary
|
||||||
or bx,bx
|
or bx,bx
|
||||||
jz address_immediate
|
jz address_immediate
|
||||||
cmp bx,0F000h
|
cmp bx,0F800h
|
||||||
je address_rip_based
|
je address_rip_based
|
||||||
|
cmp bx,0F400h
|
||||||
|
je address_eip_based
|
||||||
cmp bx,0FF00h
|
cmp bx,0FF00h
|
||||||
je address_relative
|
je address_relative
|
||||||
mov al,bl
|
mov al,bl
|
||||||
@ -6485,6 +6490,9 @@ store_instruction:
|
|||||||
or al,cl
|
or al,cl
|
||||||
stos word [edi]
|
stos word [edi]
|
||||||
jmp store_address_32bit_value
|
jmp store_address_32bit_value
|
||||||
|
address_eip_based:
|
||||||
|
mov al,67h
|
||||||
|
stos byte [edi]
|
||||||
address_rip_based:
|
address_rip_based:
|
||||||
cmp [code_type],64
|
cmp [code_type],64
|
||||||
jne invalid_address
|
jne invalid_address
|
||||||
|
Loading…
Reference in New Issue
Block a user