- Timestamp:
- May 8, 2011, 8:02:52 PM (14 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r155 r161 56 56 CALL_DISPLAY_LIBRARY PrintNewlineCharacters 57 57 mov si, ROMVARS.szVersion 58 ; Fall t hrough to BootMenuPrint_NullTerminatedStringFromCSSIandSetCF58 ; Fall to BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 59 59 60 60 … … 169 169 mov si, g_szDriveNum 170 170 push ax 171 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP171 jmp SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP 172 172 173 173 … … 187 187 call FloppyDrive_GetType ; Get Floppy Drive type to BX 188 188 test bx, bx ; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD) 189 push bp 190 mov bp, sp 189 191 jz SHORT .PrintXTFloppyType 190 192 cmp bl, FLOPPY_TYPE_35_ED 191 193 ja SHORT .PrintUnknownFloppyType 192 jmp SHORT .PrintKnownFloppyType 193 194 ;-------------------------------------------------------------------- 195 ; .PrintXTFloppyType 196 ; Parameters: 197 ; Nothing 198 ; Returns: 199 ; CF: Set since menu event was handled successfully 200 ; Corrupts registers: 201 ; AX, SI, DI 202 ;-------------------------------------------------------------------- 203 ALIGN JUMP_ALIGN 204 .PrintXTFloppyType: 205 push bp 206 mov si, g_szFddSizeOr 207 jmp SHORT .FormatXTorUnknownTypeFloppyDrive 208 209 ;-------------------------------------------------------------------- 210 ; .PrintUnknownFloppyType 211 ; Parameters: 212 ; Nothing 213 ; Returns: 214 ; CF: Set since menu event was handled successfully 215 ; Corrupts registers: 216 ; AX, SI, DI 217 ;-------------------------------------------------------------------- 218 ALIGN JUMP_ALIGN 219 .PrintUnknownFloppyType: 220 push bp 221 mov si, g_szFddUnknown 222 .FormatXTorUnknownTypeFloppyDrive: 223 mov bp, sp 224 ePUSH_T ax, g_szCapacity 225 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP 194 ; Fall to .PrintKnownFloppyType 195 226 196 227 197 ;-------------------------------------------------------------------- … … 236 206 ALIGN JUMP_ALIGN 237 207 .PrintKnownFloppyType: 238 push bp239 mov bp, sp240 208 mov si, g_szFddSize 241 209 ePUSH_T ax, g_szCapacity 242 210 dec bx ; Cannot be 0 (FLOPPY_TYPE_525_OR_35_DD) 243 211 shl bx, 1 ; Shift for WORD lookup 244 mov ax, [cs:bx+ .rgwPhysicalSize]212 mov ax, [cs:bx+FloppyTypes.rgwPhysicalSize] 245 213 push ax ; '5' or '3' 246 214 mov al, ah 247 215 push ax ; '1/4' or '1/2' 248 push WORD [cs:bx+ .rgwCapacity]216 push WORD [cs:bx+FloppyTypes.rgwCapacity] 249 217 jmp SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP 250 218 219 220 ;-------------------------------------------------------------------- 221 ; .PrintXTFloppyType 222 ; .PrintUnknownFloppyType 223 ; Parameters: 224 ; Nothing 225 ; Returns: 226 ; CF: Set since menu event was handled successfully 227 ; Corrupts registers: 228 ; AX, SI, DI 229 ;-------------------------------------------------------------------- 230 ALIGN JUMP_ALIGN 231 .PrintXTFloppyType: 232 mov si, g_szFddSizeOr 233 jmp SHORT .FormatXTorUnknownTypeFloppyDrive 234 ALIGN JUMP_ALIGN 235 .PrintUnknownFloppyType: 236 mov si, g_szFddUnknown 237 .FormatXTorUnknownTypeFloppyDrive: 238 ePUSH_T ax, g_szCapacity 239 jmp SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP 240 241 242 ;-------------------------------------------------------------------- 243 ; Prints Hard Disk Menuitem information strings. 244 ; 245 ; BootMenuPrint_HardDiskMenuitemInformation 246 ; Parameters: 247 ; DL: Untranslated Hard Disk number 248 ; DS: RAMVARS segment 249 ; Returns: 250 ; CF: Set since menu event was handled successfully 251 ; Corrupts registers: 252 ; BX, CX, DX, SI, DI, ES 253 ;-------------------------------------------------------------------- 254 ALIGN JUMP_ALIGN 255 BootMenuPrint_HardDiskMenuitemInformation: 256 call RamVars_IsDriveHandledByThisBIOS 257 jnc SHORT .HardDiskMenuitemInfoForForeignDrive 258 call FindDPT_ForDriveNumber ; DS:DI to point DPT 259 ; Fall to .HardDiskMenuitemInfoForOurDrive 260 261 ;-------------------------------------------------------------------- 262 ; .HardDiskMenuitemInfoForOurDrive 263 ; Parameters: 264 ; DL: Untranslated Hard Disk number 265 ; DS:DI: Ptr to DPT 266 ; Returns: 267 ; Nothing 268 ; Corrupts registers: 269 ; AX, BX, CX, DX, SI, DI, ES 270 ;-------------------------------------------------------------------- 271 ALIGN JUMP_ALIGN 272 .HardDiskMenuitemInfoForOurDrive: 273 push di 274 ePUSH_T ax, BootMenuPrintCfg_ForOurDrive ; Return from BootMenuPrint_FormatCSSIfromParamsInSSBP 275 push bp 276 mov bp, sp 277 ePUSH_T ax, g_szCapacity 278 279 ; Get and push L-CHS size 280 mov [RAMVARS.bTimeoutTicksLeft], dl ; Store drive number 281 call AH15h_GetSectorCountToDXAX 282 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 283 284 ; Get and push total LBA size 285 mov dl, [RAMVARS.bTimeoutTicksLeft] ; Restore drive number 286 call BootInfo_GetTotalSectorCount 287 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 288 289 mov si, g_szSizeDual 290 jmp SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP 291 292 293 ;-------------------------------------------------------------------- 294 ; .HardDiskMenuitemInfoForForeignDrive 295 ; Parameters: 296 ; DL: Untranslated Hard Disk number 297 ; DS: RAMVARS segment 298 ; Returns: 299 ; CF: Set since menu event was handled successfully 300 ; Corrupts registers: 301 ; AX, BX, CX, DX, SI, DI 302 ;-------------------------------------------------------------------- 303 ALIGN JUMP_ALIGN 304 .HardDiskMenuitemInfoForForeignDrive: 305 push bp 306 mov bp, sp 307 ePUSH_T ax, g_szCapacity 308 309 call DriveXlate_ToOrBack 310 call AH15h_GetSectorCountFromForeignDriveToDXAX 311 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 312 313 mov si, g_szSizeSingle 314 ; Fall to BootMenuPrint_FormatCSSIfromParamsInSSBP 315 316 317 ;-------------------------------------------------------------------- 318 ; BootMenuPrint_FormatCSSIfromParamsInSSBP 319 ; Parameters: 320 ; CS:SI: Ptr to string to format 321 ; BP: SP before pushing parameters 322 ; Returns: 323 ; BP: Popped from stack 324 ; Corrupts registers: 325 ; AX, DI 326 ;-------------------------------------------------------------------- 327 ALIGN JUMP_ALIGN 328 BootMenuPrint_FormatCSSIfromParamsInSSBP: 329 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 330 stc ; Successfull return from menu event 331 pop bp 332 ret 333 334 335 ;-------------------------------------------------------------------- 336 ; ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 337 ; Parameters: 338 ; BX:DX:AX: Sector count 339 ; Returns: 340 ; Size in stack 341 ; Corrupts registers: 342 ; AX, BX, CX, DX, SI 343 ;-------------------------------------------------------------------- 344 ALIGN JUMP_ALIGN 345 ConvertSectorCountInBXDXAXtoSizeAndPushForFormat: 346 pop si ; Pop return address 347 call Size_ConvertSectorCountInBXDXAXtoKiB 348 mov cx, BYTE_MULTIPLES.kiB 349 call Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX 350 push ax ; Size in magnitude 351 push cx ; Tenths 352 push dx ; Magnitude character 353 jmp si 354 355 356 ;-------------------------------------------------------------------- 357 ; BootMenuPrint_ClearInformationArea 358 ; Parameters: 359 ; Nothing 360 ; Returns: 361 ; CF: Set 362 ; Corrupts registers: 363 ; AX, DI 364 ;-------------------------------------------------------------------- 365 ALIGN JUMP_ALIGN 366 BootMenuPrint_ClearInformationArea: 367 CALL_MENU_LIBRARY ClearInformationArea 368 stc 369 ret 370 371 372 ;-------------------------------------------------------------------- 373 ; BootMenuPrint_TheBottomOfScreen 374 ; Parameters: 375 ; DS: RAMVARS segment 376 ; Returns: 377 ; Nothing 378 ; Corrupts registers: 379 ; AX, BX, CX, DX, SI, DI 380 ;-------------------------------------------------------------------- 381 ALIGN JUMP_ALIGN 382 BootMenuPrint_TheBottomOfScreen: 383 call FloppyDrive_GetCountToCX 384 mov bl, cl ; Floppy Drive count to BL 385 call RamVars_GetHardDiskCountFromBDAtoCX 386 mov bh, cl ; Hard Disk count to BH 387 ; Fall to .MoveCursorToHotkeyStrings 388 389 ;-------------------------------------------------------------------- 390 ; .MoveCursorToHotkeyStrings 391 ; Parameters: 392 ; Nothing 393 ; Returns: 394 ; Nothing 395 ; Corrupts registers: 396 ; AX, DI 397 ;-------------------------------------------------------------------- 398 .MoveCursorToHotkeyStrings: 399 CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH 400 xor al, al 401 dec ah 402 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 403 ; Fall to .PrintHotkeyString 404 405 ;-------------------------------------------------------------------- 406 ; .PrintHotkeyString 407 ; Parameters: 408 ; BL: Floppy Drives 409 ; BH: Hard Drives 410 ; Returns: 411 ; Nothing 412 ; Corrupts registers: 413 ; AX, CX, DX, SI, DI 414 ;-------------------------------------------------------------------- 415 .PrintHotkeyString: 416 ; Display Library should not be called like this 417 mov si, ATTRIBUTE_CHARS.cHighlightedItem 418 call MenuAttribute_GetToAXfromTypeInSI 419 xchg dx, ax 420 mov cx, MONO_BRIGHT 421 422 test bl, bl ; Any Floppy Drives? 423 jz SHORT .SkipFloppyDriveHotkeys 424 mov ax, 'A' | (ANGLE_QUOTE_RIGHT<<8) 425 mov si, g_szFDD 426 call PushHotkeyParamsAndFormat 427 428 .SkipFloppyDriveHotkeys: 429 test bh, bh ; Any Hard Drives? 430 jz SHORT .SkipHardDriveHotkeys 431 xchg ax, cx ; Store Key Attribute 432 call BootMenu_GetLetterForFirstHardDiskToCL 433 mov ch, ANGLE_QUOTE_RIGHT 434 xchg ax, cx 435 mov si, g_szHDD 436 call PushHotkeyParamsAndFormat 437 438 .SkipHardDriveHotkeys: 439 ; Fall to .PrintRomBootHotkey 440 441 ;-------------------------------------------------------------------- 442 ; .PrintRomBootHotkey 443 ; Parameters: 444 ; CX: Key Attribute 445 ; DX: Description Attribute 446 ; Returns: 447 ; Nothing 448 ; Corrupts registers: 449 ; AX, SI, DI 450 ;-------------------------------------------------------------------- 451 .PrintRomBootHotkey: 452 mov ax, 'F' | ('8'<<8) ; F8 453 mov si, g_szRomBoot 454 ; Fall to PushHotkeyParamsAndFormat 455 456 ;-------------------------------------------------------------------- 457 ; PushHotkeyParamsAndFormat 458 ; Parameters: 459 ; AL: First character 460 ; AH: Second character 461 ; CX: Key Attribute 462 ; DX: Description Attribute 463 ; CS:SI: Description string 464 ; Returns: 465 ; Nothing 466 ; Corrupts registers: 467 ; AX, SI, DI 468 ;-------------------------------------------------------------------- 469 ALIGN JUMP_ALIGN 470 PushHotkeyParamsAndFormat: 471 push bp 472 mov bp, sp 473 474 push cx ; Key attribute 475 push ax ; First character 476 xchg al, ah 477 push ax ; Second character 478 push dx ; Description attribute 479 push si ; Description string 480 push cx ; Key attribute for last space 481 mov si, g_szHotkey 482 jmp SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP 483 251 484 ALIGN WORD_ALIGN 485 FloppyTypes: 252 486 .rgwCapacity: 253 487 dw 360 … … 264 498 db '3', 171 ; 5, 3.5" ED on some BIOSes 265 499 db '3', 171 ; 6, FLOPPY_TYPE_35_ED 266 267 268 ;--------------------------------------------------------------------269 ; Prints Hard Disk Menuitem information strings.270 ;271 ; BootMenuPrint_HardDiskMenuitemInformation272 ; Parameters:273 ; DL: Untranslated Hard Disk number274 ; DS: RAMVARS segment275 ; Returns:276 ; CF: Set since menu event was handled successfully277 ; Corrupts registers:278 ; BX, CX, DX, SI, DI, ES279 ;--------------------------------------------------------------------280 ALIGN JUMP_ALIGN281 BootMenuPrint_HardDiskMenuitemInformation:282 call RamVars_IsDriveHandledByThisBIOS283 jnc SHORT .HardDiskMenuitemInfoForForeignDrive284 call FindDPT_ForDriveNumber ; DS:DI to point DPT285 ; Fall to .HardDiskMenuitemInfoForOurDrive286 287 ;--------------------------------------------------------------------288 ; .HardDiskMenuitemInfoForOurDrive289 ; Parameters:290 ; DL: Untranslated Hard Disk number291 ; DS:DI: Ptr to DPT292 ; Returns:293 ; Nothing294 ; Corrupts registers:295 ; AX, BX, CX, DX, SI, DI, ES296 ;--------------------------------------------------------------------297 ALIGN JUMP_ALIGN298 .HardDiskMenuitemInfoForOurDrive:299 push di300 ePUSH_T ax, BootMenuPrintCfg_ForOurDrive ; Return from BootMenuPrint_FormatCSSIfromParamsInSSBP301 push bp302 mov bp, sp303 ePUSH_T ax, g_szCapacity304 305 ; Get and push L-CHS size306 mov [RAMVARS.bTimeoutTicksLeft], dl ; Store drive number307 call AH15h_GetSectorCountToDXAX308 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat309 310 ; Get and push total LBA size311 mov dl, [RAMVARS.bTimeoutTicksLeft] ; Restore drive number312 call BootInfo_GetTotalSectorCount313 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat314 315 mov si, g_szSizeDual316 jmp SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP317 318 319 ;--------------------------------------------------------------------320 ; .HardDiskMenuitemInfoForForeignDrive321 ; Parameters:322 ; DL: Untranslated Hard Disk number323 ; DS: RAMVARS segment324 ; Returns:325 ; CF: Set since menu event was handled successfully326 ; Corrupts registers:327 ; AX, BX, CX, DX, SI, DI328 ;--------------------------------------------------------------------329 ALIGN JUMP_ALIGN330 .HardDiskMenuitemInfoForForeignDrive:331 push bp332 mov bp, sp333 ePUSH_T ax, g_szCapacity334 335 call DriveXlate_ToOrBack336 call AH15h_GetSectorCountFromForeignDriveToDXAX337 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat338 339 mov si, g_szSizeSingle340 ; Fall to BootMenuPrint_FormatCSSIfromParamsInSSBP341 342 343 ;--------------------------------------------------------------------344 ; BootMenuPrint_FormatCSSIfromParamsInSSBP345 ; Parameters:346 ; CS:SI: Ptr to string to format347 ; BP: SP before pushing parameters348 ; Returns:349 ; BP: Popped from stack350 ; Corrupts registers:351 ; AX, DI352 ;--------------------------------------------------------------------353 ALIGN JUMP_ALIGN354 BootMenuPrint_FormatCSSIfromParamsInSSBP:355 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI356 stc ; Successfull return from menu event357 pop bp358 ret359 360 361 ;--------------------------------------------------------------------362 ; ConvertSectorCountInBXDXAXtoSizeAndPushForFormat363 ; Parameters:364 ; BX:DX:AX: Sector count365 ; Returns:366 ; Size in stack367 ; Corrupts registers:368 ; AX, BX, CX, DX, SI369 ;--------------------------------------------------------------------370 ALIGN JUMP_ALIGN371 ConvertSectorCountInBXDXAXtoSizeAndPushForFormat:372 pop si ; Pop return address373 call Size_ConvertSectorCountInBXDXAXtoKiB374 mov cx, BYTE_MULTIPLES.kiB375 call Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX376 push ax ; Size in magnitude377 push cx ; Tenths378 push dx ; Magnitude character379 jmp si380 381 382 ;--------------------------------------------------------------------383 ; BootMenuPrint_ClearInformationArea384 ; Parameters:385 ; Nothing386 ; Returns:387 ; CF: Set388 ; Corrupts registers:389 ; AX, DI390 ;--------------------------------------------------------------------391 ALIGN JUMP_ALIGN392 BootMenuPrint_ClearInformationArea:393 CALL_MENU_LIBRARY ClearInformationArea394 stc395 ret396 397 398 ;--------------------------------------------------------------------399 ; BootMenuPrint_TheBottomOfScreen400 ; Parameters:401 ; DS: RAMVARS segment402 ; Returns:403 ; Nothing404 ; Corrupts registers:405 ; AX, BX, CX, DX, SI, DI406 ;--------------------------------------------------------------------407 ALIGN JUMP_ALIGN408 BootMenuPrint_TheBottomOfScreen:409 call FloppyDrive_GetCountToCX410 mov bl, cl ; Floppy Drive count to BL411 call RamVars_GetHardDiskCountFromBDAtoCX412 mov bh, cl ; Hard Disk count to BH413 ; Fall to .MoveCursorToHotkeyStrings414 415 ;--------------------------------------------------------------------416 ; .MoveCursorToHotkeyStrings417 ; Parameters:418 ; Nothing419 ; Returns:420 ; Nothing421 ; Corrupts registers:422 ; AX, DI423 ;--------------------------------------------------------------------424 .MoveCursorToHotkeyStrings:425 CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH426 xor al, al427 dec ah428 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX429 ; Fall to .PrintHotkeyString430 431 ;--------------------------------------------------------------------432 ; .PrintHotkeyString433 ; Parameters:434 ; BL: Floppy Drives435 ; BH: Hard Drives436 ; Returns:437 ; Nothing438 ; Corrupts registers:439 ; AX, CX, DX, SI, DI440 ;--------------------------------------------------------------------441 .PrintHotkeyString:442 ; Display Library should not be called like this443 mov si, ATTRIBUTE_CHARS.cHighlightedItem444 call MenuAttribute_GetToAXfromTypeInSI445 xchg dx, ax446 mov cx, MONO_BRIGHT447 448 test bl, bl ; Any Floppy Drives?449 jz SHORT .SkipFloppyDriveHotkeys450 mov ax, 'A' | (ANGLE_QUOTE_RIGHT<<8)451 mov si, g_szFDD452 call PushHotkeyParamsAndFormat453 454 .SkipFloppyDriveHotkeys:455 test bh, bh ; Any Hard Drives?456 jz SHORT .SkipHardDriveHotkeys457 xchg ax, cx ; Store Key Attribute458 call BootMenu_GetLetterForFirstHardDiskToCL459 mov ch, ANGLE_QUOTE_RIGHT460 xchg ax, cx461 mov si, g_szHDD462 call PushHotkeyParamsAndFormat463 464 .SkipHardDriveHotkeys:465 ; Fall to .PrintRomBootHotkey466 467 ;--------------------------------------------------------------------468 ; .PrintRomBootHotkey469 ; Parameters:470 ; CX: Key Attribute471 ; DX: Description Attribute472 ; Returns:473 ; Nothing474 ; Corrupts registers:475 ; AX, SI, DI476 ;--------------------------------------------------------------------477 .PrintRomBootHotkey:478 mov ax, 'F' | ('8'<<8) ; F8479 mov si, g_szRomBoot480 ; Fall to PushHotkeyParamsAndFormat481 482 ;--------------------------------------------------------------------483 ; PushHotkeyParamsAndFormat484 ; Parameters:485 ; AL: First character486 ; AH: Second character487 ; CX: Key Attribute488 ; DX: Description Attribute489 ; CS:SI: Description string490 ; Returns:491 ; Nothing492 ; Corrupts registers:493 ; AX, SI, DI494 ;--------------------------------------------------------------------495 ALIGN JUMP_ALIGN496 PushHotkeyParamsAndFormat:497 push bp498 mov bp, sp499 500 push cx ; Key attribute501 push ax ; First character502 xchg al, ah503 push ax ; Second character504 push dx ; Description attribute505 push si ; Description string506 push cx ; Key attribute for last space507 mov si, g_szHotkey508 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP -
trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm
r160 r161 20 20 jnz SHORT ReturnSuccessForSerialPort 21 21 jmp IdeDPT_Finalize 22 .FinalizeDptForSerialPortDevice: 23 jmp SerialDPT_Finalize22 ;.FinalizeDptForSerialPortDevice: ; Dead label 23 ; jmp SerialDPT_Finalize ; and code 24 24 25 25 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm
r160 r161 44 44 stc ; Set CF since wait done by OS 45 45 .ReturnFromWaitNotify: 46 sti ; Enable interrupts 46 47 pop ds 47 sti ; Enable interrupts48 48 ret 49 49 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r158 r161 223 223 ALIGN JUMP_ALIGN 224 224 DualByteReadForXtide: 225 %ifdef USE_186 226 shr cx, 2 ; Smaller but slower on 186/286 227 %else 225 228 times 2 shr cx, 1 ; Loop unrolling 229 %endif 226 230 mov bx, 8 ; Bit mask for toggling data low/high reg 227 231 ALIGN JUMP_ALIGN … … 311 315 push ds 312 316 push bx 317 %ifdef USE_186 318 shr cx, 2 ; Smaller but slower on 186/286 319 %else 313 320 times 2 shr cx, 1 ; Loop unrolling 321 %endif 314 322 mov bx, 8 ; Bit mask for toggling data low/high reg 315 323 push es ; Copy ES... … … 357 365 WordWriteForXTIDEmod: 358 366 push ds 367 %ifdef USE_186 368 shr cx, 2 ; Smaller but slower on 186/286 369 %else 359 370 times 2 shr cx, 1 ; Loop unrolling 371 %endif 360 372 push es ; Copy ES... 361 373 pop ds ; ...to DS -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r155 r161 48 48 ; SS:BP: Ptr to IDEPACK 49 49 ; BX, DI: Corrupted on Int13h_DiskFunctionsHandler 50 ; Other: Function specific INT 13h parameters 50 ; Other: Function specific INT 13h parameters 51 51 ; Returns: 52 52 ; Depends on function … … 152 152 xchg di, [es:BIOS_DISK_INTERRUPT_13h*4+2] 153 153 mov [RAMVARS.fpOldI13h+2], di 154 sti 154 155 pop es 155 sti156 156 ret 157 157 … … 184 184 or BYTE [bp+IDEPACK.intpack+INTPACK.flags], FLG_FLAGS_CF 185 185 ret 186 187 186 188 187 … … 212 211 dw Int13h_UnsupportedFunction ; 14h, Controller Internal Diagnostic (All) 213 212 dw AH15h_HandlerForReadDiskDriveSize ; 15h, Read Disk Drive Size (AT+) 214 dw Int13h_UnsupportedFunction ; 16h, 215 dw Int13h_UnsupportedFunction ; 17h, 216 dw Int13h_UnsupportedFunction ; 18h, 213 dw Int13h_UnsupportedFunction ; 16h, 214 dw Int13h_UnsupportedFunction ; 17h, 215 dw Int13h_UnsupportedFunction ; 18h, 217 216 dw Int13h_UnsupportedFunction ; 19h, Park Heads (PS/2) 218 217 dw Int13h_UnsupportedFunction ; 1Ah, Format ESDI Drive (PS/2) 219 218 dw Int13h_UnsupportedFunction ; 1Bh, Get ESDI Manufacturing Header (PS/2) 220 219 dw Int13h_UnsupportedFunction ; 1Ch, ESDI Special Functions (PS/2) 221 dw Int13h_UnsupportedFunction ; 1Dh, 222 dw Int13h_UnsupportedFunction ; 1Eh, 223 dw Int13h_UnsupportedFunction ; 1Fh, 224 dw Int13h_UnsupportedFunction ; 20h, 220 dw Int13h_UnsupportedFunction ; 1Dh, 221 dw Int13h_UnsupportedFunction ; 1Eh, 222 dw Int13h_UnsupportedFunction ; 1Fh, 223 dw Int13h_UnsupportedFunction ; 20h, 225 224 dw Int13h_UnsupportedFunction ; 21h, Read Disk Sectors, Multiple Blocks (PS/1) 226 225 dw Int13h_UnsupportedFunction ; 22h, Write Disk Sectors, Multiple Blocks (PS/1) … … 228 227 dw AH24h_HandlerForSetMultipleBlocks ; 24h, Set Multiple Blocks (PS/1) 229 228 dw AH25h_HandlerForGetDriveInformation ; 25h, Get Drive Information (PS/1) 230 ; dw Int13h_UnsupportedFunction ; 26h, 231 ; dw Int13h_UnsupportedFunction ; 27h, 232 ; dw Int13h_UnsupportedFunction ; 28h, 233 ; dw Int13h_UnsupportedFunction ; 29h, 234 ; dw Int13h_UnsupportedFunction ; 2Ah, 235 ; dw Int13h_UnsupportedFunction ; 2Bh, 236 ; dw Int13h_UnsupportedFunction ; 2Ch, 237 ; dw Int13h_UnsupportedFunction ; 2Dh, 238 ; dw Int13h_UnsupportedFunction ; 2Eh, 239 ; dw Int13h_UnsupportedFunction ; 2Fh, 240 ; dw Int13h_UnsupportedFunction ; 30h, 241 ; dw Int13h_UnsupportedFunction ; 31h, 242 ; dw Int13h_UnsupportedFunction ; 32h, 243 ; dw Int13h_UnsupportedFunction ; 33h, 244 ; dw Int13h_UnsupportedFunction ; 34h, 245 ; dw Int13h_UnsupportedFunction ; 35h, 246 ; dw Int13h_UnsupportedFunction ; 36h, 247 ; dw Int13h_UnsupportedFunction ; 37h, 248 ; dw Int13h_UnsupportedFunction ; 38h, 249 ; dw Int13h_UnsupportedFunction ; 39h, 250 ; dw Int13h_UnsupportedFunction ; 3Ah, 251 ; dw Int13h_UnsupportedFunction ; 3Bh, 252 ; dw Int13h_UnsupportedFunction ; 3Ch, 253 ; dw Int13h_UnsupportedFunction ; 3Dh, 254 ; dw Int13h_UnsupportedFunction ; 3Eh, 255 ; dw Int13h_UnsupportedFunction ; 3Fh, 256 ; dw Int13h_UnsupportedFunction ; 40h, 229 ; dw Int13h_UnsupportedFunction ; 26h, 230 ; dw Int13h_UnsupportedFunction ; 27h, 231 ; dw Int13h_UnsupportedFunction ; 28h, 232 ; dw Int13h_UnsupportedFunction ; 29h, 233 ; dw Int13h_UnsupportedFunction ; 2Ah, 234 ; dw Int13h_UnsupportedFunction ; 2Bh, 235 ; dw Int13h_UnsupportedFunction ; 2Ch, 236 ; dw Int13h_UnsupportedFunction ; 2Dh, 237 ; dw Int13h_UnsupportedFunction ; 2Eh, 238 ; dw Int13h_UnsupportedFunction ; 2Fh, 239 ; dw Int13h_UnsupportedFunction ; 30h, 240 ; dw Int13h_UnsupportedFunction ; 31h, 241 ; dw Int13h_UnsupportedFunction ; 32h, 242 ; dw Int13h_UnsupportedFunction ; 33h, 243 ; dw Int13h_UnsupportedFunction ; 34h, 244 ; dw Int13h_UnsupportedFunction ; 35h, 245 ; dw Int13h_UnsupportedFunction ; 36h, 246 ; dw Int13h_UnsupportedFunction ; 37h, 247 ; dw Int13h_UnsupportedFunction ; 38h, 248 ; dw Int13h_UnsupportedFunction ; 39h, 249 ; dw Int13h_UnsupportedFunction ; 3Ah, 250 ; dw Int13h_UnsupportedFunction ; 3Bh, 251 ; dw Int13h_UnsupportedFunction ; 3Ch, 252 ; dw Int13h_UnsupportedFunction ; 3Dh, 253 ; dw Int13h_UnsupportedFunction ; 3Eh, 254 ; dw Int13h_UnsupportedFunction ; 3Fh, 255 ; dw Int13h_UnsupportedFunction ; 40h, 257 256 ; dw Int13h_UnsupportedFunction ; 41h, Check if Extensions Present (EBIOS)* 258 257 ; dw Int13h_UnsupportedFunction ; 42h, Extended Read Sectors (EBIOS)* -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Address.asm
r158 r161 93 93 shl dx, cl ; DX = LCylinder << n 94 94 add ax, dx ; AX = P-CHS Cylinder number 95 mov cx, ax ; CopyP-CHS Cylinder number to CX95 xchg cx, ax ; Move P-CHS Cylinder number to CX 96 96 DoNotConvertLCHS: 97 97 ret -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
r158 r161 71 71 ALIGN JUMP_ALIGN 72 72 AccessDPT_GetLCHSfromPCHS: 73 xchg ax, cx74 mov cl, [di+DPT.bFlagsLow]75 and cl, MASKL_DPT_CHS_SHIFT_COUNT ; Load shift count73 mov al, [di+DPT.bFlagsLow] 74 and al, MASKL_DPT_CHS_SHIFT_COUNT ; Load shift count 75 xchg cx, ax 76 76 mov bx, [di+DPT.wPchsCylinders] ; Load P-CHS cylinders 77 77 shr bx, cl ; Shift to L-CHS cylinders 78 78 xchg cx, ax 79 eMOVZX dx, BYTE [di+DPT.bLchsHeads] ; Load L-CHS heads80 79 eMOVZX ax, BYTE [di+DPT.bPchsSectors] ; Load Sectors per track 80 cwd 81 mov dl, [di+DPT.bLchsHeads] ; Load L-CHS heads 81 82 ret 82 83 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm
r158 r161 39 39 FindDPT_ForDriveNumber: 40 40 push dx 41 push ax41 xchg di, ax ; Save the contents of AX in DI 42 42 43 43 mov al, LARGEST_DPT_SIZE … … 45 45 mul dl 46 46 add ax, BYTE RAMVARS_size 47 xchg di, ax48 47 49 pop ax48 xchg di, ax ; Restore AX and put result in DI 50 49 pop dx 51 50 ret … … 119 118 120 119 ;-------------------------------------------------------------------- 121 ; FindDPT_ToDSDIforInterruptInService122 ; Parameters:123 ; DS: RAMVARS segment124 ; Returns:125 ; DS:DI: Ptr to DPT126 ; CF: Set if wanted DPT found127 ; Cleared if DPT not found128 ; Corrupts registers:129 ; SI130 ;--------------------------------------------------------------------131 ALIGN JUMP_ALIGN132 FindDPT_ToDSDIforInterruptInService:133 mov si, IterateToDptWithInterruptInServiceFlagSet134 jmp SHORT IterateAllDPTs135 136 ;--------------------------------------------------------------------137 120 ; IterateToDptWithInterruptInServiceFlagSet 138 121 ; Parameters: … … 153 136 clc ; Clear CF since wrong DPT 154 137 ret 138 139 140 ;-------------------------------------------------------------------- 141 ; FindDPT_ToDSDIforInterruptInService 142 ; Parameters: 143 ; DS: RAMVARS segment 144 ; Returns: 145 ; DS:DI: Ptr to DPT 146 ; CF: Set if wanted DPT found 147 ; Cleared if DPT not found 148 ; Corrupts registers: 149 ; SI 150 ;-------------------------------------------------------------------- 151 ALIGN JUMP_ALIGN 152 FindDPT_ToDSDIforInterruptInService: 153 mov si, IterateToDptWithInterruptInServiceFlagSet 154 ; Fall to IterateAllDPTs 155 155 156 156
Note:
See TracChangeset
for help on using the changeset viewer.