Changeset 341 in xtideuniversalbios


Ignore:
Timestamp:
Mar 13, 2012, 4:19:02 PM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Fixed a bug from r323 in DisplayPrint.asm.
  • Removed some unused code from XTIDECFG (undoing the change to Math.asm in r336 as part of it).
Location:
trunk/Assembly_Library
Files:
5 edited

Legend:

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

    r323 r341  
    6464%endif
    6565    .PrintWordFromAXwithBaseInBX                    resb    2
    66 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     66%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
    6767    .PrintQWordFromSSBPwithBaseInBX                 resb    2
    6868%endif
  • trunk/Assembly_Library/Src/Display/Display.asm

    r323 r341  
    8282%endif
    8383    %define PrintWordFromAXwithBaseInBX                     DisplayPrint_WordFromAXWithBaseInBX
    84 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     84%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
    8585    %define PrintQWordFromSSBPwithBaseInBX                  DisplayPrint_QWordFromSSBPwithBaseInBX
    8686%endif
  • trunk/Assembly_Library/Src/Display/DisplayFormat.asm

    r241 r341  
    348348    push    cx
    349349    mov     si, [bp]
    350        
     350
    351351    cmp     si, byte 07fh       ;  well within the boundaries of ROMVARS_size
    352352    jb      .notFormatted
     
    358358    inc     bp
    359359    jmp     .done
    360        
    361 .notFormatted: 
     360
     361.notFormatted:
    362362    call    DisplayPrint_NullTerminatedStringFromCSSI
    363        
     363
    364364.done:
    365365    pop     cx
    366366    pop     si
    367     ret     
    368 
    369 ALIGN JUMP_ALIGN
    370 z_FormatStringFromSegmentZero: 
     367    ret
     368
     369ALIGN JUMP_ALIGN
     370z_FormatStringFromSegmentZero:
    371371    xchg    si, [bp]
    372372    xor     bx, bx
    373373    call    DisplayPrint_NullTerminatedStringFromBXSI
    374374    mov     si, [bp]
    375     ret     
     375    ret
    376376
    377377%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
  • trunk/Assembly_Library/Src/Display/DisplayPrint.asm

    r323 r341  
    9595%ifndef MODULE_STRINGS_COMPRESSED
    9696;--------------------------------------------------------------------
     97; DisplayPrint_WordFromAXWithBaseInBX
     98;   Parameters:
     99;       AX:     Word to display
     100;       BX:     Integer base (binary=2, octal=8, decimal=10, hexadecimal=16)
     101;       DS:     BDA segment (zero)
     102;       ES:DI:  Ptr to cursor location in video RAM
     103;   Returns:
     104;       DI:     Updated offset to video RAM
     105;   Corrupts registers:
     106;       AX, DX
     107;--------------------------------------------------------------------
     108ALIGN JUMP_ALIGN
     109DisplayPrint_WordFromAXWithBaseInBX:
     110    push    cx
     111    push    bx
     112
     113    xor     cx, cx
     114ALIGN JUMP_ALIGN
     115.DivideLoop:
     116    xor     dx, dx              ; DX:AX now holds the integer
     117    div     bx                  ; Divide DX:AX by base
     118    push    dx                  ; Push remainder
     119    inc     cx                  ; Increment character count
     120    test    ax, ax              ; All divided?
     121    jnz     SHORT .DivideLoop   ;  If not, loop
     122
     123PrintAllPushedDigits:
     124    mov     bx, g_rgcDigitToCharacter
     125ALIGN JUMP_ALIGN
     126.PrintNextDigit:
     127    pop     ax                  ; Pop digit
     128    cs xlatb
     129    call    DisplayPrint_CharacterFromAL
     130    loop    .PrintNextDigit
     131
     132    pop     bx
     133    pop     cx
     134    ret
     135
     136g_rgcDigitToCharacter:  db  "0123456789ABCDEF"
     137
     138;--------------------------------------------------------------------
    97139; DisplayPrint_QWordFromSSBPwithBaseInBX
    98140;   Parameters:
     
    106148;       AX, DX, [SS:BP]
    107149;--------------------------------------------------------------------
     150%ifndef EXCLUDE_FROM_XTIDECFG   ; Not used in XTIDECFG
    108151ALIGN JUMP_ALIGN
    109152DisplayPrint_QWordFromSSBPwithBaseInBX:
     
    122165    mov     cx, bx              ; Character count to CX
    123166    jmp     SHORT PrintAllPushedDigits
    124 
    125 
    126 ;--------------------------------------------------------------------
    127 ; DisplayPrint_WordFromAXWithBaseInBX
    128 ;   Parameters:
    129 ;       AX:     Word to display
    130 ;       BX:     Integer base (binary=2, octal=8, decimal=10, hexadecimal=16)
    131 ;       DS:     BDA segment (zero)
    132 ;       ES:DI:  Ptr to cursor location in video RAM
    133 ;   Returns:
    134 ;       DI:     Updated offset to video RAM
    135 ;   Corrupts registers:
    136 ;       AX, DX
    137 ;--------------------------------------------------------------------
    138 ALIGN JUMP_ALIGN
    139 DisplayPrint_WordFromAXWithBaseInBX:
    140     push    cx
    141     push    bx
    142 
    143     xor     cx, cx
    144 ALIGN JUMP_ALIGN
    145 .DivideLoop:
    146     xor     dx, dx              ; DX:AX now holds the integer
    147     div     bx                  ; Divide DX:AX by base
    148     push    dx                  ; Push remainder
    149     inc     cx                  ; Increment character count
    150     test    ax, ax              ; All divided?
    151     jnz     SHORT .DivideLoop   ;  If not, loop
    152 
    153 PrintAllPushedDigits:
    154     mov     bx, g_rgcDigitToCharacter
    155 ALIGN JUMP_ALIGN
    156 .PrintNextDigit:
    157     pop     ax                  ; Pop digit
    158     cs xlatb
    159     call    DisplayPrint_CharacterFromAL
    160     loop    .PrintNextDigit
    161 
    162     pop     bx
    163     pop     cx
    164     ret
    165 g_rgcDigitToCharacter:  db  "0123456789ABCDEF"
     167%endif  ; EXCLUDE_FROM_XTIDECFG
    166168
    167169%endif  ; MODULE_STRINGS_COMPRESSED
  • trunk/Assembly_Library/Src/Util/Math.asm

    r336 r341  
    1717;       AX
    1818;--------------------------------------------------------------------
     19%ifndef EXCLUDE_FROM_XTIDECFG   ; Not used in XTIDECFG
    1920ALIGN JUMP_ALIGN
    2021Math_DivQWatSSBPbyCX:
     
    3637    mov     [bp], ax
    3738    ret
     39%endif
    3840
    3941
Note: See TracChangeset for help on using the changeset viewer.