Changeset 149 in xtideuniversalbios for trunk/Assembly_Library/Inc
- Timestamp:
- Apr 29, 2011, 6:58:11 PM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Registers.inc
r146 r149 88 88 89 89 ;-------------------------------------------------------------------- 90 ; This macro must be the first thing to call on Interrupt Service Routine. 91 ; Extra words will be initialized to zero. 92 ; 93 ; SAVE_AND_GET_INTPACK_WITH_EXTRA_WORDS_TO_SSBP 94 ; Parameters 95 ; %1: Number of extra words to reserve before INTPACK 96 ; Returns: 97 ; SS:BP: Points to INTPACK 98 ; Corrupts registers: 99 ; Nothing 100 ;-------------------------------------------------------------------- 101 %macro SAVE_AND_GET_INTPACK_WITH_EXTRA_WORDS_TO_SSBP 1 102 ePUSHA 103 push ds 104 push es 105 %ifdef USE_386 106 push fs 107 push gs 108 %endif 109 xor bp, bp 110 times %1 push bp ; Initialize to zero 111 mov bp, sp 112 %endmacro 113 114 ;-------------------------------------------------------------------- 115 ; This macro must be the last thing to call on Interrupt Service Routine. 116 ; 117 ; RESTORE_INTPACK_WITH_EXTRA_WORDS_FROM_SSBP 118 ; Parameters 119 ; %1: Number of extra words in INTPACK 120 ; SS:BP: Ptr to INTPACK 121 ; Returns: 122 ; All Registers will be loaded from INTPACK 123 ;-------------------------------------------------------------------- 124 %macro RESTORE_INTPACK_WITH_EXTRA_WORDS_FROM_SSBP 1 125 add sp, BYTE (%1)*2 126 %ifdef USE_386 127 pop gs 128 pop fs 129 %endif 130 pop es 131 pop ds 132 ePOPA 133 iret 134 %endmacro 135 136 137 ;-------------------------------------------------------------------- 90 138 ; NORMALIZE_FAR_POINTER 91 139 ; Parameters:
Note:
See TracChangeset
for help on using the changeset viewer.