Changeset 468 for OCO/trunk/drv16/memutil.asm
- Timestamp:
- Nov 4, 2009, 4:21:24 PM (16 years ago)
- File:
-
- 1 edited
-
OCO/trunk/drv16/memutil.asm (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OCO/trunk/drv16/memutil.asm
r33 r468 93 93 ; save registers 94 94 push cx 95 push bx95 ;PS+++ push bx 96 96 push ds 97 97 push es … … 101 101 ; store number of bytes to transfer and calculate number of double words 102 102 ; and set of transfer value 103 mov bx,BUF1_LEN 104 mov cx,bx 103 ;PS+++ mov bx,BUF1_LEN 104 ;PS+++ mov cx,bx 105 mov cx,BUF1_LEN ;PS+++ 105 106 shr cx,2 106 107 … … 120 121 121 122 ; transfer number of odd bytes 122 mov cx,bx 123 ;PS+++ mov cx,bx 124 mov cx,BUF1_LEN ;PS+++ 123 125 and cx,03h 126 or cx,cx ;PS+++ 127 jz short @@NoPad ;PS+++ 124 128 rep movsb 125 129 @@NoPad: ;PS+++ 126 130 ;set up return value and restore registers 127 131 pop di … … 129 133 pop es 130 134 pop ds 131 pop bx135 ;PS+++ pop bx 132 136 pop cx 133 pop bp134 137 ;PS+++ pop bp 138 leave ;PS+++ 135 139 ;done 136 140 ret … … 143 147 ; the fill value as parameters on the stack. 144 148 ; The function does not return a value. 145 149 ;PS+++ Where is used now? 150 ifdef WhereIsUsed 146 151 public _ddmemfill 147 152 _ddmemfill proc near … … 157 162 158 163 ; save registers 159 push bx164 ;PS+++ push bx 160 165 push cx 161 166 push es … … 164 169 ; store number of bytes to transfer and calculate number of double words 165 170 ; and set of transfer value 166 mov bx,BUF2_LEN 167 mov cx,bx 171 ;PS+++ mov bx,BUF2_LEN 172 ;PS+++ mov cx,bx 173 mov cx,BUF2_LEN ;PS++ 168 174 shr cx,2 169 175 170 176 ; set size in bytes of object to be allocated 171 mov es,DEST2_HIGH 177 mov es,DEST2_HIGH 172 178 mov di,DEST2_LOW 173 179 174 180 ; set up value 175 mov ax,VALUE2 181 ;PS+++ mov ax,VALUE2 182 mov al,VALUE2 ;PS+++ 183 mov ah,ah ;PS+++ 184 push ax ;PS+++ 176 185 shl eax,010h 177 mov ax,VALUE2 186 ;PS+++ mov ax,VALUE2 187 pop ax ;PS+++ 178 188 179 189 ; set up transfer direction … … 184 194 185 195 ; transfer number of odd bytes 186 mov cx,bx 196 ;PS+++ mov cx,bx 197 mov cx,BUF2_LEN ;PS++ 187 198 and cx,03h 188 199 rep stosb … … 192 203 pop es 193 204 pop cx 194 pop bx195 pop bp196 205 ;PS+++ pop bx 206 ;PS+++ pop bp 207 leave 197 208 ;done 198 209 ret 199 210 _ddmemfill endp 211 endif 200 212 201 213 _TEXT ENDS
Note:
See TracChangeset
for help on using the changeset viewer.
