Changeset 207 in xtideuniversalbios for trunk/Assembly_Library/Src/Util


Ignore:
Timestamp:
Jan 7, 2012, 7:57:57 PM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Added buffer pointer denormalization check within the serial port code and reused the last portion of the NormalizeESSI and NormalizeESDI routines to save memory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Util/Registers.asm

    r149 r207  
    6969;   Corrupts registers:
    7070;       AX, CX
     71;
     72; Inline of NORMALIZE_FAR_POINTER so that we can share the last 2/3 of the
     73; routine with Registers_NormalizeFinish.
     74;
    7175;--------------------------------------------------------------------
    7276ALIGN JUMP_ALIGN
    7377Registers_NormalizeESSI:
    74     NORMALIZE_FAR_POINTER es, si, ax, cx
    75     ret
     78    mov         cx, si
     79    and         si, byte 0fh
     80    jmp         Registers_NormalizeFinish
    7681
    7782ALIGN JUMP_ALIGN
    7883Registers_NormalizeESDI:
    79     NORMALIZE_FAR_POINTER es, di, ax, cx
     84    mov         cx, di
     85    and         di, byte 0fh
     86;;; fall-through
     87
     88ALIGN JUMP_ALIGN       
     89Registers_NormalizeFinish:     
     90    eSHR_IM     cx, 4
     91    mov         ax, es
     92    add         ax, cx
     93    mov         es, ax
    8094    ret
    81 
     95       
    8296
    8397;--------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.