qa.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.
PopAll
   Example  Back  Contents  Index
──────────────────────────────────────────────────────────────────────────────
 
;* PopAll - Macro to restore registers pushed by the PushAll macro.  Like
;* the PushAll macro, PopAll uses the most efficient method available at
;* assembly time (not at run time).
;*
;* Shows:   Instruction - popa
;*
;* Params:  None
 
PopAll MACRO
    IF @Cpu AND 2                       ;; If assembling on 80186/286/386,
        popa                            ;;    use the efficient POPA
    ELSE                                ;;    instruction
        pop ax                          ;; Otherwise pop the registers
        pop cx                          ;;    individually
        pop dx
        pop bx
        pop sp
        pop bp
        pop si
        pop di
    ENDIF
ENDM
                                    -♦-