home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
asm_programming
/
PUSHREGS.MAC
< prev
next >
Wrap
Text File
|
1989-10-16
|
1KB
|
50 lines
PUSHREGS MACRO r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12
IFNB <r1>
push r1
PUSHREGS r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12
ENDIF
ENDM
POPREGS MACRO r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12
IFNB <r12>
pop r12
ENDIF ;;--------
IFNB <r11> ;; all this is necessary because the
pop r11 ;; assembler overflows on recursion
ENDIF ;;--------
IFNB <r10>
pop r10
ENDIF ;;--------
IFNB <r9>
pop r9
ENDIF ;;--------
IFNB <r8>
pop r8
ENDIF ;;--------
IFNB <r7>
pop r7
ENDIF ;;--------
IFNB <r6>
pop r6
ENDIF ;;--------
IFNB <r5>
pop r5
ENDIF ;;--------
IFNB <r4>
pop r4
ENDIF ;;--------
IFNB <r3>
pop r3
ENDIF ;;--------
IFNB <r2>
pop r2
ENDIF ;;--------
IFNB <r1>
pop r1
ENDIF ;;--------
ENDM