Changeset 590 in xtideuniversalbios for trunk/Assembly_Library/Src
- Timestamp:
- May 25, 2016, 8:16:35 AM (9 years ago)
- Location:
- trunk/Assembly_Library/Src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Display/Display.asm
r526 r590 97 97 %define FormatNullTerminatedStringFromCSSI Display_FormatNullTerminatedStringFromCSSI 98 98 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 99 %define PrintSignedWordFromAXWithBaseInB X DisplayPrint_SignedWordFromAXWithBaseInBX99 %define PrintSignedWordFromAXWithBaseInBL DisplayPrint_SignedWordFromAXWithBaseInBL 100 100 %endif 101 %define PrintWordFromAX withBaseInBX DisplayPrint_WordFromAXWithBaseInBX101 %define PrintWordFromAXWithBaseInBL DisplayPrint_WordFromAXWithBaseInBL 102 102 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG 103 103 %define PrintQWordFromSSBPwithBaseInBX DisplayPrint_QWordFromSSBPwithBaseInBX -
trunk/Assembly_Library/Src/Display/DisplayFormat.asm
r589 r590 334 334 d_FormatSignedDecimalWord: 335 335 mov ax, [bp] 336 mov b x, 10337 jmp DisplayPrint_SignedWordFromAXWithBaseInB X336 mov bl, 10 337 jmp DisplayPrint_SignedWordFromAXWithBaseInBL 338 338 %endif 339 339 … … 341 341 u_FormatUnsignedDecimalWord: 342 342 mov ax, [bp] 343 mov b x, 10344 jmp DisplayPrint_WordFromAXWithBaseInB X343 mov bl, 10 344 jmp DisplayPrint_WordFromAXWithBaseInBL 345 345 346 346 ALIGN DISPLAY_JUMP_ALIGN 347 347 x_FormatHexadecimalWord: 348 348 mov ax, [bp] 349 mov b x, 16350 call DisplayPrint_WordFromAXWithBaseInB X349 mov bl, 16 350 call DisplayPrint_WordFromAXWithBaseInBL 351 351 mov al, 'h' 352 352 jmp DisplayPrint_CharacterFromAL … … 354 354 ALIGN DISPLAY_JUMP_ALIGN 355 355 I_FormatDashForZero: 356 mov ax, [bp] 357 test ax,ax 358 jnz u_FormatUnsignedDecimalWord 359 mov [bp], word g_szDashForZero 356 cmp WORD [bp], 0 357 jne SHORT u_FormatUnsignedDecimalWord 358 mov WORD [bp], g_szDashForZero 360 359 ;;; fall-through 361 360 … … 366 365 mov si, [bp] 367 366 368 cmp si, byte 07fh ;well within the boundaries of ROMVARS_size367 cmp si, BYTE 7Fh ; well within the boundaries of ROMVARS_size 369 368 jb .notFormatted 370 369 -
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r589 r590 83 83 84 84 ;-------------------------------------------------------------------- 85 ; DisplayPrint_SignedWordFromAXWithBaseInB X85 ; DisplayPrint_SignedWordFromAXWithBaseInBL 86 86 ; Parameters: 87 87 ; AX: Word to display 88 ; B X: Integer base (binary=2, octal=8, decimal=10, hexadecimal=16)89 ; DS: BDA segment (zero) 90 ; ES:DI: Ptr to cursor location in video RAM 91 ; Returns: 92 ; DI: Updated offset to video RAM 93 ; Corrupts registers: 94 ; AX, DX88 ; BL: Integer base (binary=2, octal=8, decimal=10, hexadecimal=16) 89 ; DS: BDA segment (zero) 90 ; ES:DI: Ptr to cursor location in video RAM 91 ; Returns: 92 ; DI: Updated offset to video RAM 93 ; Corrupts registers: 94 ; AX, BH, DX 95 95 ;-------------------------------------------------------------------- 96 96 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 97 97 ALIGN DISPLAY_JUMP_ALIGN 98 DisplayPrint_SignedWordFromAXWithBaseInB X:99 test ax, ax100 jns SHORT DisplayPrint_WordFromAXWithBaseInB X98 DisplayPrint_SignedWordFromAXWithBaseInBL: 99 sahf 100 jns SHORT DisplayPrint_WordFromAXWithBaseInBL 101 101 102 102 push ax … … 105 105 pop ax 106 106 neg ax 107 ; Fall to DisplayPrint_WordFromAXWithBaseInB X108 %endif 109 110 111 ;-------------------------------------------------------------------- 112 ; DisplayPrint_WordFromAXWithBaseInB X107 ; Fall to DisplayPrint_WordFromAXWithBaseInBL 108 %endif 109 110 111 ;-------------------------------------------------------------------- 112 ; DisplayPrint_WordFromAXWithBaseInBL 113 113 ; Parameters: 114 114 ; AX: Word to display 115 ; B X: Integer base (binary=2, octal=8, decimal=10, hexadecimal=16)116 ; DS: BDA segment (zero) 117 ; ES:DI: Ptr to cursor location in video RAM 118 ; Returns: 119 ; DI: Updated offset to video RAM 120 ; Corrupts registers: 121 ; AX, DX115 ; BL: Integer base (binary=2, octal=8, decimal=10, hexadecimal=16) 116 ; DS: BDA segment (zero) 117 ; ES:DI: Ptr to cursor location in video RAM 118 ; Returns: 119 ; DI: Updated offset to video RAM 120 ; Corrupts registers: 121 ; AX, BH, DX 122 122 ;-------------------------------------------------------------------- 123 123 %ifndef MODULE_STRINGS_COMPRESSED 124 124 ALIGN DISPLAY_JUMP_ALIGN 125 DisplayPrint_WordFromAXWithBaseInB X:125 DisplayPrint_WordFromAXWithBaseInBL: 126 126 push cx 127 127 128 128 xor cx, cx 129 xor bh, bh ; Base now in BX 129 130 ALIGN DISPLAY_JUMP_ALIGN 130 131 .DivideLoop: -
trunk/Assembly_Library/Src/LibraryTests.asm
r526 r590 598 598 pop ds 599 599 mov si, .rgwItems 600 mov b x, 16600 mov bl, 16 601 601 .Loop: 602 602 lodsw 603 CALL_DISPLAY_LIBRARY PrintSignedWordFromAXWithBaseInB X603 CALL_DISPLAY_LIBRARY PrintSignedWordFromAXWithBaseInBL 604 604 CALL_DISPLAY_LIBRARY PrintNewlineCharacters 605 605 loop .Loop
Note:
See TracChangeset
for help on using the changeset viewer.