Changeset 247 in xtideuniversalbios for trunk/Assembly_Library/Src/Time
- Timestamp:
- Feb 13, 2012, 1:17:27 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Time/Delay.asm
r245 r247 4 4 ; Section containing code 5 5 SECTION .text 6 7 ;--------------------------------------------------------------------8 ; Clears prefetch queue by jumping to next instruction.9 ; This delays much more than nop instruction of fast systems.10 ;11 ; JMP_DELAY12 ; Parameters13 ; Nothing14 ; Returns:15 ; Nothing16 ; Corrupts registers:17 ; Nothing18 ;--------------------------------------------------------------------19 %macro JMP_DELAY 020 jmp SHORT %%NextInstruction21 %%NextInstruction:22 %endmacro23 24 25 ;--------------------------------------------------------------------26 ; Mimimun delays (without fetching) with some CPU architectures:27 ; 8088/8086: 17 cycles for jump + 5 cycles for last comparison28 ; 286: 10 cycles for jump + 4 cycles for last comparison29 ; 386: 13 cycles for jump + ? cycles for last comparison30 ; 486: 7 cycles for jump + 6 cycles for last comparison31 ;32 ; DELAY_WITH_LOOP_INSTRUCTION33 ; Parameters34 ; CX: Loop iterations (0 is maximum delay with 65536 iterations)35 ; Returns:36 ; Nothing37 ; Corrupts registers:38 ; CX39 ;--------------------------------------------------------------------40 %macro DELAY_WITH_LOOP_INSTRUCTION 041 %%StartOfLoop:42 loop %%StartOfLoop43 %endmacro44 45 6 46 7 ;--------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.