flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > compile time asm code

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4352
Location: Now
edfed 26 Nov 2024, 18:08
what about asm code that executes during compile time?
something like macro, but with x86 and x64 instructions?

accessing registers, etc to play with data during compile?

for example
Code:

macro withoutasm arg1 {
  if arg1 = 2
  dd arg1
  end if
}

asmacro withasm arg1 {
;assume ebx is the pointer to the asmacro declaration args.
;making ebx points to arg1 
 mov eax,[ebx]
 cmp eax,[arg1]
 etc...
}

    


it would be tricky to imagine more applications, but for example, execute final code with this macro to tests stuff and get reports...

and be able to handle more stuff with preprocessing
Post 26 Nov 2024, 18:08
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.