Changeset 247 in xtideuniversalbios for trunk/Assembly_Library/Src/Time


Ignore:
Timestamp:
Feb 13, 2012, 1:17:27 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to Assembly Library:

  • Delay functions are no longer required by reboot functions when building XTIDE Universal BIOS.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Time/Delay.asm

    r245 r247  
    44; Section containing code
    55SECTION .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_DELAY
    12 ;   Parameters
    13 ;       Nothing
    14 ;   Returns:
    15 ;       Nothing
    16 ;   Corrupts registers:
    17 ;       Nothing
    18 ;--------------------------------------------------------------------
    19 %macro JMP_DELAY 0
    20     jmp     SHORT %%NextInstruction
    21 %%NextInstruction:
    22 %endmacro
    23 
    24 
    25 ;--------------------------------------------------------------------
    26 ; Mimimun delays (without fetching) with some CPU architectures:
    27 ;   8088/8086:  17 cycles for jump + 5 cycles for last comparison
    28 ;   286:        10 cycles for jump + 4 cycles for last comparison
    29 ;   386:        13 cycles for jump + ? cycles for last comparison
    30 ;   486:         7 cycles for jump + 6 cycles for last comparison
    31 ;
    32 ; DELAY_WITH_LOOP_INSTRUCTION
    33 ;   Parameters
    34 ;       CX:     Loop iterations (0 is maximum delay with 65536 iterations)
    35 ;   Returns:
    36 ;       Nothing
    37 ;   Corrupts registers:
    38 ;       CX
    39 ;--------------------------------------------------------------------
    40 %macro DELAY_WITH_LOOP_INSTRUCTION 0
    41 %%StartOfLoop:
    42     loop    %%StartOfLoop
    43 %endmacro
    44 
    456
    467;--------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.