Changeset 50 in xtideuniversalbios for trunk/Assembly_Library/Src/Util
- Timestamp:
- Oct 9, 2010, 5:47:26 PM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Util/Memory.asm
r46 r50 2 2 ; Project name : Assembly Library 3 3 ; Created date : 14.7.2010 4 ; Last update : 1.10.20104 ; Last update : 9.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for memory access. … … 67 67 ALIGN JUMP_ALIGN 68 68 Memory_ZeroSSBPwithSizeInCX: 69 push es 70 push di 69 71 push ax 70 71 call Memory_ExchangeSSBPwithESDI 72 call Memory_CopySSBPtoESDI 72 73 call Memory_ZeroESDIwithSizeInCX 73 call Memory_ExchangeSSBPwithESDI74 75 74 pop ax 75 pop di 76 pop es 76 77 ret 77 78 … … 82 83 ; ES:DI: Ptr to destination buffer 83 84 ; Returns: 84 ; Nothing85 ; DI: Updated by number of BYTEs stored 85 86 ; Corrupts registers: 86 87 ; AX … … 98 99 ; ES:DI: Ptr to destination buffer 99 100 ; Returns: 100 ; Nothing101 ; DI: Updated by number of BYTEs stored 101 102 ; Corrupts registers: 102 103 ; Nothing … … 105 106 Memory_StoreCXbytesFromAccumToESDI: 106 107 OPTIMIZE_STRING_OPERATION rep, stos 107 sub di, cx108 108 ret 109 109 110 110 111 111 ;-------------------------------------------------------------------- 112 ; Memory_ExchangeSSBPwithESDI113 112 ; Memory_ExchangeDSSIwithESDI 114 113 ; Parameters 115 114 ; Nothing 116 115 ; Returns: 117 ; SS:BP/DS:SI and ES:DI are exchanged.116 ; DS:SI and ES:DI are exchanged. 118 117 ; Corrupts registers: 119 118 ; Nothing 120 119 ;-------------------------------------------------------------------- 121 120 ALIGN JUMP_ALIGN 122 Memory_ExchangeSSBPwithESDI:123 xchg bp, di124 push ss125 push es126 pop ss127 pop es128 ret129 130 ALIGN JUMP_ALIGN131 121 Memory_ExchangeDSSIwithESDI: 132 xchg si, di133 122 push ds 134 123 push es 135 124 pop ds 136 125 pop es 126 xchg si, di 137 127 ret 138 128 … … 140 130 ;-------------------------------------------------------------------- 141 131 ; Memory_CopySSBPtoESDI 132 ; Memory_CopySSBPtoDSSI 133 ; Memory_CopyESDItoDSSI 142 134 ; Parameters 143 135 ; Nothing 144 136 ; Returns: 145 ; ES:DI: Same as SS:BP137 ; Copies farm pointer to different segment/pointer register pair 146 138 ; Corrupts registers: 147 139 ; Nothing … … 152 144 pop es 153 145 mov di, bp 146 ret 147 148 ALIGN JUMP_ALIGN 149 Memory_CopySSBPtoDSSI: 150 push ss 151 pop ds 152 mov si, bp 153 ret 154 155 ALIGN JUMP_ALIGN 156 Memory_CopyESDItoDSSI: 157 push es 158 pop ds 159 mov si, di 154 160 ret 155 161
Note:
See TracChangeset
for help on using the changeset viewer.