Hello!
I'am need to add some modifications to PE Executable format which produce FASM.
currently i need thee directives:
linker major(byte),optional minor(byte)
system major(word),optional minor(word)
subsystem major(word),optional minor(word)
after reading the source code i'am trying to do this:
;;;;;Insert after "heap_directive" label ;;;;;
linker_directive:
bts [format_flags],13h
jc setting_already_specified
mov al,[output_format]
cmp al,3
je pe_linker
jmp illegal_instruction
;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;Insert after "pe_heap" label ;;;;;
pe_linker:
lods byte [esi]
cmp al,'('
jne invalid_argument
cmp byte [esi],'.'
je invalid_value
call get_count_value
mov edx,[code_start]
mov byte [edx+0x2],al
jmp instruction_assembled
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;Insert after "instructions_6" label ;;;;;;;;;;;;;;;;;
db 'linker',0
dw linker_directive-instruction_handler
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
then i compile assembler, replace(ide) and try to compile source with new directive:
format PE GUI
linker 1
ret
and finally i am get this error: "Error: illegal instruction.".
What's wrong fuck
Tomasz or anyone can help?
Maybe someone already try to add new instructions i know that not hard, gimme example how to do this. I'am not sure but maybe need to fix some offsets or constants.