Changeset 247 in xtideuniversalbios for trunk/Assembly_Library


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.
Location:
trunk/Assembly_Library
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/AssemblyLibrary.inc

    r110 r247  
    1111%include "CgaSnow.inc"
    1212%include "Debug.inc"
     13%include "Delay.inc"
    1314%include "DosFunctions.inc"
    1415%include "File.inc"
  • 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;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Util/Reboot.asm

    r245 r247  
    2828    mov     al, 0FEh                ; System reset (AT+ keyboard controller)
    2929    out     64h, al                 ; Reset computer (AT+)
     30%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    3031    mov     al, 10
    3132    call    Delay_MicrosecondsFromAX
     33%else
     34    JMP_DELAY
     35%endif
    3236    ; Fall to Reboot_XT
    3337
Note: See TracChangeset for help on using the changeset viewer.