@emit
#4

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
Wonderful! I just wrote a new new macro for asm.inc using this trick

pawn Код:
// Looks pretty much like inline assembly
@emit proc      ;
@emit push_s    12;
@emit push_c    4;
@emit sysreq_d  GetNativeAddressFromName("print");
@emit stack     8;
@emit retn      ;
Edit:

Oh, and today I learned how to include spaces in macros!
You could match \10 in the end to avoid the semicolon.

pawn Код:
#define @emit%0\32;%1\32;%2\10; asm_emit_%1(ctx, %2);
Reply


Messages In This Thread
@emit - by Slice - 13.04.2013, 16:26
Re: Today I learned - Share your newly found knowledge! - by xeeZ - 16.04.2013, 12:55
Re: Today I learned - Share your newly found knowledge! - by xeeZ - 16.04.2013, 13:13
Re: Today I learned - Share your newly found knowledge! - by Slice - 16.04.2013, 16:05
Re: Today I learned - Share your newly found knowledge! - by Slice - 16.04.2013, 17:44

Forum Jump:


Users browsing this thread: 1 Guest(s)