Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly Language > Determine the s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 4940 of 5072
Post > Topic >>

Determine the size of a parameter from a macro

by =?ISO-8859-1?Q?St=E9phane_thibaud?= <snthibaud@[EMAIL PROTECTED] > Apr 3, 2008 at 01:25 PM

Is it possible to determine the size of a paramter (possibly a
register) from within a macro in NASM. I have a macro in which I want
to assemble different code depending of the size of the parameter (16-
bit or 32-bit). If it's 16-bit the parameter must be copied to a 32-
bit register that has the first 16-bits cleared and after that the 32-
bit register can be pushed onto stack. If it's already 32-bit it can
be pushed on stack immediately. Simply doing 'o32 push reg' doesn't
solve my problem as the first 16 bits (the most significant bits)
would be undefined...
 




 7 Posts in Topic:
Determine the size of a parameter from a macro
=?ISO-8859-1?Q?St=E9phane  2008-04-03 13:25:57 
Re: Determine the size of a parameter from a macro
Frank Kotler <fbkotler  2008-04-03 20:43:24 
Re: Determine the size of a parameter from a macro
"Rod Pemberton"  2008-04-03 20:51:28 
Re: Determine the size of a parameter from a macro
=?ISO-8859-1?Q?St=E9phane  2008-04-03 14:41:36 
Re: Determine the size of a parameter from a macro
Frank Kotler <fbkotler  2008-04-03 22:49:24 
Re: Determine the size of a parameter from a macro
=?ISO-8859-1?Q?St=E9phane  2008-04-04 03:54:12 
Re: Determine the size of a parameter from a macro
=?ISO-8859-1?Q?St=E9phane  2008-04-04 05:58:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 15:58:32 CDT 2008.