Re: A86: Macro problem...


[Prev][Next][Index][Thread]

Re: A86: Macro problem...




nesting the macro doesn't fix the problem, but this works:
(the first three .db's are combined into one line)

#define NUM(s,n,e)  .db (n > $FFFFFF) + (n > $FFFF) + (n > $FF) + 3, (e
<< 1) + (s & 1), n & $FF
#defcont            \#if (n > $FF)
#defcont            \.db (n & $FF00) >> 8
#defcont            \#if (n > $FFFF)
#defcont            \.db (n & $FF0000) >> 16
#defcont            \#if (n > $FFFFFF)
#defcont            \.db n >> 24
#defcont            \#endif\#endif\#endif

-josh

On Sat, 29 Jan 2000 02:29:14 EST JayEll64@aol.com writes:
>
>Anyone ever get a "Macro expansion too long" error when compiling with 
>TASM? 
>;)  I'm just curious if there's any possible way around that...like, 
>can you 
>"nest" macros, or is there an alternate compiler that supports macros 
>that I 
>could try?  I know that if I can make the following macro two lines 
>shorter 
>(and still hold the same effect) it will work (I think), so if anyone 
>has 
>anyone "macro optimization" ideas...
>
>#define NUM(s,n,e)  .db (n > $FFFFFF) + (n > $FFFF) + (n > $FF) + 3
>#defcont            \.db (e << 1) + (s & 1)
>#defcont            \.db n & $FF
>#defcont            \#if (n > $FF)
>#defcont            \.db (n & $FF00) >> 8
>#defcont            \#if (n > $FFFF)
>#defcont            \.db (n & $FF0000) >> 16
>#defcont            \#if (n > $FFFFFF)
>#defcont            \.db n >> 24
>#defcont            \#endif\#endif\#endif
>
>(s is the sign, n is the number, and e is the exponent, just in case 
>you're 
>curious; and that first line of the macro gets the length in bytes of 
>the 
>number plus 2)
>
>JayEll
>

________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.