[57] | 1 | ; Project name : XTIDE Universal BIOS Configurator v2 |
---|
| 2 | ; Description : "IDE Controller" menu structs and functions. |
---|
| 3 | |
---|
[376] | 4 | ; |
---|
[399] | 5 | ; XTIDE Universal BIOS and Associated Tools |
---|
[526] | 6 | ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team. |
---|
[376] | 7 | ; |
---|
| 8 | ; This program is free software; you can redistribute it and/or modify |
---|
| 9 | ; it under the terms of the GNU General Public License as published by |
---|
| 10 | ; the Free Software Foundation; either version 2 of the License, or |
---|
| 11 | ; (at your option) any later version. |
---|
[399] | 12 | ; |
---|
[376] | 13 | ; This program is distributed in the hope that it will be useful, |
---|
| 14 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
[399] | 16 | ; GNU General Public License for more details. |
---|
[376] | 17 | ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
[399] | 18 | ; |
---|
[376] | 19 | |
---|
[57] | 20 | ; Section containing initialized data |
---|
| 21 | SECTION .data |
---|
| 22 | |
---|
| 23 | ALIGN WORD_ALIGN |
---|
| 24 | g_MenupageForIdeControllerMenu: |
---|
| 25 | istruc MENUPAGE |
---|
| 26 | at MENUPAGE.fnEnter, dw IdeControllerMenu_EnterMenuOrModifyItemVisibility |
---|
[59] | 27 | at MENUPAGE.fnBack, dw ConfigurationMenu_EnterMenuOrModifyItemVisibility |
---|
[546] | 28 | at MENUPAGE.wMenuitems, dw 11 |
---|
[57] | 29 | iend |
---|
| 30 | |
---|
| 31 | g_MenuitemIdeControllerBackToConfigurationMenu: |
---|
| 32 | istruc MENUITEM |
---|
| 33 | at MENUITEM.fnActivate, dw ConfigurationMenu_EnterMenuOrModifyItemVisibility |
---|
| 34 | at MENUITEM.szName, dw g_szItemBackToCfgMenu |
---|
| 35 | at MENUITEM.szQuickInfo, dw g_szNfoIdeBackToCfgMenu |
---|
| 36 | at MENUITEM.szHelp, dw g_szNfoIdeBackToCfgMenu |
---|
| 37 | at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE |
---|
| 38 | at MENUITEM.bType, db TYPE_MENUITEM_PAGEBACK |
---|
| 39 | iend |
---|
| 40 | |
---|
| 41 | g_MenuitemIdeControllerMasterDrive: |
---|
| 42 | istruc MENUITEM |
---|
| 43 | at MENUITEM.fnActivate, dw MasterDrive |
---|
| 44 | at MENUITEM.szName, dw g_szItemIdeMaster |
---|
| 45 | at MENUITEM.szQuickInfo, dw g_szNfoIdeMaster |
---|
| 46 | at MENUITEM.szHelp, dw g_szNfoIdeMaster |
---|
| 47 | at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE |
---|
| 48 | at MENUITEM.bType, db TYPE_MENUITEM_PAGENEXT |
---|
| 49 | iend |
---|
| 50 | |
---|
| 51 | g_MenuitemIdeControllerSlaveDrive: |
---|
| 52 | istruc MENUITEM |
---|
| 53 | at MENUITEM.fnActivate, dw SlaveDrive |
---|
| 54 | at MENUITEM.szName, dw g_szItemIdeSlave |
---|
| 55 | at MENUITEM.szQuickInfo, dw g_szNfoIdeSlave |
---|
| 56 | at MENUITEM.szHelp, dw g_szNfoIdeSlave |
---|
| 57 | at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE |
---|
| 58 | at MENUITEM.bType, db TYPE_MENUITEM_PAGENEXT |
---|
| 59 | iend |
---|
| 60 | |
---|
[153] | 61 | g_MenuitemIdeControllerDevice: |
---|
[57] | 62 | istruc MENUITEM |
---|
[108] | 63 | at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI |
---|
[233] | 64 | at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromRawItemInDSSI |
---|
[153] | 65 | at MENUITEM.szName, dw g_szItemIdeDevice |
---|
| 66 | at MENUITEM.szQuickInfo, dw g_szNfoIdeDevice |
---|
| 67 | at MENUITEM.szHelp, dw g_szNfoIdeDevice |
---|
[199] | 68 | at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_MODIFY_MENU |
---|
[108] | 69 | at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE |
---|
[57] | 70 | at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL |
---|
[153] | 71 | at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDevice |
---|
| 72 | at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceCfgDevice |
---|
| 73 | at MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup, dw g_rgwChoiceToValueLookupForDevice |
---|
| 74 | at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForDevice |
---|
[199] | 75 | at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw IdeControllerMenu_WriteDevice |
---|
[57] | 76 | iend |
---|
| 77 | |
---|
| 78 | g_MenuitemIdeControllerCommandBlockAddress: |
---|
| 79 | istruc MENUITEM |
---|
| 80 | at MENUITEM.fnActivate, dw Menuitem_ActivateHexInputForMenuitemInDSSI |
---|
| 81 | at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI |
---|
| 82 | at MENUITEM.szName, dw g_szItemIdeCmdPort |
---|
| 83 | at MENUITEM.szQuickInfo, dw g_szNfoIdeCmdPort |
---|
| 84 | at MENUITEM.szHelp, dw g_szHelpIdeCmdPort |
---|
[502] | 85 | at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE |
---|
[57] | 86 | at MENUITEM.bType, db TYPE_MENUITEM_HEX |
---|
| 87 | at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL |
---|
| 88 | at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgIdeCmdPort |
---|
| 89 | at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 0 |
---|
| 90 | at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw -1 |
---|
| 91 | iend |
---|
| 92 | |
---|
| 93 | g_MenuitemIdeControllerControlBlockAddress: |
---|
| 94 | istruc MENUITEM |
---|
| 95 | at MENUITEM.fnActivate, dw Menuitem_ActivateHexInputForMenuitemInDSSI |
---|
| 96 | at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI |
---|
| 97 | at MENUITEM.szName, dw g_szItemIdeCtrlPort |
---|
| 98 | at MENUITEM.szQuickInfo, dw g_szNfoIdeCtrlPort |
---|
| 99 | at MENUITEM.szHelp, dw g_szHelpIdeCtrlPort |
---|
[483] | 100 | at MENUITEM.bFlags, db NULL |
---|
[57] | 101 | at MENUITEM.bType, db TYPE_MENUITEM_HEX |
---|
| 102 | at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL |
---|
| 103 | at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgIdeCtrlPort |
---|
| 104 | at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 0 |
---|
| 105 | at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw -1 |
---|
| 106 | iend |
---|
| 107 | |
---|
[199] | 108 | g_MenuitemIdeControllerSerialCOM: |
---|
| 109 | istruc MENUITEM |
---|
| 110 | at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI |
---|
[233] | 111 | at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromRawItemInDSSI |
---|
[199] | 112 | at MENUITEM.szName, dw g_szItemSerialCOM |
---|
| 113 | at MENUITEM.szQuickInfo, dw g_szNfoIdeSerialCOM |
---|
| 114 | at MENUITEM.szHelp, dw g_szHelpIdeSerialCOM |
---|
[233] | 115 | at MENUITEM.bFlags, db FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_CHOICESTRINGS |
---|
[242] | 116 | at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE |
---|
[199] | 117 | at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL |
---|
| 118 | at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDevice |
---|
| 119 | at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szSerialCOMChoice |
---|
[233] | 120 | at MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup, dw g_rgbChoiceToValueLookupForCOM |
---|
| 121 | at MENUITEM.itemValue + ITEM_VALUE.rgszChoiceToStringLookup, dw g_rgszChoiceToStringLookupForCOM |
---|
[199] | 122 | at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw IdeControllerMenu_SerialWriteCOM |
---|
| 123 | iend |
---|
| 124 | |
---|
| 125 | g_MenuitemIdeControllerSerialPort: |
---|
| 126 | istruc MENUITEM |
---|
| 127 | at MENUITEM.fnActivate, dw Menuitem_ActivateHexInputForMenuitemInDSSI |
---|
| 128 | at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI |
---|
| 129 | at MENUITEM.szName, dw g_szItemSerialPort |
---|
| 130 | at MENUITEM.szQuickInfo, dw g_szNfoIdeSerialPort |
---|
| 131 | at MENUITEM.szHelp, dw g_szHelpIdeSerialPort |
---|
[233] | 132 | at MENUITEM.bFlags, db FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_BYTEVALUE |
---|
[199] | 133 | at MENUITEM.bType, db TYPE_MENUITEM_HEX |
---|
| 134 | at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL |
---|
| 135 | at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgIdeCmdPort |
---|
[233] | 136 | at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 8h |
---|
| 137 | at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 3f8h |
---|
[199] | 138 | at MENUITEM.itemValue + ITEM_VALUE.fnValueReader, dw IdeControllerMenu_SerialReadPort |
---|
| 139 | at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw IdeControllerMenu_SerialWritePort |
---|
[242] | 140 | iend |
---|
[199] | 141 | |
---|
[242] | 142 | g_MenuitemIdeControllerSerialBaud: |
---|
[199] | 143 | istruc MENUITEM |
---|
| 144 | at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI |
---|
[233] | 145 | at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromRawItemInDSSI |
---|
[199] | 146 | at MENUITEM.szName, dw g_szItemSerialBaud |
---|
| 147 | at MENUITEM.szQuickInfo, dw g_szNfoIdeSerialBaud |
---|
| 148 | at MENUITEM.szHelp, dw g_szHelpIdeSerialBaud |
---|
[233] | 149 | at MENUITEM.bFlags, db FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_CHOICESTRINGS |
---|
[199] | 150 | at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE |
---|
| 151 | at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL |
---|
| 152 | at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDevice |
---|
| 153 | at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szSerialBaudChoice |
---|
[233] | 154 | at MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup, dw g_rgbChoiceToValueLookupForBaud |
---|
| 155 | at MENUITEM.itemValue + ITEM_VALUE.rgszChoiceToStringLookup, dw g_rgszChoiceToStringLookupForBaud |
---|
[199] | 156 | iend |
---|
[242] | 157 | |
---|
[57] | 158 | g_MenuitemIdeControllerEnableInterrupt: |
---|
| 159 | istruc MENUITEM |
---|
[108] | 160 | at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI |
---|
[59] | 161 | at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI |
---|
[57] | 162 | at MENUITEM.szName, dw g_szItemIdeEnIRQ |
---|
| 163 | at MENUITEM.szQuickInfo, dw g_szNfoIdeEnIRQ |
---|
| 164 | at MENUITEM.szHelp, dw g_szHelpIdeEnIRQ |
---|
[459] | 165 | at MENUITEM.bFlags, db FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_FLAGVALUE |
---|
[108] | 166 | at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE |
---|
[57] | 167 | at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL |
---|
| 168 | at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgIdeEnIRQ |
---|
[108] | 169 | at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceBooleanFlag |
---|
[57] | 170 | at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans |
---|
| 171 | at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw 15 |
---|
| 172 | iend |
---|
| 173 | |
---|
| 174 | g_MenuitemIdeControllerIdeIRQ: |
---|
| 175 | istruc MENUITEM |
---|
| 176 | at MENUITEM.fnActivate, dw Menuitem_ActivateUnsignedInputForMenuitemInDSSI |
---|
| 177 | at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI |
---|
| 178 | at MENUITEM.szName, dw g_szItemIdeIRQ |
---|
| 179 | at MENUITEM.szQuickInfo, dw g_szNfoIdeIRQ |
---|
| 180 | at MENUITEM.szHelp, dw g_szHelpIdeIRQ |
---|
| 181 | at MENUITEM.bFlags, db FLG_MENUITEM_BYTEVALUE |
---|
| 182 | at MENUITEM.bType, db TYPE_MENUITEM_UNSIGNED |
---|
| 183 | at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL |
---|
| 184 | at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgIdeIRQ |
---|
| 185 | at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 2 |
---|
| 186 | at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 15 |
---|
| 187 | iend |
---|
| 188 | |
---|
[153] | 189 | g_rgwChoiceToValueLookupForDevice: |
---|
| 190 | dw DEVICE_16BIT_ATA |
---|
| 191 | dw DEVICE_32BIT_ATA |
---|
[481] | 192 | dw DEVICE_8BIT_ATA |
---|
| 193 | dw DEVICE_8BIT_XTIDE_REV1 |
---|
| 194 | dw DEVICE_8BIT_XTIDE_REV2 |
---|
| 195 | dw DEVICE_8BIT_XTCF_PIO8 |
---|
[546] | 196 | dw DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD |
---|
[481] | 197 | dw DEVICE_8BIT_XTCF_DMA |
---|
| 198 | dw DEVICE_8BIT_JRIDE_ISA |
---|
[536] | 199 | dw DEVICE_8BIT_ADP50L |
---|
[153] | 200 | dw DEVICE_SERIAL_PORT |
---|
| 201 | g_rgszValueToStringLookupForDevice: |
---|
| 202 | dw g_szValueCfgDevice16b |
---|
| 203 | dw g_szValueCfgDevice32b |
---|
[481] | 204 | dw g_szValueCfgDevice8b |
---|
| 205 | dw g_szValueCfgDeviceRev1 |
---|
| 206 | dw g_szValueCfgDeviceRev2 |
---|
[546] | 207 | dw g_szValueCfgDeviceXTCFPio8 |
---|
| 208 | dw g_szValueCfgDeviceXTCFPio8WithBIUOffload |
---|
| 209 | dw g_szValueCfgDeviceXTCFDMA |
---|
[481] | 210 | dw g_szValueCfgDeviceJrIdeIsa |
---|
[536] | 211 | dw g_szValueCfgDeviceADP50L |
---|
[153] | 212 | dw g_szValueCfgDeviceSerial |
---|
[57] | 213 | |
---|
[233] | 214 | g_rgbChoiceToValueLookupForCOM: |
---|
| 215 | dw '1' |
---|
| 216 | dw '2' |
---|
| 217 | dw '3' |
---|
| 218 | dw '4' |
---|
| 219 | dw '5' |
---|
| 220 | dw '6' |
---|
| 221 | dw '7' |
---|
| 222 | dw '8' |
---|
| 223 | dw '9' |
---|
| 224 | dw 'A' |
---|
| 225 | dw 'B' |
---|
| 226 | dw 'C' |
---|
| 227 | dw 'x' ; must be last entry (see reader/write routines) |
---|
[242] | 228 | g_rgszChoiceToStringLookupForCOM: |
---|
[199] | 229 | dw g_szValueCfgCOM1 |
---|
| 230 | dw g_szValueCfgCOM2 |
---|
| 231 | dw g_szValueCfgCOM3 |
---|
| 232 | dw g_szValueCfgCOM4 |
---|
| 233 | dw g_szValueCfgCOM5 |
---|
| 234 | dw g_szValueCfgCOM6 |
---|
| 235 | dw g_szValueCfgCOM7 |
---|
| 236 | dw g_szValueCfgCOM8 |
---|
| 237 | dw g_szValueCfgCOM9 |
---|
| 238 | dw g_szValueCfgCOMA |
---|
| 239 | dw g_szValueCfgCOMB |
---|
| 240 | dw g_szValueCfgCOMC |
---|
| 241 | dw g_szValueCfgCOMx |
---|
[233] | 242 | dw NULL |
---|
[57] | 243 | |
---|
[567] | 244 | SERIAL_DEFAULT_CUSTOM_PORT EQU 300h ; can't be any of the pre-defined COM values |
---|
| 245 | SERIAL_DEFAULT_COM EQU '1' |
---|
| 246 | SERIAL_DEFAULT_BAUD EQU ((115200 / 9600) & 0xff) |
---|
[199] | 247 | |
---|
[567] | 248 | PackedCOMPortAddresses: ; COM1 - COMC (or COM12) |
---|
| 249 | db SERIAL_COM1_IOADDRESS >> 2 |
---|
[280] | 250 | db SERIAL_COM2_IOADDRESS >> 2 |
---|
| 251 | db SERIAL_COM3_IOADDRESS >> 2 |
---|
| 252 | db SERIAL_COM4_IOADDRESS >> 2 |
---|
| 253 | db SERIAL_COM5_IOADDRESS >> 2 |
---|
| 254 | db SERIAL_COM6_IOADDRESS >> 2 |
---|
| 255 | db SERIAL_COM7_IOADDRESS >> 2 |
---|
| 256 | db SERIAL_COM8_IOADDRESS >> 2 |
---|
| 257 | db SERIAL_COM9_IOADDRESS >> 2 |
---|
| 258 | db SERIAL_COMA_IOADDRESS >> 2 |
---|
| 259 | db SERIAL_COMB_IOADDRESS >> 2 |
---|
| 260 | db SERIAL_COMC_IOADDRESS >> 2 |
---|
| 261 | db SERIAL_DEFAULT_CUSTOM_PORT >> 2 ; must be last entry (see reader/writer routines) |
---|
[242] | 262 | |
---|
[233] | 263 | g_rgbChoiceToValueLookupForBaud: |
---|
| 264 | dw (115200 / 115200) & 0xff |
---|
| 265 | dw (115200 / 57600) & 0xff |
---|
| 266 | dw (115200 / 38400) & 0xff |
---|
| 267 | dw (115200 / 28800) & 0xff |
---|
| 268 | dw (115200 / 19200) & 0xff |
---|
| 269 | dw (115200 / 9600) & 0xff |
---|
| 270 | dw (115200 / 4800) & 0xff |
---|
| 271 | dw (115200 / 2400) & 0xff |
---|
| 272 | g_rgszChoiceToStringLookupForBaud: |
---|
| 273 | dw g_szValueCfgBaud115_2 |
---|
| 274 | dw g_szValueCfgBaud57_6 |
---|
| 275 | dw g_szValueCfgBaud38_4 |
---|
| 276 | dw g_szValueCfgBaud28_8 |
---|
| 277 | dw g_szValueCfgBaud19_2 |
---|
| 278 | dw g_szValueCfgBaud9600 |
---|
| 279 | dw g_szValueCfgBaud4800 |
---|
| 280 | dw g_szValueCfgBaud2400 |
---|
| 281 | dw NULL |
---|
[199] | 282 | |
---|
[57] | 283 | ; Section containing code |
---|
| 284 | SECTION .text |
---|
| 285 | |
---|
| 286 | ;-------------------------------------------------------------------- |
---|
| 287 | ; IdeControllerMenu_InitializeToIdevarsOffsetInBX |
---|
| 288 | ; Parameters: |
---|
| 289 | ; SS:BP: Menu handle |
---|
| 290 | ; Returns: |
---|
| 291 | ; Nothing |
---|
| 292 | ; Corrupts registers: |
---|
| 293 | ; AX |
---|
| 294 | ;-------------------------------------------------------------------- |
---|
| 295 | ALIGN JUMP_ALIGN |
---|
| 296 | IdeControllerMenu_InitializeToIdevarsOffsetInBX: |
---|
| 297 | lea ax, [bx+IDEVARS.drvParamsMaster] |
---|
| 298 | mov [cs:g_MenuitemIdeControllerMasterDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax |
---|
| 299 | |
---|
| 300 | lea ax, [bx+IDEVARS.drvParamsSlave] |
---|
| 301 | mov [cs:g_MenuitemIdeControllerSlaveDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax |
---|
| 302 | |
---|
[153] | 303 | lea ax, [bx+IDEVARS.bDevice] |
---|
| 304 | mov [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax |
---|
[57] | 305 | |
---|
[481] | 306 | lea ax, [bx+IDEVARS.wBasePort] |
---|
[57] | 307 | mov [cs:g_MenuitemIdeControllerCommandBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax |
---|
[242] | 308 | |
---|
| 309 | lea ax, [bx+IDEVARS.bSerialPort] |
---|
[199] | 310 | mov [cs:g_MenuitemIdeControllerSerialPort+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax |
---|
[233] | 311 | |
---|
| 312 | lea ax, [bx+IDEVARS.bSerialBaud] |
---|
[199] | 313 | mov [cs:g_MenuitemIdeControllerSerialBaud+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax |
---|
[242] | 314 | |
---|
[481] | 315 | lea ax, [bx+IDEVARS.wControlBlockPort] |
---|
[57] | 316 | mov [cs:g_MenuitemIdeControllerControlBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax |
---|
[242] | 317 | |
---|
[233] | 318 | lea ax, [bx+IDEVARS.bSerialCOMPortChar] |
---|
[242] | 319 | mov [cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax |
---|
[57] | 320 | |
---|
| 321 | lea ax, [bx+IDEVARS.bIRQ] |
---|
| 322 | mov [cs:g_MenuitemIdeControllerEnableInterrupt+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax |
---|
| 323 | mov [cs:g_MenuitemIdeControllerIdeIRQ+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax |
---|
[199] | 324 | |
---|
[57] | 325 | ret |
---|
| 326 | |
---|
| 327 | |
---|
| 328 | ;-------------------------------------------------------------------- |
---|
| 329 | ; IdeControllerMenu_EnterMenuOrModifyItemVisibility |
---|
| 330 | ; Parameters: |
---|
| 331 | ; SS:BP: Menu handle |
---|
| 332 | ; Returns: |
---|
| 333 | ; Nothing |
---|
| 334 | ; Corrupts registers: |
---|
| 335 | ; All, except BP |
---|
| 336 | ;-------------------------------------------------------------------- |
---|
| 337 | ALIGN JUMP_ALIGN |
---|
| 338 | IdeControllerMenu_EnterMenuOrModifyItemVisibility: |
---|
| 339 | push cs |
---|
| 340 | pop ds |
---|
[567] | 341 | call .EnableOrDisableCommandBlockPort |
---|
[483] | 342 | call .EnableOrDisableControlBlockPort |
---|
[459] | 343 | call .DisableIRQchannelSelection |
---|
| 344 | call .EnableOrDisableEnableInterrupt |
---|
[199] | 345 | call .EnableOrDisableSerial |
---|
[57] | 346 | mov si, g_MenupageForIdeControllerMenu |
---|
| 347 | jmp Menupage_ChangeToNewMenupageInDSSI |
---|
| 348 | |
---|
[459] | 349 | |
---|
[57] | 350 | ;-------------------------------------------------------------------- |
---|
[567] | 351 | ; .EnableOrDisableCommandBlockPort |
---|
| 352 | ; Parameters: |
---|
| 353 | ; SS:BP: Menu handle |
---|
| 354 | ; Returns: |
---|
| 355 | ; Nothing |
---|
| 356 | ; Corrupts registers: |
---|
| 357 | ; AX, BX |
---|
| 358 | ;-------------------------------------------------------------------- |
---|
| 359 | ALIGN JUMP_ALIGN |
---|
| 360 | .EnableOrDisableCommandBlockPort: |
---|
| 361 | mov bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] |
---|
| 362 | call Buffers_GetRomvarsValueToAXfromOffsetInBX |
---|
| 363 | mov bx, g_MenuitemIdeControllerCommandBlockAddress |
---|
| 364 | cmp al, DEVICE_SERIAL_PORT |
---|
| 365 | je SHORT .DisableMenuitemFromCSBX |
---|
| 366 | jmp SHORT .EnableMenuitemFromCSBX |
---|
| 367 | |
---|
| 368 | |
---|
| 369 | ;-------------------------------------------------------------------- |
---|
[483] | 370 | ; .EnableOrDisableControlBlockPort |
---|
| 371 | ; Parameters: |
---|
| 372 | ; SS:BP: Menu handle |
---|
| 373 | ; Returns: |
---|
| 374 | ; Nothing |
---|
| 375 | ; Corrupts registers: |
---|
| 376 | ; AX, BX |
---|
| 377 | ;-------------------------------------------------------------------- |
---|
| 378 | ALIGN JUMP_ALIGN |
---|
| 379 | .EnableOrDisableControlBlockPort: |
---|
| 380 | mov bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] |
---|
| 381 | call Buffers_GetRomvarsValueToAXfromOffsetInBX |
---|
| 382 | mov bx, g_MenuitemIdeControllerControlBlockAddress |
---|
| 383 | cmp al, DEVICE_8BIT_XTCF_PIO8 |
---|
[536] | 384 | jb SHORT .EnableMenuitemFromCSBX ; Not needed for XT-CF, JR-IDE/ISA and ADP50L |
---|
[483] | 385 | jmp SHORT .DisableMenuitemFromCSBX |
---|
| 386 | |
---|
| 387 | |
---|
| 388 | ;-------------------------------------------------------------------- |
---|
[459] | 389 | ; .EnableOrDisableEnableInterrupt |
---|
[57] | 390 | ; Parameters: |
---|
| 391 | ; SS:BP: Menu handle |
---|
| 392 | ; Returns: |
---|
| 393 | ; Nothing |
---|
| 394 | ; Corrupts registers: |
---|
| 395 | ; AX, BX |
---|
| 396 | ;-------------------------------------------------------------------- |
---|
| 397 | ALIGN JUMP_ALIGN |
---|
[459] | 398 | .EnableOrDisableEnableInterrupt: |
---|
| 399 | call Buffers_GetRomvarsFlagsToAX |
---|
| 400 | mov bx, g_MenuitemIdeControllerEnableInterrupt |
---|
| 401 | test ax, FLG_ROMVARS_MODULE_IRQ |
---|
| 402 | jz SHORT .DisableMenuitemFromCSBX |
---|
| 403 | |
---|
| 404 | mov bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] |
---|
| 405 | call Buffers_GetRomvarsValueToAXfromOffsetInBX |
---|
| 406 | mov bx, g_MenuitemIdeControllerEnableInterrupt |
---|
[567] | 407 | cmp al, DEVICE_8BIT_XTCF_PIO8 |
---|
[459] | 408 | jae SHORT .DisableMenuitemFromCSBX |
---|
| 409 | |
---|
[567] | 410 | call EnableMenuitemFromCSBX |
---|
[459] | 411 | ; Fall to .EnableOrDisableIRQchannelSelection |
---|
| 412 | |
---|
| 413 | ;-------------------------------------------------------------------- |
---|
| 414 | ; .EnableOrDisableIRQchannelSelection |
---|
| 415 | ; Parameters: |
---|
| 416 | ; SS:BP: Menu handle |
---|
| 417 | ; Returns: |
---|
| 418 | ; Nothing |
---|
| 419 | ; Corrupts registers: |
---|
| 420 | ; AX, BX |
---|
| 421 | ;-------------------------------------------------------------------- |
---|
| 422 | ALIGN JUMP_ALIGN |
---|
| 423 | .EnableOrDisableIRQchannelSelection: |
---|
[57] | 424 | mov bx, [cs:g_MenuitemIdeControllerEnableInterrupt+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] |
---|
| 425 | call Buffers_GetRomvarsValueToAXfromOffsetInBX |
---|
| 426 | mov bx, g_MenuitemIdeControllerIdeIRQ |
---|
[109] | 427 | test al, al |
---|
[459] | 428 | jnz SHORT .EnableMenuitemFromCSBX |
---|
| 429 | .DisableIRQchannelSelection: |
---|
| 430 | mov bx, g_MenuitemIdeControllerIdeIRQ |
---|
| 431 | ; Fall to .DisableMenuitemFromCSBX |
---|
[57] | 432 | |
---|
[459] | 433 | |
---|
[57] | 434 | ;-------------------------------------------------------------------- |
---|
[459] | 435 | ; .DisableMenuitemFromCSBX |
---|
[57] | 436 | ; .EnableMenuitemFromCSBX |
---|
| 437 | ; Parameters: |
---|
| 438 | ; CS:BX: Ptr to MENUITEM |
---|
| 439 | ; Returns: |
---|
| 440 | ; Nothing |
---|
| 441 | ; Corrupts registers: |
---|
| 442 | ; Nothing |
---|
| 443 | ;-------------------------------------------------------------------- |
---|
| 444 | ALIGN JUMP_ALIGN |
---|
[459] | 445 | .DisableMenuitemFromCSBX: |
---|
[567] | 446 | jmp DisableMenuitemFromCSBX |
---|
[57] | 447 | |
---|
| 448 | ALIGN JUMP_ALIGN |
---|
[459] | 449 | .EnableMenuitemFromCSBX: |
---|
[567] | 450 | jmp EnableMenuitemFromCSBX |
---|
[57] | 451 | |
---|
[459] | 452 | |
---|
[199] | 453 | .EnableOrDisableSerial: |
---|
| 454 | mov bx, g_MenuitemIdeControllerSerialBaud |
---|
[567] | 455 | call DisableMenuitemFromCSBX |
---|
[199] | 456 | |
---|
| 457 | mov bx, g_MenuitemIdeControllerSerialCOM |
---|
[567] | 458 | call DisableMenuitemFromCSBX |
---|
[199] | 459 | |
---|
| 460 | mov bx, g_MenuitemIdeControllerSerialPort |
---|
[567] | 461 | call DisableMenuitemFromCSBX |
---|
[242] | 462 | |
---|
| 463 | mov bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] |
---|
[199] | 464 | call Buffers_GetRomvarsValueToAXfromOffsetInBX |
---|
[459] | 465 | cmp al, DEVICE_SERIAL_PORT |
---|
[567] | 466 | jne .DisableAllSerial |
---|
[199] | 467 | |
---|
| 468 | mov bx, g_MenuitemIdeControllerSerialCOM |
---|
[567] | 469 | call EnableMenuitemFromCSBX |
---|
[199] | 470 | |
---|
| 471 | mov bx, g_MenuitemIdeControllerSerialBaud |
---|
[567] | 472 | call EnableMenuitemFromCSBX |
---|
[199] | 473 | |
---|
[242] | 474 | mov bx, [cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] |
---|
[199] | 475 | call Buffers_GetRomvarsValueToAXfromOffsetInBX |
---|
| 476 | mov bx, g_MenuitemIdeControllerSerialPort |
---|
[567] | 477 | cmp al, 'x' |
---|
| 478 | je SHORT .EnableMenuitemFromCSBX |
---|
| 479 | jmp SHORT .DisableMenuitemFromCSBX |
---|
[199] | 480 | .DisableAllSerial: |
---|
| 481 | ret |
---|
[242] | 482 | |
---|
[57] | 483 | ;-------------------------------------------------------------------- |
---|
| 484 | ; MENUITEM activation functions (.fnActivate) |
---|
| 485 | ; Parameters: |
---|
| 486 | ; SS:BP: Ptr to MENU |
---|
| 487 | ; Returns: |
---|
| 488 | ; Nothing |
---|
| 489 | ; Corrupts registers: |
---|
| 490 | ; All, except segments |
---|
| 491 | ;-------------------------------------------------------------------- |
---|
| 492 | ALIGN JUMP_ALIGN |
---|
| 493 | MasterDrive: |
---|
| 494 | mov bx, [cs:g_MenuitemIdeControllerMasterDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] |
---|
| 495 | jmp SHORT DisplayMasterSlaveMenu |
---|
| 496 | |
---|
| 497 | ALIGN JUMP_ALIGN |
---|
| 498 | SlaveDrive: |
---|
| 499 | mov bx, [cs:g_MenuitemIdeControllerSlaveDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] |
---|
| 500 | ; Fall to DisplayMasterSlaveMenu |
---|
| 501 | |
---|
| 502 | ALIGN JUMP_ALIGN |
---|
| 503 | DisplayMasterSlaveMenu: |
---|
[233] | 504 | ; |
---|
[567] | 505 | ; "Block Mode Transfers" and "Internal Write Cache" are not supported on serial drives, disable/enable the options as appropriate |
---|
[233] | 506 | ; |
---|
| 507 | push bx |
---|
[242] | 508 | mov bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] |
---|
[233] | 509 | call Buffers_GetRomvarsValueToAXfromOffsetInBX |
---|
| 510 | mov bx, g_MenuitemMasterSlaveBlockModeTransfers |
---|
[567] | 511 | |
---|
| 512 | cmp al, DEVICE_SERIAL_PORT |
---|
| 513 | je .isSerial |
---|
| 514 | |
---|
| 515 | call EnableMenuitemFromCSBX |
---|
| 516 | mov bx, g_MenuitemMasterSlaveWriteCache |
---|
| 517 | call EnableMenuitemFromCSBX |
---|
[233] | 518 | jmp .isDone |
---|
[567] | 519 | |
---|
[242] | 520 | .isSerial: |
---|
[567] | 521 | call DisableMenuitemFromCSBX |
---|
| 522 | mov bx, g_MenuitemMasterSlaveWriteCache |
---|
| 523 | call DisableMenuitemFromCSBX |
---|
| 524 | |
---|
[233] | 525 | .isDone: |
---|
| 526 | pop bx |
---|
[242] | 527 | |
---|
[57] | 528 | call MasterSlaveMenu_InitializeToDrvparamsOffsetInBX |
---|
| 529 | jmp MasterSlaveMenu_EnterMenuOrModifyItemVisibility |
---|
[199] | 530 | |
---|
| 531 | ;------------------------------------------------------------------------------------------ |
---|
| 532 | ; |
---|
| 533 | ; Reader/Writer Routines |
---|
| 534 | ; |
---|
| 535 | ; For serial drives, we pack the port number and baud rate into a single byte, and thus |
---|
| 536 | ; we need to take care to properly read/write just the bits we need. In addition, since |
---|
| 537 | ; we use the Port/PortCtrl bytes in a special way for serial drives, we need to properly |
---|
[242] | 538 | ; default the values stored in both these words when switching in and out of the Serial |
---|
[199] | 539 | ; device choice. |
---|
| 540 | ; |
---|
| 541 | ; Writers: |
---|
| 542 | ; Parameters: |
---|
[567] | 543 | ; AX: Value that the MENUITEM system was interacting with |
---|
| 544 | ; ES:DI: ROMVARS location where the value is to be stored |
---|
| 545 | ; DS:SI: MENUITEM pointer |
---|
[199] | 546 | ; Returns: |
---|
| 547 | ; AX: Value to actually write to ROMVARS |
---|
| 548 | ; Corrupts registers: |
---|
| 549 | ; AX |
---|
| 550 | ; |
---|
| 551 | ; Readers: |
---|
| 552 | ; Parameters: |
---|
[567] | 553 | ; AX: Value read from the ROMVARS location |
---|
| 554 | ; ES:DI: ROMVARS location where the value was just read from |
---|
| 555 | ; DS:SI: MENUITEM pointer |
---|
[199] | 556 | ; Returns: |
---|
| 557 | ; AX: Value that the MENUITEM system will interact with and display |
---|
| 558 | ; Corrupts registers: |
---|
| 559 | ; AX |
---|
| 560 | ; |
---|
[483] | 561 | ALIGN JUMP_ALIGN |
---|
| 562 | WriterForXTCFwindow: |
---|
[567] | 563 | xor al, al |
---|
| 564 | SKIP2B f |
---|
| 565 | ReaderForXTCFwindow: |
---|
[483] | 566 | xor ah, ah |
---|
[567] | 567 | xchg al, ah |
---|
[483] | 568 | ret |
---|
[199] | 569 | |
---|
[483] | 570 | |
---|
[199] | 571 | ; |
---|
| 572 | ; No change to Device byte, but use this opportunity to change defaults stored in wPort and wPortCtrl if we are |
---|
[242] | 573 | ; changing in/out of a Serial device (since we use these bytes in radically different ways). |
---|
[199] | 574 | ; |
---|
| 575 | ALIGN JUMP_ALIGN |
---|
| 576 | IdeControllerMenu_WriteDevice: |
---|
[567] | 577 | push bx |
---|
| 578 | push di |
---|
| 579 | push ax |
---|
[199] | 580 | |
---|
[567] | 581 | ; Note! AL is the choice index, not device code |
---|
| 582 | shl ax, 1 ; Selection to device code |
---|
| 583 | mov bl, [es:di] ; what is the current Device we are changing from? |
---|
| 584 | sub di, BYTE IDEVARS.bDevice - IDEVARS.wBasePort ; Get ready to set the Port addresses |
---|
| 585 | cmp al, DEVICE_SERIAL_PORT |
---|
| 586 | je SHORT .ChangingToSerial |
---|
| 587 | cmp al, DEVICE_8BIT_JRIDE_ISA |
---|
| 588 | je SHORT .ChangingToJrIdeIsa |
---|
| 589 | cmp al, DEVICE_8BIT_ADP50L |
---|
| 590 | je SHORT .ChangingToADP50L |
---|
[242] | 591 | |
---|
[567] | 592 | ; Restore ports to default values |
---|
| 593 | cmp al, DEVICE_8BIT_ATA ; Standard ATA controllers, including 8-bit mode |
---|
| 594 | mov ax, DEVICE_ATA_PRIMARY_PORT ; Defaults for 16-bit and better ATA devices |
---|
| 595 | mov bx, DEVICE_ATA_PRIMARY_PORTCTRL |
---|
| 596 | jbe SHORT .WriteNonSerial |
---|
[199] | 597 | |
---|
[567] | 598 | mov ax, DEVICE_XTIDE_DEFAULT_PORT ; Defaults for 8-bit XTIDE and XT-CF devices |
---|
| 599 | mov bx, DEVICE_XTIDE_DEFAULT_PORTCTRL |
---|
[483] | 600 | |
---|
[567] | 601 | .WriteNonSerial: |
---|
| 602 | stosw ; Store defaults in IDEVARS.wBasePort and IDEVARS.wBasePortCtrl |
---|
| 603 | xchg bx, ax |
---|
| 604 | stosw |
---|
| 605 | jmp SHORT .Done |
---|
[199] | 606 | |
---|
[483] | 607 | .ChangingToJrIdeIsa: |
---|
[567] | 608 | mov ah, JRIDE_DEFAULT_SEGMENT_ADDRESS >> 8 |
---|
| 609 | SKIP2B bx |
---|
[536] | 610 | |
---|
| 611 | .ChangingToADP50L: |
---|
[567] | 612 | mov ah, ADP50L_DEFAULT_BIOS_SEGMENT_ADDRESS >> 8 |
---|
| 613 | xor al, al |
---|
| 614 | xor bx, bx |
---|
| 615 | jmp SHORT .WriteNonSerial |
---|
[199] | 616 | |
---|
[567] | 617 | .ChangingToSerial: |
---|
| 618 | cmp bl, DEVICE_SERIAL_PORT |
---|
| 619 | je SHORT .Done ; if we were already serial, nothing to do |
---|
[199] | 620 | |
---|
[567] | 621 | mov BYTE [es:di+IDEVARS.bSerialBaud-IDEVARS.wBasePort], SERIAL_DEFAULT_BAUD |
---|
[233] | 622 | |
---|
[567] | 623 | mov al, SERIAL_DEFAULT_COM |
---|
| 624 | sub di, IDEVARS.wBasePort - IDEVARS.bSerialCOMPortChar |
---|
| 625 | call IdeControllerMenu_SerialWriteCOM |
---|
| 626 | stosb |
---|
[242] | 627 | |
---|
[567] | 628 | .Done: |
---|
| 629 | pop ax |
---|
| 630 | pop di ; IDEVARS.bDevice |
---|
| 631 | pop bx |
---|
| 632 | ret |
---|
[199] | 633 | |
---|
| 634 | ; |
---|
[233] | 635 | ; Doesn't modify COM character (unless it is not recognized, which would be an error case), |
---|
[242] | 636 | ; But does update the port address based on COM port selection |
---|
| 637 | ; |
---|
[199] | 638 | ALIGN JUMP_ALIGN |
---|
| 639 | IdeControllerMenu_SerialWriteCOM: |
---|
[567] | 640 | push ax |
---|
| 641 | push bx |
---|
| 642 | push si |
---|
[242] | 643 | |
---|
[567] | 644 | mov si, g_rgbChoiceToValueLookupForCOM |
---|
| 645 | mov bx, PackedCOMPortAddresses |
---|
[199] | 646 | |
---|
[233] | 647 | .loop: |
---|
[567] | 648 | mov ah, [bx] |
---|
[199] | 649 | |
---|
[567] | 650 | cmp ah, (SERIAL_DEFAULT_CUSTOM_PORT >> 2) |
---|
| 651 | je .notFound |
---|
[242] | 652 | |
---|
[567] | 653 | cmp al, [si] |
---|
| 654 | je .found |
---|
[242] | 655 | |
---|
[567] | 656 | inc si |
---|
| 657 | inc si |
---|
| 658 | inc bx |
---|
[242] | 659 | |
---|
[567] | 660 | jmp .loop |
---|
[199] | 661 | |
---|
[233] | 662 | .notFound: |
---|
[567] | 663 | mov al, 'x' |
---|
[242] | 664 | |
---|
| 665 | .found: |
---|
[567] | 666 | mov [es:di+IDEVARS.bSerialPort-IDEVARS.bSerialCOMPortChar], ah |
---|
[199] | 667 | |
---|
[567] | 668 | pop si |
---|
| 669 | pop bx |
---|
| 670 | pop ax |
---|
[242] | 671 | |
---|
[567] | 672 | ret |
---|
[199] | 673 | |
---|
[242] | 674 | |
---|
[199] | 675 | ; |
---|
[233] | 676 | ; Packed Port (byte) -> Numeric Port (word) |
---|
[242] | 677 | ; |
---|
[199] | 678 | ALIGN JUMP_ALIGN |
---|
[233] | 679 | IdeControllerMenu_SerialReadPort: |
---|
[567] | 680 | xor ah, ah |
---|
| 681 | eSHL_IM ax, 2 |
---|
| 682 | ret |
---|
[199] | 683 | |
---|
| 684 | ; |
---|
[233] | 685 | ; Numeric Port (word) -> Packed Port (byte) |
---|
| 686 | ; And convert from Custom to a defined COM port if we match one of the pre-defined COM port numbers |
---|
[199] | 687 | ; |
---|
| 688 | ALIGN JUMP_ALIGN |
---|
[242] | 689 | IdeControllerMenu_SerialWritePort: |
---|
[567] | 690 | push bx |
---|
| 691 | push si |
---|
[199] | 692 | |
---|
[567] | 693 | eSHR_IM ax, 2 |
---|
| 694 | and al, 0feh ; force 8-byte boundary |
---|
[199] | 695 | |
---|
[567] | 696 | mov si, g_rgbChoiceToValueLookupForCOM |
---|
| 697 | mov bx, PackedCOMPortAddresses ; loop, looking for port address in known COM address list |
---|
[233] | 698 | |
---|
| 699 | .loop: |
---|
[567] | 700 | mov ah, [si] |
---|
| 701 | cmp ah, 'x' |
---|
| 702 | je .found |
---|
[242] | 703 | |
---|
[567] | 704 | cmp al, [bx] |
---|
| 705 | je .found |
---|
[242] | 706 | |
---|
[567] | 707 | inc si |
---|
| 708 | inc si |
---|
| 709 | inc bx |
---|
[242] | 710 | |
---|
[567] | 711 | jmp .loop |
---|
[199] | 712 | |
---|
[242] | 713 | .found: |
---|
[567] | 714 | mov [es:di+IDEVARS.bSerialCOMPortChar-IDEVARS.bSerialPort], ah |
---|
[233] | 715 | |
---|
[567] | 716 | pop si |
---|
| 717 | pop bx |
---|
[199] | 718 | |
---|
[567] | 719 | ret |
---|
[199] | 720 | |
---|