Changeset 323 in xtideuniversalbios for trunk/Assembly_Library/Src


Ignore:
Timestamp:
Mar 11, 2012, 6:41:35 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to Assembly Library:

  • Added Display Library function for printing QWORDs.
  • Added couple of function numbers to BiosFunctions.inc
Location:
trunk/Assembly_Library/Src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Display/Display.asm

    r181 r323  
    8282%endif
    8383    %define PrintWordFromAXwithBaseInBX                     DisplayPrint_WordFromAXWithBaseInBX
     84%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     85    %define PrintQWordFromSSBPwithBaseInBX                  DisplayPrint_QWordFromSSBPwithBaseInBX
     86%endif
    8487    %define PrintCharBufferFromBXSIwithLengthInCX           DisplayPrint_CharacterBufferFromBXSIwithLengthInCX
    8588    %define PrintNullTerminatedStringFromBXSI               DisplayPrint_NullTerminatedStringFromBXSI
  • trunk/Assembly_Library/Src/Display/DisplayPrint.asm

    r241 r323  
    9292%endif
    9393
     94
     95%ifndef MODULE_STRINGS_COMPRESSED
     96;--------------------------------------------------------------------
     97; DisplayPrint_QWordFromSSBPwithBaseInBX
     98;   Parameters:
     99;       SS:BP:  QWord 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, [SS:BP]
     107;--------------------------------------------------------------------
     108ALIGN JUMP_ALIGN
     109DisplayPrint_QWordFromSSBPwithBaseInBX:
     110    push    cx
     111    push    bx
     112
     113    mov     cx, bx              ; CX = Integer base
     114    xor     bx, bx              ; BX = Character count
     115ALIGN JUMP_ALIGN
     116.DivideLoop:
     117    call    Math_DivQWatSSBPbyCX; Divide by base
     118    push    dx                  ; Push remainder
     119    inc     bx                  ; Increment character count
     120    cmp     WORD [bp], BYTE 0   ; All divided?
     121    jne     SHORT .DivideLoop   ;  If not, loop
     122    mov     cx, bx              ; Character count to CX
     123    jmp     SHORT PrintAllPushedDigits
     124
     125
    94126;--------------------------------------------------------------------
    95127; DisplayPrint_WordFromAXWithBaseInBX
     
    104136;       AX, DX
    105137;--------------------------------------------------------------------
    106 
    107 %ifndef MODULE_STRINGS_COMPRESSED
    108 
    109138ALIGN JUMP_ALIGN
    110139DisplayPrint_WordFromAXWithBaseInBX:
     
    122151    jnz     SHORT .DivideLoop   ;  If not, loop
    123152
    124     mov     bx, .rgcDigitToCharacter
     153PrintAllPushedDigits:
     154    mov     bx, g_rgcDigitToCharacter
    125155ALIGN JUMP_ALIGN
    126156.PrintNextDigit:
     
    133163    pop     cx
    134164    ret
    135 .rgcDigitToCharacter:   db  "0123456789ABCDEF"
     165g_rgcDigitToCharacter:  db  "0123456789ABCDEF"
    136166
    137167%endif  ; MODULE_STRINGS_COMPRESSED
  • trunk/Assembly_Library/Src/Util/Reboot.asm

    r251 r323  
    2929    out     64h, al                 ; Reset computer (AT+)
    3030%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    31     mov     ax, 10
    32     call    Delay_MicrosecondsFromAX
     31    %ifdef INCLUDE_TIME_LIBRARY
     32        mov     ax, 10
     33        call    Delay_MicrosecondsFromAX
     34    %else
     35        JMP_DELAY
     36    %endif
    3337%else
    3438    JMP_DELAY
Note: See TracChangeset for help on using the changeset viewer.