flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Main > invoke reg | 
| Author | 
 | 
| revolution 11 Apr 2022, 20:47 I suspect you want stdcall if r12 is the address of the target, and not a pointer to the address. | |||
|  11 Apr 2022, 20:47 | 
 | 
| ProMiNick 11 Apr 2022, 21:01 If actually invoke reg needed:     Code: format PE64 GUI 5.0 entry start include 'win64a.inc' section '.text' code readable executable start: sub rsp,8 mov r12,ExitProcess virtual at r12 ExitProcess%% dq ? end virtual invoke ExitProcess%%,0 section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL' include 'os_specs/windows/api/x86/kernel32.inc' or this Code: format PE64 GUI 5.0 entry start include 'win64a.inc' virtual at 0 void dq ? end virtual r12.void equ r12+void section '.text' code readable executable start: sub rsp,8 mov r12,ExitProcess invoke r12.void,0 section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL' include 'os_specs/windows/api/x86/kernel32.inc' that will call qword[r12] - construct questions correctly - or thou will be surprized with answers) Last edited by ProMiNick on 11 Apr 2022, 21:07; edited 1 time in total | |||
|  11 Apr 2022, 21:01 | 
 | 
| AE 11 Apr 2022, 21:04 That's informative, thank you very much! | |||
|  11 Apr 2022, 21:04 | 
 | 
| revolution 11 Apr 2022, 21:47 A more concise way to achieve the invoke is:     Code: label q12 qword at r12 invoke q12, arg1, ... | |||
|  11 Apr 2022, 21:47 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.