Changeset 589 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
- Timestamp:
- May 22, 2016, 12:26:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r568 r589 90 90 %ifdef MODULE_SERIAL 91 91 cmp dh, DEVICE_SERIAL_PORT ; Check if this is a serial device 92 93 jnz .pushAndPrint ; CX = string to print, AX = port address, DX won't be used 92 jne SHORT .pushAndPrint ; CX = string to print, AX = port address, DX won't be used 94 93 95 94 mov cl, (g_szDetectCOM-$$) & 0xff ; Setup print string for COM ports … … 106 105 107 106 test dl, dl ; Check if serial port "Auto" 108 jz .pushAndPrintSerial; CX = string to print, AX and DX won't be used107 jz SHORT .pushAndPrintSerial ; CX = string to print, AX and DX won't be used 109 108 110 109 mov cl, (g_szDetectCOMLarge-$$) & 0xff ; Setup secondary print string for "COMn/xx.yK" 111 110 112 mov al, ah ; baud rate divisor to AL111 mov al, ah ; baud rate divisor to AL 113 112 cbw ; clear AH, AL will always be less than 128 114 xchg si, ax ; move AX to SI for divide115 mov ax, 1152; baud rate to display is 115200/divisor, the "00" is handled113 xchg si, ax ; move AX to SI for divide 114 mov ax, 1152 ; baud rate to display is 115200/divisor, the "00" is handled 116 115 ; in the print strings 117 116 cwd ; clear top 16-bits of dividend 118 117 div si ; and divide... Now AX = baud rate/100, DX = 0 (always a clean divide) 119 118 120 mov si, 10 ; Now separate the whole portion from the fractional for "K" display119 mov si, 10 ; Now separate the whole portion from the fractional for "K" display 121 120 div si ; and divide... Now AX = baud rate/1000, DX = low order digit 122 121 123 cmp ax, si ; < 10: "2400", "9600", etc.; >= 10: "19.2K", "38.4K", etc.124 jae .pushAndPrintSerial122 cmp ax, si ; < 10: "2400", "9600", etc.; >= 10: "19.2K", "38.4K", etc. 123 jae SHORT .pushAndPrintSerial 125 124 126 125 mov cl, (g_szDetectCOMSmall-$$) & 0xff ; Setup secondary print string for "COMn/XXy00" … … 150 149 DetectPrint_DriveNameFromDrvDetectInfoInESBX: 151 150 push bp 152 mov bp, sp153 lea si, [bx+DRVDETECTINFO.szDrvName]151 mov bp, sp 152 lea si, [bx+DRVDETECTINFO.szDrvName] 154 153 push si 155 mov si, g_szDriveName154 mov si, g_szDriveName 156 155 jmp SHORT DetectPrint_FormatCSSIfromParamsInSSBP 157 156 … … 276 275 ; 277 276 push bp 278 mov bp, sp277 mov bp, sp 279 278 ; Fall to DetectPrint_FormatCSSIfromParamsInSSBP 280 279
Note:
See TracChangeset
for help on using the changeset viewer.