flat assembler
Message board for the users of flat assembler.

Index > Main > word rax suggestion,

Author
Thread Post new topic Reply to topic
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1 25 Feb 2007, 13:56
suggestion for a new feature for fasm Razz

something which would be very useful is if eg

"dword rax" can be a synonym for "eax"
other examples:

"qword al" synonym for "rax"
"dword r10" synonym for "r10d"
"byte r11" synonym for "r11b"
"word cl" synonym for "cx"
" dword r10b" a synonym for "r10d"
"qword r12w" synonym for "r12"

etc, ie a size prefix replaces the size of the following register,

this would be useful because at the moment I often
have to do things like:

Code:
Temp   equ  rcx
Temp_w equ cx
Temp_d equ ecx
Temp_b equ cl
Temp_q equ rcx

mov Temp, [bits]
shl Num, Temp_b

    


it would be much better if I could do:

Code:
Temp equ rcx

  mov Temp, [bits]
  shl Num, byte Temp

    


also for macros a macro could have eg:

Code:
macro  register_shift dest*,  size*, bits*
  {
   xchg size dest,  size rdx
   xchg byte bits, cl
   shl size rdx, cl
   xchg byte bits, cl
   xchg size dest, size rdx
   }

   register_shift Temp, dword, Value

    


(not completely certain the above register shift has no bugs! Sad )

without such size prefixes such a macro seems unfeasible Crying or Very sad
Post 25 Feb 2007, 13:56
View user's profile Send private message 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.