Changeset 202 in xtideuniversalbios
- Timestamp:
- Nov 22, 2011, 2:08:32 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Display/DisplayFormatCompressed.asm
r195 r202 1 1 ; Project name : Assembly Library 2 2 ; Description : Functions for displaying formatted strings. 3 ; ** Compressed Strings edition ** 4 ; 5 ; Authors : Greg Lindhorst 6 ; : gregli@hotmail.com 7 ; : 8 ; : Tomi Tilli 9 ; : aitotat@gmail.com 10 ; : 11 ; Description : This is a plug replacement for DisplayFormat.asm, 12 ; working instead with precompiled and slightly compressed strings. 3 ; ** Compressed Strings edition ** 4 ; This is a plug replacement for DisplayFormat.asm, 5 ; working instead with precompiled and slightly compressed strings. 13 6 ; 14 7 ; Strings are compressed in a simple manner: 15 8 ; 1. The two most common characters, space and null, are removed 16 ; 9 ; 2. Format specifiers are reduced to a single byte, including length information 17 10 ; 18 11 ; Format of bytes in the string are: 19 12 ; 01 xxxxxx Character in x plus StringsCompressed_NormalBase 20 13 ; 10 xxxxxx Character in x plus StringsCompressed_NormalBase, followed by a null (last character) 21 ; 11 xxxxxx Character in x plus StringsCompressed_NormalBase, followed by a space 14 ; 11 xxxxxx Character in x plus StringsCompressed_NormalBase, followed by a space 22 15 ; 00 1 yyyyy Character/Format in lookup table StringsCopmressed_TranslatesAndFormats 23 16 ; 00 0 yyyyy Character/Format in lookup table StringsCompressed_TranslatesAndFormats, followed by a null … … 31 24 ; 32 25 ; The assignments of the first two bits above is not by accident. The translates/format branch is 00 33 ; which is easy to test for. The '01' for "normal" (no null or space) and '001' for translates/format "normal" 26 ; which is easy to test for. The '01' for "normal" (no null or space) and '001' for translates/format "normal" 34 27 ; match, allowing the translates/format codes to be shifted left by 1 and then tested with the same instructions. 35 28 ; 36 ; It is always possible to say that a null character follows the current character - thus there is 29 ; It is always possible to say that a null character follows the current character - thus there is 37 30 ; no way (nor need) to specify a zero character. 38 31 ; … … 41 34 ; much "preload", just in case a branch is taken, but that is cheaper (in size) than adding additional branches. 42 35 ; 43 36 44 37 ; Section containing code 45 38 SECTION .text … … 49 42 ; 50 43 ; Names of format handlers are DisplayFormatCompressed_Format_* where * is 51 ; replaced with the format code after the '%' in the original string, 44 ; replaced with the format code after the '%' in the original string, 52 45 ; with '-' replaced with '_'. 53 46 ; … … 87 80 jz DisplayFormat_ParseCharacters 88 81 ; fall through 89 82 90 83 DisplayFormatCompressed_Format_2_u: 91 84 mov bh,2 ; only two characters (instead of the default 5) 92 85 ; fall through 93 86 94 87 DisplayFormatCompressed_Format_u: 95 88 DisplayFormatCompressed_Format_5_u: … … 101 94 div si ; DX:AX / 10 => AX=quot, DX=rem 102 95 push dx ; Push digit 103 104 dec bh 96 97 dec bh 105 98 jnz .DivLoop 106 99 … … 114 107 ; if it is zero, DisplayPrint_CharacterFromAL will not emit 115 108 116 or bh, al ; skip leading zeros, bh keeps track if we have emitted anyth ng non-zero109 or bh, al ; skip leading zeros, bh keeps track if we have emitted anything non-zero 117 110 jnz .PrintDigit ; note that bh starts at zero, from the loop above 118 111 119 test ch,2 ; are we padding with leading spaces? 112 test ch,2 ; are we padding with leading spaces? 120 113 jnz .PrintLoop ; test the even/odd of the format byte in the string 121 114 122 mov al,' '-'0' ; emit space, but let the following instuctions add '0' 123 124 .PrintDigit: 125 add al,'0' ; Digit to character 126 cmp al,'9' ; for hex output, greater than '9'? 127 jle .NoHexAdjustment 128 add al,'A'-'9'-1 ; adjust for hex output ('A' to 'F') 129 .NoHexAdjustment: 115 mov al, 89h ; emit space 116 117 .PrintDigit: 118 add al, 90h ; Convert binary digit in AL to ASCII hex digit (0 - 9 or A - F) 119 daa 120 adc al, 40h 121 daa 130 122 131 123 call DisplayPrint_CharacterFromAL … … 133 125 jmp .PrintLoop 134 126 135 127 136 128 ;-------------------------------------------------------------------- 137 129 ; DisplayFormat_ParseCharacters … … 146 138 ; Corrupts registers: 147 139 ; AX, BX, CX, DX, BP 148 ;-------------------------------------------------------------------- 140 ;-------------------------------------------------------------------- 149 141 150 142 DisplayFormatCompressed_BaseFormatOffset: 151 143 152 144 DisplayFormat_ParseCharacters_FromAX: 153 145 mov si,ax 154 146 ; fall through to DisplayFormat_ParseCharacters 155 147 156 ALIGN JUMP_ALIGN 157 DisplayFormat_ParseCharacters: 158 ; 159 ; This routine is used to outp tu all strings from the ROM. The strings in ROMVARS are not compressed,148 ALIGN JUMP_ALIGN 149 DisplayFormat_ParseCharacters: 150 ; 151 ; This routine is used to output all strings from the ROM. The strings in ROMVARS are not compressed, 160 152 ; and must be handled differently. 161 153 ; … … 165 157 166 158 .decode: 167 mov al,[cs:si] ; load next byte of the string168 inc si159 eSEG cs 160 lodsb ; load next byte of the string 169 161 170 162 mov ch,al ; save a copy for later processing of high order bits … … 175 167 and al,03fh ; "Normal" character, mask off high order bits 176 168 add al,StringsCompressed_NormalBase ; and add character offset (usually around 0x40) 177 169 178 170 .output: 179 call DisplayPrint_CharacterFromAL 171 call DisplayPrint_CharacterFromAL 180 172 181 173 .process_after_output: … … 189 181 190 182 ALIGN JUMP_ALIGN 191 DisplayFormatCompressed_TranslatesAndFormats: 183 DisplayFormatCompressed_TranslatesAndFormats: 192 184 ; 193 185 ; This routine is here (above DisplayFormat_ParseCharacters) to reduce the amount of code between … … 201 193 202 194 cmp al,StringsCompressed_FormatsBegin ; determine if this is a translation or a format 203 195 204 196 mov al,[cs:bx] ; fetch translation/formats byte 205 197 … … 208 200 ; note that the flags for this conditional jump were 209 201 ; set with the cmp al,StringsCompressed_FormatsBegin 210 202 211 203 mov dx,DisplayFormatCompressed_BaseFormatOffset ; calculate address to jump to for format handler 212 204 sub dx,ax … … 231 223 jmp DisplayFormat_ParseCharacters.process_after_output ; continue postprocessing, check for end of string 232 224 233 234 235 236 237 238 239 240 241 242 243 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
r194 r202 18 18 ALIGN JUMP_ALIGN 19 19 BootMenuEvent_Handler: 20 20 21 21 %ifdef MENUEVENT_INLINE_OFFSETS 22 22 23 23 add bx, BootMenuEvent_Handler 24 24 jmp bx … … 32 32 MENUEVENT_RefreshInformation equ (BootMenuEvent_Handler.RefreshInformation - BootMenuEvent_Handler) 33 33 MENUEVENT_RefreshItemFromCX equ (BootMenuEvent_Handler.RefreshItemFromCX - BootMenuEvent_Handler) 34 ; 35 ; Note that there is no entry for MENUEVENT_IdleProcessing. If MENUEVENT_IDLEPROCESSING_ENABLE is not %defined, 34 ; 35 ; Note that there is no entry for MENUEVENT_IdleProcessing. If MENUEVENT_IDLEPROCESSING_ENABLE is not %defined, 36 36 ; then the entry point will not be called (saving memory on this end and at the CALL point). 37 37 ; 38 38 39 39 %else 40 40 41 41 cmp bx, BYTE MENUEVENT.RefreshItemFromCX ; Above last supported item? 42 42 ja SHORT .EventNotHandled … … 46 46 clc 47 47 ret 48 48 49 49 ALIGN WORD_ALIGN 50 50 .rgfnEventSpecificHandlers: … … 58 58 dw .RefreshInformation ; MENUEVENT.RefreshInformation 59 59 dw .RefreshItemFromCX ; MENUEVENT.RefreshItemFromCX 60 60 61 61 %endif 62 62 … … 153 153 ALIGN JUMP_ALIGN 154 154 .RefreshItemFromCX: 155 mov bl,00h; will result in SF being clear in .RefreshItemOrInformation...155 xor bl, bl ; will result in SF being clear in .RefreshItemOrInformation... 156 156 SKIP2B dx ; dx corrupted below by BootMenu_GetDriveToDXforMenuitemInCX 157 157 ; Fall to .RefreshInformation 158 158 159 159 ; Parameters: 160 160 ; CX: Index of highlighted item … … 183 183 jc SHORT BootMenuPrint_HardDiskMenuitem 184 184 ; fall through to BootMenuEvent_FallThroughToFloppyMenuitem 185 186 ;;; 185 186 ;;; 187 187 ;;; Fall-through (to BootMenuPrint_FloppyMenuitem) 188 188 ;;; (checked at assembler time with the code after BootMenuPrint_FloppyMenuitem) 189 189 ;;; 190 190 ALIGN JUMP_ALIGN 191 BootMenuEvent_FallThroughToFloppyMenuitem: 191 BootMenuEvent_FallThroughToFloppyMenuitem: 192 192 ; fall through to BootMenuPrint_FloppyMenuitem -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/Bootmenu_SerialDetect.txt
r200 r202 1 1 Set to Yes, at the end of normal drive detection, COM ports 1-7 (in reverse order) will be scanned for a connection to a serial drive server. This option provides flexibility with the COM port and baud rate to be used, it need not be configured ahead of time, but at the expense of a slower boot process. Even when this option is set to No, this functionality can still be invoked by holding down the ALT key at the end of normal drive detection. Note that if any serial drives are detected during the normal drive detection, no scan will take place (to avoid finding the same drive twice). 2 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialBaud.txt
r199 r202 1 1 Supported baud rates are 2400, 9600, 38.4K, and 115.2K. The server must also be set to this same speed. Older UARTs may only support 2400 and 9600 baud, but sometimes can be pushed to 38.4K. 115.2K will likely only be possible with a newer UART that inclues a FIFO. Some high speed serial ports include UART clock multipliers, allowing for speeds at 230.4K (2x multiplier) and 460.8K (4x multiplier). These high speeds are supported by these BIOS, even on original 4.77MHz 8088 systems. Note that UART clock multipliers are not detectable by the software and 115.2K will still be used during configuration for high speeds; but if a multiplier is used, the actual speed (including the multiplier) will need to be used on the server. 2 3 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialPort.txt
r199 r202 1 Select a serial port by I/O address. Supported values are between 240h and 438h, and must be on an 8-byte boundary. If the entered value corresponds to one fothe established COM port numbers, then the selection of serial port will use COM numbers instead.1 Select a serial port by I/O address. Supported values are between 240h and 438h, and must be on an 8-byte boundary. If the entered value corresponds to one of the established COM port numbers, then the selection of serial port will use COM numbers instead.
Note:
See TracChangeset
for help on using the changeset viewer.