◄Map► ◄Up► ◄Contents► ◄Index► ◄Back► ──────────────────────────────────────────────────────────────────────────── ;* @SaveRegs and @RestoreRegs - Macros to save and restore a list ;* of macros. @SaveRegs pushes each register in the argument list. ;* and saves each register name in a text macro. @RestoreRegs uses ;* the saved register list to pop each register. ;* ;* Shows: Directives - CATSTR INSTR ;* ;* ;* Params: For @SaveRegs, the registers to be pushed ;* For @RestoreRegs, none pregs TEXTEQU <> ; Initialize global text macro to empty @SaveRegs MACRO regs:VARARG LOCAL reg pregs CATSTR <!<>, <regs>, <!>> % FOR reg, <regs> push reg ;; Push each register ENDM ENDM @RestoreRegs MACRO LOCAL reg % FOR reg, @ArgRev( pregs ) ;; @ArgRev from MACROS.INC pop reg ;; Pop each register ENDM ENDM -♦-