Changeset 323 in xtideuniversalbios for trunk/Assembly_Library/Src/Display
- Timestamp:
- Mar 11, 2012, 6:41:35 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/Assembly_Library/Src/Display
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Display/Display.asm
r181 r323 82 82 %endif 83 83 %define PrintWordFromAXwithBaseInBX DisplayPrint_WordFromAXWithBaseInBX 84 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 85 %define PrintQWordFromSSBPwithBaseInBX DisplayPrint_QWordFromSSBPwithBaseInBX 86 %endif 84 87 %define PrintCharBufferFromBXSIwithLengthInCX DisplayPrint_CharacterBufferFromBXSIwithLengthInCX 85 88 %define PrintNullTerminatedStringFromBXSI DisplayPrint_NullTerminatedStringFromBXSI -
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r241 r323 92 92 %endif 93 93 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 ;-------------------------------------------------------------------- 108 ALIGN JUMP_ALIGN 109 DisplayPrint_QWordFromSSBPwithBaseInBX: 110 push cx 111 push bx 112 113 mov cx, bx ; CX = Integer base 114 xor bx, bx ; BX = Character count 115 ALIGN 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 94 126 ;-------------------------------------------------------------------- 95 127 ; DisplayPrint_WordFromAXWithBaseInBX … … 104 136 ; AX, DX 105 137 ;-------------------------------------------------------------------- 106 107 %ifndef MODULE_STRINGS_COMPRESSED108 109 138 ALIGN JUMP_ALIGN 110 139 DisplayPrint_WordFromAXWithBaseInBX: … … 122 151 jnz SHORT .DivideLoop ; If not, loop 123 152 124 mov bx, .rgcDigitToCharacter 153 PrintAllPushedDigits: 154 mov bx, g_rgcDigitToCharacter 125 155 ALIGN JUMP_ALIGN 126 156 .PrintNextDigit: … … 133 163 pop cx 134 164 ret 135 .rgcDigitToCharacter: db "0123456789ABCDEF"165 g_rgcDigitToCharacter: db "0123456789ABCDEF" 136 166 137 167 %endif ; MODULE_STRINGS_COMPRESSED
Note:
See TracChangeset
for help on using the changeset viewer.