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.
PushAll
◄Example► ◄Back► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
;* PushAll - Macro to push registers in the following order: AX, CX, DX,
;* BX, SP, BP, SI, and DI. Uses most efficient method available at
;* assembly time (not at run time).
;*
;* Shows: Instruction - pusha
;* Operator - AND
;* Text macro - @Cpu
;*
;* Params: None
PushAll MACRO
IF @Cpu AND 2 ;; If assembling on 80186/286/386,
pusha ;; use the efficient PUSHA
ELSE ;; instruction
push ax ;; Otherwise push the registers
push cx ;; individually
push dx
push bx
push sp
push bp
push si
push di
ENDIF
ENDM
-♦-