Codebase list fasm / b2a5706
New upstream version 1.73.06 Tomasz Buchert 5 years ago
8 changed file(s) with 56 addition(s) and 37 deletion(s). Raw diff Collapse all Expand all
Binary diff not shown
Binary diff not shown
00
11 flat assembler version 1.73
2 Copyright (c) 1999-2018, Tomasz Grysztar.
2 Copyright (c) 1999-2019, Tomasz Grysztar.
33 All rights reserved.
44
55 This program is free for commercial and non-commercial use as long as
39213921 cmp ecx,-1
39223922 je merge_elf_header
39233923 mov eax,[ecx+8]
3924 mov ecx,[ecx+4]
3925 elf_segment_separated_base:
39243926 mov [ebx+8],eax
39253927 mov [ebx+0Ch],eax
3926 mov ecx,[ecx+4]
39273928 mov [ebx+4],ecx
39283929 sub eax,ecx
39293930 add eax,edi
39323933 jmp elf_segment_addressing_setup
39333934 merge_elf_header:
39343935 mov eax,[image_base]
3935 mov [ebx+8],eax
3936 mov [ebx+0Ch],eax
3937 and dword [ebx+4],0
3938 add eax,edi
3939 sub eax,[code_start]
3940 xor edx,edx
3941 jmp elf_segment_addressing_setup
3936 xor ecx,ecx
3937 jmp elf_segment_separated_base
39423938 close_elf_segment:
39433939 cmp [number_of_sections],0
39443940 jne finish_elf_segment
39623958 mov edx,edi
39633959 cmp edi,[undefined_data_end]
39643960 jne elf_segment_size_ok
3961 cmp byte [ebx],1
3962 jne elf_segment_size_ok
39653963 mov edi,[undefined_data_start]
39663964 elf_segment_size_ok:
39673965 mov [ebx+14h],eax
39703968 mov [ebx+10h],eax
39713969 and [undefined_data_end],0
39723970 mov eax,[ebx+8]
3973 mov cl,[ebx]
3974 cmp cl,3
3971 cmp byte [ebx],1
3972 je elf_segment_position_move_and_align
3973 cmp [merge_segment],0
3974 jne elf_segment_position_move
3975 cmp byte [ebx],3
39753976 ja elf_segment_position_ok
3977 mov [merge_segment],ebx
3978 elf_segment_position_move:
39763979 add eax,[ebx+14h]
3977 cmp cl,1
3978 je elf_segment_position_adjust
3979 cmp [merge_segment],0
3980 jne elf_segment_position_ok
3981 mov [merge_segment],ebx
39823980 jmp elf_segment_position_ok
3983 elf_segment_position_adjust:
3981 elf_segment_position_move_and_align:
3982 add eax,[ebx+14h]
39843983 add eax,0FFFh
39853984 elf_segment_position_ok:
39863985 and eax,not 0FFFh
40694068 je merge_elf64_header
40704069 mov eax,[ecx+10h]
40714070 mov edx,[ecx+10h+4]
4071 mov ecx,[ecx+8]
4072 elf64_segment_separated_base:
40724073 mov [ebx+10h],eax
40734074 mov [ebx+10h+4],edx
40744075 mov [ebx+18h],eax
40754076 mov [ebx+18h+4],edx
4076 mov ecx,[ecx+8]
40774077 mov [ebx+8],ecx
40784078 neg ecx
40794079 add ecx,edi
40844084 merge_elf64_header:
40854085 mov eax,[image_base]
40864086 mov edx,[image_base_high]
4087 mov [ebx+10h],eax
4088 mov [ebx+10h+4],edx
4089 mov [ebx+18h],eax
4090 mov [ebx+18h+4],edx
4091 and dword [ebx+8],0
4092 mov ecx,edi
4093 sub ecx,[code_start]
4094 add eax,ecx
4095 adc edx,0
4096 jmp elf_segment_addressing_setup
4087 xor ecx,ecx
4088 jmp elf64_segment_separated_base
40974089 close_elf64_segment:
40984090 cmp [number_of_sections],0
40994091 jne finish_elf64_segment
41184110 mov edx,edi
41194111 cmp edi,[undefined_data_end]
41204112 jne elf64_segment_size_ok
4113 cmp byte [ebx],1
4114 jne elf64_segment_size_ok
41214115 mov edi,[undefined_data_start]
41224116 elf64_segment_size_ok:
41234117 mov [ebx+28h],eax
41274121 and [undefined_data_end],0
41284122 mov eax,[ebx+10h]
41294123 mov edx,[ebx+10h+4]
4130 mov cl,[ebx]
4131 cmp cl,3
4124 cmp byte [ebx],1
4125 je elf64_segment_position_move_and_align
4126 cmp [merge_segment],0
4127 jne elf64_segment_position_move
4128 cmp byte [ebx],3
41324129 ja elf64_segment_position_ok
4130 mov [merge_segment],ebx
4131 elf64_segment_position_move:
41334132 add eax,[ebx+28h]
41344133 adc edx,0
4135 cmp cl,1
4136 je elf64_segment_position_adjust
4137 cmp [merge_segment],0
4138 jne elf64_segment_position_ok
4139 mov [merge_segment],ebx
41404134 jmp elf64_segment_position_ok
4141 elf64_segment_position_adjust:
4135 elf64_segment_position_move_and_align:
4136 add eax,[ebx+28h]
4137 adc edx,0
41424138 add eax,0FFFh
41434139 adc edx,0
41444140 elf64_segment_position_ok:
657657 dw pm_store_word_instruction-instruction_handler
658658 db 'sub',28h
659659 dw basic_instruction-instruction_handler
660 db 'ud0',0FFh
661 dw ud_instruction-instruction_handler
662 db 'ud1',0B9h
663 dw ud_instruction-instruction_handler
660664 db 'ud2',0Bh
661665 dw simple_extended_instruction-instruction_handler
662666 db 'xor',30h
3232 ; cannot simply be copied and put under another distribution licence
3333 ; (including the GNU Public Licence).
3434
35 VERSION_STRING equ "1.73.05"
35 VERSION_STRING equ "1.73.06"
3636
3737 VERSION_MAJOR = 1
3838 VERSION_MINOR = 73
23742374 mov bl,al
23752375 stc
23762376 ret
2377 ud_instruction:
2378 mov [extended_code],al
2379 mov [base_code],0Fh
2380 call get_reg_mem
2381 jc ud_reg_reg
2382 cmp [operand_size],4
2383 jne invalid_operand_size
2384 jmp instruction_ready
2385 ud_reg_reg:
2386 cmp ah,4
2387 jne invalid_operand_size
2388 jmp nomem_instruction_ready
23772389
23782390 imul_instruction:
23792391 mov [base_code],0F6h
00
11 Visit http://flatassembler.net/ for more information.
2
3
4 version 1.73.06 (Jan 04, 2019)
5
6 [+] Added "ud0" and "ud1" instruction.
7
8 [-] Fixed a minor bug in ELF formatter.
29
310
411 version 1.73.05 (Jan 03, 2019)