Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
@RestoreRegs
 Map                                       Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
;* @RestoreRegs - Macro to generate a pop instruction for registers saved
;* by the SaveRegs macro.  Restores the group of registers most recently
;* pushed -- that is, RestoreRegs pops the group of registers saved by the
;* last use of SaveRegs.
;*
;* Shows:   Directives - INSTR     SUBSTR     SIZESTR
;*          Operators - GT
;*
;* Params:  None
@RestoreRegs MACRO
    LOCAL   regs, numloc
    numloc  INSTR  %1, regpushed, <!>>       ;; Find end of list
    regs    SUBSTR regpushed, %1, %numloc + 1;; Get list of registers
    regpushed   SUBSTR regpushed, %numloc    ;; Remove list from regpushed
    FOR reg, @ArgRev( regs )                 ;; Pop each register
        pop reg
    ENDM
ENDM
                                    -♦-