News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

C to masm

Started by digelo, July 22, 2012, 11:27:58 PM

Previous topic - Next topic

digelo

hi
How can i define this in masm32 ?

#define E_HANDLER( number ) \
__declspec( naked ) void interrupt_##number( void ) \
{ \
...
}

qWord

E_HANDLER macro number

OPTION PROLOGUE:none
OPTION EPILOGUE:none

interrupt_&number& proc
;...
interrupt_&number& endp

OPTION PROLOGUE:PrologueDef
OPTION EPILOGUE:EpilogueDef

; uncomment as needed
; EXITM <OFFSET interrupt_&number&> ; <- function-like macro that return the handler address
; EXITM <> ; <- function-like macro, returns nothing
endm
MREAL macros - when you need floating point arithmetic while assembling!

jj2007

Will work in most cases but beware of inserting that macro in the middle of nowhere...

any MACRO args
   jmp endofany
   anyP proc args
  ..
  ret
  anyP endp
endofany: