Changeset 223 in xtideuniversalbios for trunk/Configurator/Inc
- Timestamp:
- Jan 25, 2012, 8:20:06 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Configurator/Inc/emulate.inc
r162 r223 305 305 306 306 ;-------------------------------------------------------------------- 307 ; Segment override prefix instruction.308 ;309 ; eSEG310 ; Parameters:311 ; %1: Name of the segment (ES, CS, SS, DS, FS or GS)312 ; Returns:313 ; Nothing314 ; Corrupts registers:315 ; Nothing316 ;--------------------------------------------------------------------317 %macro eSEG 1318 %ifidni %1, es319 db 00100110b320 %elifidni %1, cs321 db 00101110b322 %elifidni %1, ss323 db 00110110b324 %elifidni %1, ds325 db 00111110b326 %elifidni %1, fs327 db 01100100b328 %elifidni %1, gs329 db 01100101b330 %else331 %error "Invalid segment override passed to eSEG!"332 %endif333 %endmacro334 335 336 ;--------------------------------------------------------------------337 307 ; Repeats string instruction with segment override. 338 308 ; This macro prevents 8088/8086 restart bug. … … 351 321 %macro eSEG_STR 3 352 322 %ifndef USE_186 ; 8088/8086 has string instruction restart bug when more than one prefix 353 354 355 eSEG %2; SEG is the prefix that won't be lost356 357 358 359 323 %%Loop: 324 %1 ; REP is the prefix that can be lost 325 %2 ; SEG is the prefix that won't be lost 326 %3 ; String instruction 327 jcxz %%End ; Jump to end if no repeats left (preserves FLAGS) 328 jmp SHORT %%Loop ; Loop while repeats left 329 %%End: 360 330 %else ; No bug on V20/V30 and later, don't know about 188/186 361 eSEG%2362 %1 331 %2 332 %1 %3 363 333 %endif 364 334 %endmacro
Note:
See TracChangeset
for help on using the changeset viewer.