suggestion for a new feature for fasm
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:
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:
Temp equ rcx
mov Temp, [bits]
shl Num, byte Temp
also for macros a macro could have eg:
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!
)
without such size prefixes such a macro seems unfeasible