flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > [sharing] Functions via Macros |
Author |
|
revolution 09 Apr 2021, 09:04
Thanks for sharing.
I've moved it to the Macroinstructions forum. |
|||
09 Apr 2021, 09:04 |
|
Overclick 09 Apr 2021, 09:08
Could you move here my previous sharing please (.multisection)
|
|||
09 Apr 2021, 09:08 |
|
revolution 09 Apr 2021, 09:09
Link?
|
|||
09 Apr 2021, 09:09 |
|
Overclick 09 Apr 2021, 09:12
|
|||
09 Apr 2021, 09:12 |
|
Overclick 15 Apr 2021, 05:01
A better example:
Code: dataConvertToASCII = 0 ConvertToASCII = 0 macro ConvertToASCII dest,reg,mem { .dataonce dataConvertToASCII ConvertOperand = $ ConvertReset dq ? .code if ~ mem eq mov reg,mem end if mov [ConvertReset],0 mov [ConvertOperand],reg mov rdi,dest .function ConvertToASCII mov rbx,10 mov rax,[ConvertOperand] xor rcx,rcx @@: xor rdx,rdx div rbx add dl,30h push dx inc rcx cmp rax,0 jne @B @@: pop dx mov [rdi],dl inc rdi dec rcx cmp rcx,0 jne @B mov BYTE[rdi],0 .endf ConvertToASCII } |
|||
15 Apr 2021, 05:01 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.