Changeset 341 in xtideuniversalbios
- Timestamp:
- Mar 13, 2012, 4:19:02 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/Assembly_Library
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Display.inc
r323 r341 64 64 %endif 65 65 .PrintWordFromAXwithBaseInBX resb 2 66 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 66 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG 67 67 .PrintQWordFromSSBPwithBaseInBX resb 2 68 68 %endif -
trunk/Assembly_Library/Src/Display/Display.asm
r323 r341 82 82 %endif 83 83 %define PrintWordFromAXwithBaseInBX DisplayPrint_WordFromAXWithBaseInBX 84 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 84 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG 85 85 %define PrintQWordFromSSBPwithBaseInBX DisplayPrint_QWordFromSSBPwithBaseInBX 86 86 %endif -
trunk/Assembly_Library/Src/Display/DisplayFormat.asm
r241 r341 348 348 push cx 349 349 mov si, [bp] 350 350 351 351 cmp si, byte 07fh ; well within the boundaries of ROMVARS_size 352 352 jb .notFormatted … … 358 358 inc bp 359 359 jmp .done 360 361 .notFormatted: 360 361 .notFormatted: 362 362 call DisplayPrint_NullTerminatedStringFromCSSI 363 363 364 364 .done: 365 365 pop cx 366 366 pop si 367 ret 368 369 ALIGN JUMP_ALIGN 370 z_FormatStringFromSegmentZero: 367 ret 368 369 ALIGN JUMP_ALIGN 370 z_FormatStringFromSegmentZero: 371 371 xchg si, [bp] 372 372 xor bx, bx 373 373 call DisplayPrint_NullTerminatedStringFromBXSI 374 374 mov si, [bp] 375 ret 375 ret 376 376 377 377 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS -
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r323 r341 95 95 %ifndef MODULE_STRINGS_COMPRESSED 96 96 ;-------------------------------------------------------------------- 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 ;-------------------------------------------------------------------- 108 ALIGN JUMP_ALIGN 109 DisplayPrint_WordFromAXWithBaseInBX: 110 push cx 111 push bx 112 113 xor cx, cx 114 ALIGN 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 123 PrintAllPushedDigits: 124 mov bx, g_rgcDigitToCharacter 125 ALIGN 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 136 g_rgcDigitToCharacter: db "0123456789ABCDEF" 137 138 ;-------------------------------------------------------------------- 97 139 ; DisplayPrint_QWordFromSSBPwithBaseInBX 98 140 ; Parameters: … … 106 148 ; AX, DX, [SS:BP] 107 149 ;-------------------------------------------------------------------- 150 %ifndef EXCLUDE_FROM_XTIDECFG ; Not used in XTIDECFG 108 151 ALIGN JUMP_ALIGN 109 152 DisplayPrint_QWordFromSSBPwithBaseInBX: … … 122 165 mov cx, bx ; Character count to CX 123 166 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 166 168 167 169 %endif ; MODULE_STRINGS_COMPRESSED -
trunk/Assembly_Library/Src/Util/Math.asm
r336 r341 17 17 ; AX 18 18 ;-------------------------------------------------------------------- 19 %ifndef EXCLUDE_FROM_XTIDECFG ; Not used in XTIDECFG 19 20 ALIGN JUMP_ALIGN 20 21 Math_DivQWatSSBPbyCX: … … 36 37 mov [bp], ax 37 38 ret 39 %endif 38 40 39 41
Note:
See TracChangeset
for help on using the changeset viewer.