Changeset 54 in xtideuniversalbios for trunk/Assembly_Library/Src/Util
- Timestamp:
- Oct 24, 2010, 11:01:17 AM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/Assembly_Library/Src/Util
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Util/Memory.asm
r52 r54 2 2 ; Project name : Assembly Library 3 3 ; Created date : 14.7.2010 4 ; Last update : 11.10.20104 ; Last update : 24.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for memory access. … … 70 70 push di 71 71 push ax 72 call Memory_CopySSBPtoESDI72 call Registers_CopySSBPtoESDI 73 73 call Memory_ZeroESDIwithSizeInCX 74 74 pop ax … … 110 110 111 111 ;-------------------------------------------------------------------- 112 ; Memory_ExchangeDSSIwithESDI113 ; Parameters114 ; Nothing115 ; Returns:116 ; DS:SI and ES:DI are exchanged.117 ; Corrupts registers:118 ; Nothing119 ;--------------------------------------------------------------------120 ALIGN JUMP_ALIGN121 Memory_ExchangeDSSIwithESDI:122 push ds123 push es124 pop ds125 pop es126 xchg si, di127 ret128 129 130 ;--------------------------------------------------------------------131 ; Memory_CopySSBPtoESDI132 ; Memory_CopySSBPtoDSSI133 ; Memory_CopyDSSItoESDI134 ; Memory_CopyESDItoDSSI135 ; Parameters136 ; Nothing137 ; Returns:138 ; Copies farm pointer to different segment/pointer register pair139 ; Corrupts registers:140 ; Nothing141 ;--------------------------------------------------------------------142 ALIGN JUMP_ALIGN143 Memory_CopySSBPtoESDI:144 push ss145 pop es146 mov di, bp147 ret148 149 ALIGN JUMP_ALIGN150 Memory_CopySSBPtoDSSI:151 push ss152 pop ds153 mov si, bp154 ret155 156 ALIGN JUMP_ALIGN157 Memory_CopyDSSItoESDI:158 push ds159 pop es160 mov di, si161 ret162 163 ALIGN JUMP_ALIGN164 Memory_CopyESDItoDSSI:165 push es166 pop ds167 mov si, di168 ret169 170 171 ;--------------------------------------------------------------------172 ; Memory_SetZFifNullPointerInDSSI173 ; Parameters174 ; DS:SI: Far pointer175 ; Returns:176 ; ZF: Set if NULL pointer in DS:SI177 ; Corrupts registers:178 ; Nothing179 ;--------------------------------------------------------------------180 ALIGN JUMP_ALIGN181 Memory_SetZFifNullPointerInDSSI:182 push ax183 mov ax, ds184 or ax, si185 pop ax186 ret187 188 189 ;--------------------------------------------------------------------190 112 ; Memory_ReserveCXbytesFromStackToDSSI 191 113 ; Parameters -
trunk/Assembly_Library/Src/Util/Sort.asm
r46 r54 2 2 ; Project name : Assembly Library 3 3 ; Created date : 28.9.2010 4 ; Last update : 1.10.20104 ; Last update : 24.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Sorting algorithms … … 230 230 231 231 ; Item DX to Item AX 232 call Memory_ExchangeDSSIwithESDI232 call Registers_ExchangeDSSIwithESDI 233 233 call GetItemPointerToDSSIfromIndexInDX 234 234 call CopyItemFromDSSItoESDI … … 236 236 ; Stack to Item DX 237 237 call GetPointerToTemporaryItemToESDI 238 call Memory_ExchangeDSSIwithESDI238 call Registers_ExchangeDSSIwithESDI 239 239 call CopyItemFromDSSItoESDI 240 240
Note:
See TracChangeset
for help on using the changeset viewer.