Changeset 123 for trunk/bootcode/regular/driveio.asm
- Timestamp:
- Apr 8, 2017, 12:27:22 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/bootcode/regular/driveio.asm ¶
r120 r123 38 38 IFDEF AUX_DEBUG 39 39 IF 0 40 pushf 41 pusha 42 push si 43 mov si, offset $+5 44 jmp @F 45 db 10,'DriveIO_CheckFor13extensions:',10,0 46 @@: 47 call AuxIO_Print 48 pop si 40 DBG_TEXT_OUT_AUX 'DriveIO_CheckFor13extensions:' 41 PUSHRF 49 42 call DEBUG_DumpRegisters 50 43 ;~ call AuxIO_DumpParagraph 51 44 ;~ call AuxIO_TeletypeNL 52 53 45 mov si, offset [INT13X_DiskParams] 54 46 mov word ptr [si], 50h … … 57 49 call DEBUG_DumpRegisters 58 50 ;~ call AuxIO_DumpSector 59 60 61 popa 62 popf 51 POPRF 63 52 ENDIF 64 53 ENDIF … … 90 79 IFDEF AUX_DEBUG 91 80 IF 0 92 pushf 93 pusha 94 push si 95 mov si, offset $+5 96 jmp @F 97 db 10,'DriveIO_LoadConfiguration:',10,0 98 @@: 99 call AuxIO_Print 100 pop si 81 DBG_TEXT_OUT_AUX 'DriveIO_LoadConfiguration:' 82 PUSHRF 101 83 ;~ call DEBUG_DumpRegisters 102 84 ;~ call AuxIO_DumpParagraph 103 85 ;~ call AuxIO_TeletypeNL 104 popa105 popf106 107 ENDIF 108 86 POPRF 87 ENDIF 88 ENDIF 89 90 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 109 91 mov ax, cs 110 92 mov es, ax … … 117 99 jnc DIOLC_NoError 118 100 call MBR_LoadError ; Will Abort BootUp 101 102 119 103 DIOLC_NoError: 120 104 ret … … 125 109 IFDEF AUX_DEBUG 126 110 IF 0 127 pushf 128 pusha 129 push si 130 mov si, offset $+5 131 jmp @F 132 db 10,'DriveIO_SaveConfiguration:',10,0 133 @@: 134 call AuxIO_Print 135 pop si 111 DBG_TEXT_OUT_AUX 'DriveIO_SaveConfiguration:' 112 PUSHRF 136 113 ;~ call DEBUG_DumpRegisters 137 114 ;~ call AuxIO_DumpParagraph 138 115 ;~ call AuxIO_TeletypeNL 139 popa 140 popf 116 POPRF 141 117 ENDIF 142 118 ENDIF … … 187 163 mov al, (MBR_BackUpMBR - Configuration) / 200h 188 164 mov ah,03h 189 165 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 190 166 int 13h 191 167 jnc DIOSC_NoError … … 275 251 jc DIOILUT_Error 276 252 and cl, 111111b ; Isolate lower 6 bits of CL -> sector count 277 253 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 278 254 ;movzx ax, cl 279 255 mov al,cl … … 310 286 IFDEF AUX_DEBUG 311 287 IF 0 312 pusha 313 push si 314 mov si, offset $+5 315 jmp @F 316 db 10,'DriveIO_LVMAdjustToInfoSector:',10,0 317 @@: 318 call AuxIO_Print 319 pop si 288 DBG_TEXT_OUT_AUX 'DriveIO_LVMAdjustToInfoSector:' 289 PUSHRF 320 290 call DEBUG_DumpRegisters 321 291 ;~ call AuxIO_DumpParagraph 322 292 ;~ call AuxIO_TeletypeNL 323 popa293 POPRF 324 294 ENDIF 325 295 ENDIF … … 347 317 IFDEF AUX_DEBUG 348 318 IF 0 349 pusha 350 push si 351 mov si, offset $+5 352 jmp @F 353 db 10,'adjusted',10,0 354 @@: 355 call AuxIO_Print 356 pop si 319 DBG_TEXT_OUT_AUX 'adjusted' 320 PUSHRF 357 321 call DEBUG_DumpRegisters 358 322 ;~ call AuxIO_DumpParagraph 359 323 ;~ call AuxIO_TeletypeNL 360 popa324 POPRF 361 325 ENDIF 362 326 ENDIF … … 383 347 IFDEF AUX_DEBUG 384 348 IF 0 385 pushf 386 pusha 387 push si 388 mov si, offset $+5 389 jmp @F 390 db 10,'DriveIO_LoadPartition:',10,0 391 @@: 392 call AuxIO_Print 393 pop si 349 DBG_TEXT_OUT_AUX 'DriveIO_LoadPartition:' 350 PUSHRF 394 351 call DEBUG_DumpRegisters 395 352 ;~ call AuxIO_DumpParagraph 396 353 ;~ call AuxIO_TeletypeNL 397 popa 398 popf 354 POPRF 399 355 ENDIF 400 356 ENDIF … … 405 361 mov wptr cs:[CurPartition_Location+6], cx ; Saves the location 406 362 mov si, offset PartitionSector ; DS:SI - ExecBase 363 364 365 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 407 366 call DriveIO_LoadSector 367 408 368 clc 409 369 cmp wptr [si+LocBR_Magic], 0AA55h … … 436 396 IFDEF AUX_DEBUG 437 397 IF 0 438 pushf 439 pusha 440 push si 441 mov si, offset $+5 442 jmp @F 443 db 10,'DriveIO_SavePartition:',10,0 444 @@: 445 call AuxIO_Print 446 pop si 398 DBG_TEXT_OUT_AUX 'DriveIO_SavePartition:' 399 PUSHRF 447 400 ;~ call DEBUG_DumpRegisters 448 401 ;~ call AuxIO_DumpParagraph 449 402 ;~ call AuxIO_TeletypeNL 450 popa 451 popf 403 POPRF 452 404 ENDIF 453 405 ENDIF … … 486 438 IFDEF AUX_DEBUG 487 439 IF 0 488 pushf 489 pusha 490 push si 491 mov si, offset $+5 492 jmp @F 493 db 10,'DriveIO_LoadLVMSector:',10,0 494 @@: 495 call AuxIO_Print 496 pop si 440 DBG_TEXT_OUT_AUX 'DriveIO_LoadLVMSector:' 441 PUSHRF 497 442 call DEBUG_DumpRegisters 498 443 call AuxIO_DumpSector 499 444 ;~ call AuxIO_DumpParagraph 500 445 ;~ call AuxIO_TeletypeNL 501 popa 502 popf 446 POPRF 503 447 ENDIF 504 448 ENDIF … … 518 462 IFDEF AUX_DEBUG 519 463 IF 0 520 pushf 521 pusha 522 push si 523 mov si, offset $+5 524 jmp @F 525 db 10,'lvm record ex',10,0 526 @@: 527 call AuxIO_Print 528 pop si 464 DBG_TEXT_OUT_AUX 'lvm record ex' 465 PUSHRF 529 466 ;~ call AuxIO_TeletypeHexWord 530 467 ;~ call AuxIO_TeletypeNL 531 468 call DEBUG_DumpRegisters 532 469 ;~ call AuxIO_DumpSector 533 ;~ mov cx, 7 534 mov cx, 32 470 mov cx, 7 535 471 @@: 536 472 call AuxIO_DumpParagraph … … 538 474 add si, 16 539 475 loop @B 540 popa 541 popf 476 POPRF 542 477 ENDIF 543 478 ENDIF … … 549 484 jnc DIOLLVMS_NoLVMSector 550 485 ret 486 551 487 ; This here is called, if an invalid (or no) LVM information sector is found 552 488 ; It will truncate the first byte of the sector, so all other routines … … 564 500 IFDEF AUX_DEBUG 565 501 IF 0 566 pushf 567 pusha 568 push si 569 mov si, offset $+5 570 jmp @F 571 db 10,'DriveIO_SaveLVMSector:',10,0 572 @@: 573 call AuxIO_Print 574 pop si 502 DBG_TEXT_OUT_AUX 'DriveIO_SaveLVMSector:' 503 PUSHRF 575 504 ;~ call DEBUG_DumpRegisters 576 505 ;~ call AuxIO_DumpParagraph 577 506 ;~ call AuxIO_TeletypeNL 578 popa 579 popf 507 POPRF 580 508 ENDIF 581 509 ENDIF … … 669 597 IFDEF AUX_DEBUG 670 598 IF 0 671 pushf 672 pusha 673 push si 674 mov si, offset $+5 675 jmp @F 676 db 10,'DriveIO_LoadSector:',10,0 677 @@: 678 call AuxIO_Print 679 pop si 599 DBG_TEXT_OUT_AUX 'DriveIO_LoadSector:' 600 PUSHRF 680 601 call DEBUG_DumpRegisters 681 602 ;~ call AuxIO_DumpParagraph 682 603 ;~ call AuxIO_TeletypeNL 683 popa 684 popf 604 POPRF 685 605 ENDIF 686 606 ENDIF … … 709 629 IFDEF AUX_DEBUG 710 630 IF 0 711 pusha 712 push si 713 mov si, offset $+5 714 jmp @F 715 db 10,'DriveIO_ReadSectorCHS:',10,0 716 @@: 717 call AuxIO_Print 718 pop si 631 DBG_TEXT_OUT_AUX 'DriveIO_ReadSectorCHS:' 632 PUSHRF 719 633 call DEBUG_DumpRegisters 720 634 call AuxIO_DumpParagraph 721 635 call AuxIO_TeletypeNL 722 popa636 POPRF 723 637 ENDIF 724 638 ENDIF … … 766 680 IFDEF AUX_DEBUG 767 681 IF 0 768 pusha 769 push si 770 mov si, offset $+5 771 jmp @F 772 db 10,'sector loaded',10,0 773 @@: 774 call AuxIO_Print 775 pop si 682 DBG_TEXT_OUT_AUX 'sector loaded' 683 PUSHRF 776 684 ;~ call DEBUG_DumpRegisters 777 call AuxIO_DumpSector 778 ;~ call AuxIO_DumpParagraph 779 ;~ call AuxIO_TeletypeNL 780 popa 685 ;~ call AuxIO_DumpSector 686 mov cx, 32 687 @@: 688 call AuxIO_DumpParagraph 689 call AuxIO_TeletypeNL 690 add si, 16 691 loop @B 692 POPRF 781 693 ENDIF 782 694 ENDIF … … 800 712 IFDEF AUX_DEBUG 801 713 IF 0 802 pushf 803 pusha 804 push si 805 mov si, offset $+5 806 jmp @F 807 db 10,'DriveIO_ReadSectorLBA:',10,0 808 @@: 809 call AuxIO_Print 810 pop si 714 DBG_TEXT_OUT_AUX 'DriveIO_ReadSectorLBA:' 715 PUSHRF 811 716 call DEBUG_DumpRegisters 812 717 call AuxIO_DumpParagraph 813 718 call AuxIO_TeletypeNL 814 popa 815 popf 719 POPRF 816 720 ENDIF 817 721 ENDIF … … 879 783 IFDEF AUX_DEBUG 880 784 IF 0 881 pusha 882 push si 883 mov si, offset $+5 884 jmp @F 885 db 10,'DriveIO_WriteSectorLBA:',10,0 886 @@: 887 call AuxIO_Print 888 pop si 785 DBG_TEXT_OUT_AUX 'DriveIO_WriteSectorLBA:' 786 PUSHRF 889 787 call DEBUG_DumpRegisters 890 788 call AuxIO_DumpParagraph 891 789 call AuxIO_TeletypeNL 892 popa790 POPRF 893 791 ENDIF 894 792 ENDIF … … 991 889 IFDEF AUX_DEBUG 992 890 IF 1 993 pushf 994 pusha 995 push si 996 mov si, offset $+5 997 jmp @F 998 db 10,'DriveIO_LocateMasterLVMSector:',10,0 999 @@: 1000 call AuxIO_Print 1001 pop si 891 DBG_TEXT_OUT_AUX 'DriveIO_LocateMasterLVMSector:' 892 PUSHRF 1002 893 call DEBUG_DumpRegisters 1003 894 ;~ call AuxIO_DumpSector 1004 895 ;~ call AuxIO_DumpParagraph 1005 896 ;~ call AuxIO_TeletypeNL 1006 popa 1007 popf 897 POPRF 1008 898 ENDIF 1009 899 ENDIF … … 1037 927 mov si, offset [TmpSector] ; Offset of temp buffer 1038 928 call DriveIO_ReadSectorLBA ; Read the sector 1039 lahf 929 lahf ; Save CF 1040 930 dec cx ; Prepare LBA of next sector to read 1041 931 sahf ; Restore CF … … 1234 1124 IFDEF AUX_DEBUG 1235 1125 IF 0 1236 pushf 1237 pusha 1238 push si 1239 mov si, offset $+5 1240 jmp @F 1241 db 10,'DriveIO_SaveSector:',10,0 1242 @@: 1243 call AuxIO_Print 1244 pop si 1126 DBG_TEXT_OUT_AUX 'DriveIO_SaveSector:' 1127 PUSHRF 1245 1128 ;~ call DEBUG_DumpRegisters 1246 1129 ;~ call AuxIO_DumpParagraph 1247 1130 ;~ call AuxIO_TeletypeNL 1248 popa 1249 popf 1131 POPRF 1250 1132 ENDIF 1251 1133 ENDIF … … 1350 1232 IFDEF AUX_DEBUG 1351 1233 IF 0 1352 pusha 1353 push si 1354 mov si, offset $+5 1355 jmp @F 1356 db 10,'DriveIO_WriteSectorCHS:',10,0 1357 @@: 1358 call AuxIO_Print 1359 pop si 1234 DBG_TEXT_OUT_AUX 'DriveIO_WriteSectorCHS:' 1235 PUSHRF 1360 1236 call DEBUG_DumpRegisters 1361 1237 call AuxIO_DumpParagraph 1362 1238 call AuxIO_TeletypeNL 1363 popa1239 POPRF 1364 1240 ENDIF 1365 1241 ENDIF … … 1429 1305 IFDEF AUX_DEBUG 1430 1306 IF 0 1431 pushf 1432 pusha 1433 push si 1434 mov si, offset $+5 1435 jmp @F 1436 db 10,'DriveIO_LoadMasterLVMSector:',10,0 1437 @@: 1438 call AuxIO_Print 1439 pop si 1307 DBG_TEXT_OUT_AUX 'DriveIO_LoadMasterLVMSector:' 1308 PUSHRF 1440 1309 ;~ call DEBUG_DumpRegisters 1441 1310 ;~ call AuxIO_DumpParagraph 1442 1311 ;~ call AuxIO_TeletypeNL 1443 popa 1444 popf 1312 POPRF 1445 1313 ENDIF 1446 1314 ENDIF … … 1479 1347 IFDEF AUX_DEBUG 1480 1348 IF 0 1481 pushf 1482 pusha 1483 push si 1484 mov si, offset $+5 1485 jmp @F 1486 db 10,'geo',10,0 1487 @@: 1488 call AuxIO_Print 1489 pop si 1349 DBG_TEXT_OUT_AUX 'geo' 1350 PUSHRF 1490 1351 call DEBUG_DumpRegisters 1491 1352 call AuxIO_DumpParagraph 1492 1353 call AuxIO_TeletypeNL 1493 popa 1494 popf 1354 POPRF 1495 1355 ENDIF 1496 1356 ENDIF … … 1503 1363 mov ah, 42h 1504 1364 int 13h ; do the i/o, CF=1->error, CF=0->success 1505 1365 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1506 1366 IFDEF AUX_DEBUG 1507 1367 IF 0 … … 1543 1403 IFDEF AUX_DEBUG 1544 1404 IF 0 1545 pushf 1546 pusha 1547 push si 1548 mov si, offset $+5 1549 jmp @F 1550 db 10,'lvm record',10,0 1551 @@: 1552 call AuxIO_Print 1553 pop si 1405 DBG_TEXT_OUT_AUX 'lvm record' 1406 PUSHRF 1554 1407 call DEBUG_DumpRegisters 1555 1408 ;~ call AuxIO_DumpSector … … 1560 1413 add si, 16 1561 1414 loop @B 1562 popa 1563 popf 1415 POPRF 1564 1416 ENDIF 1565 1417 ENDIF … … 1685 1537 IFDEF AUX_DEBUG 1686 1538 IF 0 1687 pushf 1688 pusha 1689 push si 1690 mov si, offset $+5 1691 jmp @F 1692 db 10,'DriveIO_GatherDiskInfo:',10,0 1693 @@: 1694 call AuxIO_Print 1695 pop si 1539 DBG_TEXT_OUT_AUX 'DriveIO_GatherDiskInfo:' 1540 PUSHRF 1696 1541 call DEBUG_DumpRegisters 1697 1542 ;~ call AuxIO_DumpParagraph 1698 1543 ;~ call AuxIO_TeletypeNL 1699 popa 1700 popf 1544 POPRF 1701 1545 ENDIF 1702 1546 ENDIF … … 1891 1735 secs_per_track_table db 63,127,255,255,255,255 1892 1736 1893 db_lmlvm db 'Load Master LVM -- disk: ',01737 ;~ db_lmlvm db 'Load Master LVM -- disk: ',0
Note:
See TracChangeset
for help on using the changeset viewer.