Changeset 117


Ignore:
Timestamp:
Apr 8, 2017, 12:27:15 AM (8 years ago)
Author:
Ben Rietbroek
Message:

Added more debug hooks [v1.1.1-testing]

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

Location:
trunk/bootcode
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/airboot.asm

    r112 r117  
    959959
    960960
    961         ; Verify we still got the BIOS disk in DL
    962         IFDEF   AUX_DEBUG
    963                 IF 1
    964                 pusha
    965                     push    si
    966                     mov     si, offset $+5
    967                     jmp     @F
    968                     db      10,'## AiR_BOOT_Start ##',10,0
    969                     @@:
    970                     call    AuxIO_Print
    971                     pop     si
    972                     call    DEBUG_DumpRegisters
    973                 popa
    974                 ENDIF
     961; Verify we still got the BIOS disk in DL
     962IFDEF   AUX_DEBUG
     963        IF 1
     964        pushf
     965        pusha
     966            push    si
     967            mov     si, offset $+5
     968            jmp     @F
     969            db      10,'## AiR_BOOT_Start ##',10,0
     970            @@:
     971            call    AuxIO_Print
     972            pop     si
     973            call    DEBUG_DumpRegisters
     974        popa
     975        popf
    975976        ENDIF
     977ENDIF
     978
    976979
    977980; -----------------------------------------------------------------------------
     
    10191022                ; Number of harddisks and other system-info is now known.
    10201023
    1021             ;!
    1022             ;! DEBUG_BLOCK
    1023             ;! Let's see what the BIOS supplied us with...
    1024             ;! Uncomment below to activate.
    1025             ;!
    1026             ;~ __DUMP_BIOS_REGS__  EQU
    1027             IFDEF   AUX_DEBUG
    1028                 IFDEF   __DUMP_BIOS_REGS__
    1029                     pushf
    1030                     pusha
    1031                     ; Print title.
    1032                     mov     si,offset [bios_reg]
    1033                     call    AuxIO_Print
    1034                     ; Save the current stack (SS:SP).
    1035                     mov     ax,ss
    1036                     mov     [CurrentSS],ax
    1037                     mov     [CurrentSP],sp
    1038 
    1039                     ; Restore the old stack.
    1040                     mov     ss,[OldSS]
    1041                     mov     sp,[OldSP]
    1042 
    1043                     ; Pop the registers with the BIOS values.
    1044                     popa
    1045                     ; Push them back for AiR-BOOT restart (debug mode).
    1046                     pusha
    1047                     ; Dump them to the serial-port.
    1048                     call    DEBUG_DumpRegisters
    1049                     ; Restore the current stack.
    1050                     mov     ax,[CurrentSS]
    1051                     mov     ss,ax
    1052                     mov     sp,[CurrentSP]
    1053 
    1054                     ; Restore registers.
    1055                     popa
    1056                     popf
    1057                 ENDIF
    1058             ENDIF
    1059 
    1060 
    1061             ;!
    1062             ;! DEBUG_BLOCK
    1063             ;! Dump the registers at this point.
    1064             ;! Uncomment below to activate.
    1065             ;!
    1066             IFDEF   AUX_DEBUG
    1067                 ;~ call    DEBUG_DumpRegisters
    1068                 ; Dump drive-letters of dl-feature before partitions are
    1069                 ; scanned and processed.
    1070                 ;~ call    DEBUG_DumpDriveLetters
    1071                 ;~ call    DEBUG_DumpVolumeLetters
    1072                 ;~ call    DEBUG_DumpPartitionXref
    1073             ENDIF
     1024;!
     1025;! DEBUG_BLOCK
     1026;! Let's see what the BIOS supplied us with...
     1027;! Uncomment below to activate.
     1028;!
     1029IFDEF   AUX_DEBUG
     1030        IF 0
     1031        pushf
     1032        pusha
     1033
     1034            ; Print title.
     1035            mov     si,offset [bios_reg]
     1036            call    AuxIO_Print
     1037            ; Save the current stack (SS:SP).
     1038            mov     ax,ss
     1039            mov     [CurrentSS],ax
     1040            mov     [CurrentSP],sp
     1041
     1042            ; Restore the old stack.
     1043            mov     ss,[OldSS]
     1044            mov     sp,[OldSP]
     1045
     1046            ; Pop the registers with the BIOS values.
     1047            popa
     1048            ; Push them back for AiR-BOOT restart (debug mode).
     1049            pusha
     1050            ; Dump them to the serial-port.
     1051            call    DEBUG_DumpRegisters
     1052            ; Restore the current stack.
     1053            mov     ax,[CurrentSS]
     1054            mov     ss,ax
     1055            mov     sp,[CurrentSP]
     1056
     1057        popa
     1058        popf
     1059        ENDIF
     1060ENDIF
     1061
     1062
     1063;!
     1064;! DEBUG_BLOCK
     1065;! Dump the registers at this point.
     1066;!
     1067IFDEF   AUX_DEBUG
     1068        IF 0
     1069        pushf
     1070        pusha
     1071            ;~ call    DEBUG_DumpRegisters
     1072            ;~ call    DEBUG_DumpDriveLetters
     1073            ;~ call    DEBUG_DumpVolumeLetters
     1074            ;~ call    DEBUG_DumpPartitionXref
     1075        popa
     1076        popf
     1077        ENDIF
     1078ENDIF
    10741079
    10751080; -----------------------------------------------------------------------------
     
    10881093                ; Internal Partition Table is now populated.
    10891094
    1090             ;!
    1091             ;! DEBUG_BLOCK
    1092             ;! Dump various tables.
    1093             ;! Uncomment below to activate.
    1094             ;!
    1095             IFDEF   AUX_DEBUG
    1096                 ;~ call    DEBUG_DumpIPT
    1097                 ;~ call    DEBUG_DumpPartitionPointers
    1098                 ;~ call    DEBUG_DumpNewPartTable
    1099                 ;~ call    DEBUG_DumpDriveLetters
    1100                 ;~ call    DEBUG_DumpDriveLetters
    1101                 ;~ call    DEBUG_DumpVolumeLetters
    1102                 ;~ call    DEBUG_DumpPartitionXref
    1103             ENDIF
     1095;!
     1096;! DEBUG_BLOCK
     1097;! Dump various tables.
     1098;! Uncomment below to activate.
     1099;!
     1100IFDEF   AUX_DEBUG
     1101        IF 0
     1102        pushf
     1103        pusha
     1104            ;~ call    DEBUG_DumpIPT
     1105            ;~ call    DEBUG_DumpPartitionPointers
     1106            ;~ call    DEBUG_DumpNewPartTable
     1107            ;~ call    DEBUG_DumpDriveLetters
     1108            ;~ call    DEBUG_DumpDriveLetters
     1109            ;~ call    DEBUG_DumpVolumeLetters
     1110            ;~ call    DEBUG_DumpPartitionXref
     1111        popa
     1112        popf
     1113        ENDIF
     1114ENDIF
    11041115
    11051116
     
    11181129
    11191130
    1120             ;!
    1121             ;! DEBUG_BLOCK
    1122             ;! Dump various tables.
    1123             ;! Uncomment below to activate.
    1124             ;!
    1125             IFDEF   AUX_DEBUG
    1126                 ;~ call    DEBUG_DumpIPT
    1127                 ;~ call    DEBUG_DumpPartitionPointers
    1128                 ;~ call    DEBUG_DumpNewPartTable
    1129                 ;~ call    DEBUG_DumpDriveLetters
    1130                 ;~ call    DEBUG_DumpDriveLetters
    1131                 ;~ call    DEBUG_DumpVolumeLetters
    1132                 ;~ call    DEBUG_DumpPartitionXref
    1133             ENDIF
     1131;!
     1132;! DEBUG_BLOCK
     1133;! Dump various tables.
     1134;!
     1135IFDEF   AUX_DEBUG
     1136        IF 0
     1137        pushf
     1138        pusha
     1139            ;~ call    DEBUG_DumpIPT
     1140            ;~ call    DEBUG_DumpPartitionPointers
     1141            ;~ call    DEBUG_DumpNewPartTable
     1142            ;~ call    DEBUG_DumpDriveLetters
     1143            ;~ call    DEBUG_DumpDriveLetters
     1144            ;~ call    DEBUG_DumpVolumeLetters
     1145            ;~ call    DEBUG_DumpPartitionXref
     1146        popa
     1147        popf
     1148        ENDIF
     1149ENDIF
    11341150
    11351151
     
    12001216
    12011217
    1202             ;!
    1203             ;! DEBUG_BLOCK
    1204             ;! Dump various tables.
    1205             ;! Uncomment below to activate.
    1206             ;!
    1207             IFDEF   AUX_DEBUG
    1208                 ;~ call    DEBUG_DumpIPT
    1209                 ;~ call    DEBUG_DumpPartitionPointers
    1210                 ;~ call    DEBUG_DumpPartitionXref
    1211                 ;~ call    DEBUG_DumpNewPartTable
    1212                 ;~ call    DEBUG_DumpDriveLetters
    1213             ENDIF
     1218;!
     1219;! DEBUG_BLOCK
     1220;! Dump various tables.
     1221;!
     1222IFDEF   AUX_DEBUG
     1223        IF 0
     1224        pushf
     1225        pusha
     1226            ;~ call    DEBUG_DumpIPT
     1227            ;~ call    DEBUG_DumpPartitionPointers
     1228            ;~ call    DEBUG_DumpPartitionXref
     1229            ;~ call    DEBUG_DumpNewPartTable
     1230            ;~ call    DEBUG_DumpDriveLetters
     1231        popa
     1232        popf
     1233        ENDIF
     1234ENDIF
    12141235
    12151236
     
    12241245
    12251246
    1226             ;!
    1227             ;! DEBUG_BLOCK
    1228             ;! Dump various tables.
    1229             ;! Uncomment below to activate.
    1230             ;!
    1231             IFDEF   AUX_DEBUG
    1232                 ;~ call    DEBUG_DumpIPT
    1233                 ;~ call    DEBUG_DumpPartitionPointers
    1234                 ;~ call    DEBUG_DumpPartitionXref
    1235                 ;~ call    DEBUG_DumpNewPartTable
    1236                 ;~ call    DEBUG_DumpDriveLetters
    1237             ENDIF
     1247;!
     1248;! DEBUG_BLOCK
     1249;! Dump various tables.
     1250;!
     1251IFDEF   AUX_DEBUG
     1252        IF 0
     1253        pushf
     1254        pusha
     1255            ;~ call    DEBUG_DumpIPT
     1256            ;~ call    DEBUG_DumpPartitionPointers
     1257            ;~ call    DEBUG_DumpPartitionXref
     1258            ;~ call    DEBUG_DumpNewPartTable
     1259            ;~ call    DEBUG_DumpDriveLetters
     1260        popa
     1261        popf
     1262        ENDIF
     1263ENDIF
    12381264
    12391265                ; Setup automatic boot to forgo the Menu.
     
    14321458    MBR_Main_StartPartition:
    14331459
    1434             IFDEF   AUX_DEBUG
    1435                 ;~ call    DEBUG_DumpIPT
    1436                 ;~ call    DEBUG_DumpPartitionPointers
    1437                 ;~ call    DEBUG_DumpPartitionXref
    1438                 ;~ call    DEBUG_DumpNewPartTable
    1439             ENDIF
     1460IFDEF   AUX_DEBUG
     1461        IF 0
     1462        pushf
     1463        pusha
     1464            ;~ call    DEBUG_DumpIPT
     1465            ;~ call    DEBUG_DumpPartitionPointers
     1466            ;~ call    DEBUG_DumpPartitionXref
     1467            ;~ call    DEBUG_DumpNewPartTable
     1468        popa
     1469        popf
     1470        ENDIF
     1471ENDIF
    14401472
    14411473
  • trunk/bootcode/regular/bootmenu.asm

    r102 r117  
    691691        mov     ah, [si+LocIPT_SystemID]
    692692
    693     IFDEF   AUX_DEBUG
    694         mov     al, ' '
    695         call    VideoIO_PrintSingleChar
    696         mov     al, ah
    697         call    VideoIO_PrintHexByte
    698         mov     al, ' '
    699         call    VideoIO_PrintSingleChar
    700     ENDIF
     693IFDEF   AUX_DEBUG
     694        IF 1
     695        pushf
     696        pusha
     697            mov     al, ' '
     698            call    VideoIO_PrintSingleChar
     699            mov     al, ah
     700            call    VideoIO_PrintHexByte
     701            mov     al, ' '
     702            call    VideoIO_PrintSingleChar
     703        popa
     704        popf
     705        ENDIF
     706ENDIF
    701707
    702708        mov     al, ah
     
    723729        mov     al, [si+25h]
    724730
    725     IFDEF   AUX_DEBUG
    726         call    VideoIO_PrintHexByte
    727     ENDIF
     731IFDEF   AUX_DEBUG
     732        IF 1
     733        pushf
     734        pusha
     735            call    VideoIO_PrintHexByte
     736        popa
     737        popf
     738        ENDIF
     739ENDIF
    728740
    729741        mov     dh,al
  • trunk/bootcode/regular/driveio.asm

    r116 r117  
    3535        mov     dl, [BIOS_BootDisk]     ; We check using the boot-disk
    3636        int     13h
     37
     38IFDEF   AUX_DEBUG
     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
     49            call    DEBUG_DumpRegisters
     50            ;~ call    AuxIO_DumpParagraph
     51            ;~ call    AuxIO_TeletypeNL
     52
     53            mov     si, offset [INT13X_DiskParams]
     54            mov     word ptr [si], 50h
     55            mov     ah, 48h
     56            int     13h
     57            call    DEBUG_DumpRegisters
     58            ;~ call    AuxIO_DumpSector
     59
     60
     61        popa
     62        popf
     63        ENDIF
     64ENDIF
     65
    3766        jc      PCCF13E_NotFound        ; Error occured
    3867        cmp     bx, 0AA55h
     
    351380; #########################################################################
    352381DriveIO_LoadPartition   Proc Near  Uses si
     382
     383IFDEF   AUX_DEBUG
     384        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
     394            call    DEBUG_DumpRegisters
     395            ;~ call    AuxIO_DumpParagraph
     396            ;~ call    AuxIO_TeletypeNL
     397        popa
     398        popf
     399        ENDIF
     400ENDIF
     401
    353402        mov     wptr cs:[CurPartition_Location+0], ax
    354403        mov     wptr cs:[CurPartition_Location+2], bx
     
    369418    DIOLP_Success:
    370419
    371     IFDEF   AUX_DEBUG
    372         ; show current partition location
    373         ;~ pushf
    374         ;~ pusha
    375         ;~ call     AuxIO_TeletypeNL
    376         ;~ mov      si,offset db_curpartloc
    377         ;~ call     AuxIO_Print
    378         ;~ mov      dx,word ptr [CurPartition_Location+02]
    379         ;~ mov      ax,word ptr [CurPartition_Location+00]
    380         ;~ call     AuxIO_TeletypeHexDWord
    381         ;~ call     AuxIO_TeletypeNL
    382         ;~ mov      si,offset PartitionSector
    383         ;~ call     AuxIO_DumpSector
    384         ;~ call     AuxIO_TeletypeNL
    385         ;~ popa
    386         ;~ popf
    387     ENDIF
     420
    388421
    389422        ret
     
    462495            call    AuxIO_Print
    463496            pop     si
    464             ;~ call    DEBUG_DumpRegisters
     497            call    DEBUG_DumpRegisters
     498            call    AuxIO_DumpSector
    465499            ;~ call    AuxIO_DumpParagraph
    466500            ;~ call    AuxIO_TeletypeNL
     
    479513        call    DriveIO_LVMAdjustToInfoSector
    480514
    481         mov     si, offset LVMSector
     515        mov     si, offset [LVMSector]
    482516        call    DriveIO_LoadSector
    483517
    484     IFDEF   AUX_DEBUG
    485         ; show current partition location
    486         ;~ pushf
    487         ;~ pusha
    488         ;~ call    AuxIO_TeletypeNL
    489         ;~ mov     si,offset db_curlvmsec
    490         ;~ call    AuxIO_Print
    491         ;~ mov     dx,bx
    492         ;~ call    AuxIO_TeletypeHexDWord
    493         ;~ call    AuxIO_TeletypeNL
    494         ;~ mov     si,offset LVMSector
    495         ;~ call    AuxIO_DumpSector
    496         ;~ call    AuxIO_TeletypeNL
    497         ;~ popa
    498         ;~ popf
    499     ENDIF
     518IFDEF   AUX_DEBUG
     519        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
     529            ;~ call    AuxIO_TeletypeHexWord
     530            ;~ call    AuxIO_TeletypeNL
     531            call    DEBUG_DumpRegisters
     532            ;~ call    AuxIO_DumpSector
     533            ;~ mov     cx, 7
     534            mov     cx, 32
     535        @@:
     536            call    AuxIO_DumpParagraph
     537            call    AuxIO_TeletypeNL
     538            add     si, 16
     539            loop @B
     540        popa
     541        popf
     542        ENDIF
     543ENDIF
     544
    500545
    501546        call    LVM_CheckSectorSignature
     
    545590        jnc     DIOSLVMS_SevereError                  ; LVM Signature must be there
    546591
    547     IFDEF   AUX_DEBUG
    548 ;~ dioatlvm    db 'DriveIO_LVMAdjustToInfoSector',10,0
    549         ;~ pushf
    550         ;~ pusha
    551         ;~ mov     si,offset dioatlvm
    552         ;~ call    AuxIO_Print
    553         ;~ popa
    554         ;~ popf
    555         call    DEBUG_DumpRegisters
    556         call    DEBUG_DumpCHS
    557     ENDIF
     592IFDEF   AUX_DEBUG
     593        IF 0
     594        pushf
     595        pusha
     596            ;~ dioatlvm    db 'DriveIO_LVMAdjustToInfoSector',10,0
     597            ;~ pushf
     598            ;~ pusha
     599            ;~ mov     si,offset dioatlvm
     600            ;~ call    AuxIO_Print
     601            ;~ popa
     602            ;~ popf
     603            call    DEBUG_DumpRegisters
     604            call    DEBUG_DumpCHS
     605        popa
     606        popf
     607        ENDIF
     608ENDIF
    558609
    559610        call    DriveIO_LVMAdjustToInfoSector
    560611
    561     IFDEF   AUX_DEBUG
    562         call    DEBUG_DumpRegisters
    563         call    DEBUG_DumpCHS
    564     ENDIF
     612IFDEF   AUX_DEBUG
     613        IF 0
     614        pushf
     615        pusha
     616            call    DEBUG_DumpRegisters
     617            call    DEBUG_DumpCHS
     618        popa
     619        popf
     620        ENDIF
     621ENDIF
    565622
    566623        mov     si, offset LVMSector
     
    621678            call    AuxIO_Print
    622679            pop     si
    623             ;~ call    DEBUG_DumpRegisters
     680            call    DEBUG_DumpRegisters
    624681            ;~ call    AuxIO_DumpParagraph
    625682            ;~ call    AuxIO_TeletypeNL
     
    707764
    708765    DIOLS_Success:
     766
     767IFDEF   AUX_DEBUG
     768        IF 0
     769        pusha
     770            push    si
     771            mov     si, offset $+5
     772            jmp     @F
     773            db      10,'sector loaded',10,0
     774            @@:
     775            call    AuxIO_Print
     776            pop     si
     777            ;~ call    DEBUG_DumpRegisters
     778            call    AuxIO_DumpSector
     779            ;~ call    AuxIO_DumpParagraph
     780            ;~ call    AuxIO_TeletypeNL
     781        popa
     782        ENDIF
     783ENDIF
    709784        ret
    710785DriveIO_LoadSector      EndP
     
    714789;##############################################################################
    715790;# ACTION   : Reads a sector from disk using INT13 extensions
     791;# ----------------------------------------------------------------------------
     792;# EFFECTS  : Modifies DAP structure and fills transfer buffer
    716793;# ----------------------------------------------------------------------------
    717794;# IN       : BX:CX - LBA address of sector
     
    719796;# ----------------------------------------------------------------------------
    720797;# OUT      : CF=1  - failure, AH failure code
    721 ;# ----------------------------------------------------------------------------
    722 ;# EFFECTS  : Modifies DAP structure and fills transfer buffer
    723798;##############################################################################
    724799DriveIO_ReadSectorLBA       Proc Near  Uses bx cx dx si di ds es
     
    783858;##############################################################################
    784859;# ACTION   : Writes a sector to disk using INT13 extensions
     860;# ----------------------------------------------------------------------------
     861;# EFFECTS  : Modifies DAP structure and mofifies the disk
    785862;# ----------------------------------------------------------------------------
    786863;# IN       : AL    - write flags, AL.0 verify (1.0,2.0), AL.1 verify (2.1+)
     
    789866;# ----------------------------------------------------------------------------
    790867;# OUT      : CF=1  - failure, AH failure code
    791 ;# ----------------------------------------------------------------------------
    792 ;# EFFECTS  : Modifies DAP structure and mofifies the disk
    793868;##############################################################################
    794869DriveIO_WriteSectorLBA      Proc Near  Uses bx cx dx si di ds es
     
    11601235ENDIF
    11611236
    1162     ;!
    1163     ;! DEBUG_BLOCK
    1164     ;! Force write to LBA0 to test interception routine.
    1165     ;! Do *NOT* enable unless you are debugging, will overwrite MBR !
    1166     ;!
    1167     ;~ __DIO_FORCE_LBA0_WRITE__    EQU
    1168     IFDEF   AUX_DEBUG
    1169         IFDEF   __DIO_FORCE_LBA0_WRITE__
     1237
     1238;!
     1239;! DEBUG_BLOCK
     1240;! Force write to LBA0 to test interception routine.
     1241;! Do *NOT* enable unless you are debugging, will overwrite MBR !
     1242;!
     1243IFDEF   AUX_DEBUG
     1244    IF 0
     1245    pushf
     1246    pusha
    11701247        xor ax,ax
    11711248        xor bx,bx
     
    11731250        inc cx
    11741251        xor dh,dh
    1175         ENDIF
     1252    popa
     1253    popf
    11761254    ENDIF
     1255ENDIF
    11771256
    11781257        ;
     
    12101289
    12111290
    1212     IFDEF   AUX_DEBUG
    1213         pusha
    1214         mov     si, offset NonMBRwrite
     1291IFDEF   AUX_DEBUG
     1292    IF 0
     1293    pushf
     1294    pusha
     1295        mov     si, offset [NonMBRwrite]
    12151296        call    AuxIO_TeletypeNL
    12161297        call    AuxIO_Print
    12171298        call    AuxIO_TeletypeNL
    1218         popa
     1299    popa
     1300    popf
    12191301    ENDIF
     1302ENDIF
    12201303
    12211304        ; Show popup and halt the system.
     
    14421525        call    LVM_ValidateSector
    14431526
     1527
     1528
    14441529IFDEF   AUX_DEBUG
    14451530        IF 0
     
    14541539            pop     si
    14551540            call    DEBUG_DumpRegisters
     1541            ;~ call    AuxIO_DumpSector
     1542            mov     cx, 7
     1543        @@:
    14561544            call    AuxIO_DumpParagraph
    14571545            call    AuxIO_TeletypeNL
     1546            add     si, 16
     1547            loop @B
    14581548        popa
    14591549        popf
     
    15901680            call    AuxIO_Print
    15911681            pop     si
    1592             ;~ call    DEBUG_DumpRegisters
     1682            call    DEBUG_DumpRegisters
    15931683            ;~ call    AuxIO_DumpParagraph
    15941684            ;~ call    AuxIO_TeletypeNL
     
    16151705        ; so we clear the whole buffer to be sure.
    16161706        mov     cx, i13xbuf_size        ; Dynamically calculated by assembler.
    1617         mov     di, offset i13xbuf      ; Points to size field.
     1707        mov     di, offset [i13xbuf]    ; Points to size field.
    16181708        mov     [di],cx                 ; Setup buffer-size.
    16191709        inc     di
     
    16261716        mov     ah, 48h                 ; Get Drive Parameters (extended version)
    16271717        ;mov     dl, 80h                ; Drive number
    1628         mov     si, offset i13xbuf      ; Buffer for result-info
     1718        mov     si, offset [i13xbuf]    ; Buffer for result-info
    16291719        push    dx
    16301720        int     13h                     ; Call the BIOS-function
     
    16891779
    16901780        ; Store total secs
    1691         mov      bx, offset BIOS_TotalSecs
     1781        mov      bx, offset [BIOS_TotalSecs]
    16921782        add      bx,dx
    16931783        add      bx,dx
     
    17031793
    17041794        ; Store number of bytes per sector
    1705         mov      bx, offset BIOS_Bytes
     1795        mov      bx, offset [BIOS_Bytes]
    17061796        add      bx,dx
    17071797        mov      ax,[si+18h]
  • trunk/bootcode/regular/other.asm

    r111 r117  
    167167
    168168        ; Copyright
    169         mov     si, offset Copyright
     169        mov     si, [offset Copyright]
    170170        call    MBR_Teletype
    171171        xor     si,si
     
    198198        mov     ah, 03h
    199199        int     13h
     200        ;!
     201        ;! TODO: Check success
     202        ;! Yes, we should check for errors here, coz it would mean AirBoot
     203        ;! was loaded from a disk where the MBR cannot be written !
     204        ;!
    200205
    201206; =============================================================================
     
    227232        pushf
    228233
    229         mov      bx, offset [TrueSecs]
    230         add      bx,cx
    231         add      bx,cx
    232         add      bx,cx
    233         add      bx,cx
     234        mov     bx, offset [TrueSecs]
     235        add     bx,cx
     236        add     bx,cx
     237        add     bx,cx
     238        add     bx,cx
     239
     240IFDEF   AUX_DEBUG
     241        IF 0
     242        pushf
     243        pusha
     244            mov     al, '#'
     245            call    AuxIO_Teletype
     246            mov     ax, [bx]
     247            call    AuxIO_TeletypeHexWord
     248            mov     al, '#'
     249            call    AuxIO_Teletype
     250            call    AuxIO_TeletypeNL
     251        popa
     252        popf
     253        ENDIF
     254ENDIF
     255
    234256        popf
    235257
     
    276298; =============================================================================
    277299
    278     IFDEF   AUX_DEBUG
    279         ; Write some debug-info to the com-port
    280         call     DEBUG_Dump1
     300IFDEF   AUX_DEBUG
     301    IF 1
     302    call     DEBUG_Dump1
    281303    ENDIF
     304ENDIF
    282305
    283306        ;~ jz      NoValidMasterLVM
     
    299322;               call     AuxIO_TeletypeNL
    300323
    301 
     324;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    302325
    303326        ; Huge Disk indicator
     
    392415        call    PRECRAP_CheckConfiguration
    393416
     417
     418IFDEF   AUX_DEBUG
     419        IF 1
     420        mov     dl, [BIOS_BootDisk]
     421        ;~ mov     dl, 81h
     422        call    DriveIO_LocateMasterLVMSector
     423        call    DEBUG_DumpRegisters
     424        mov     si, offset [TmpSector]
     425        call    AuxIO_DumpSector
     426        ENDIF
     427ENDIF
    394428
    395429        ; =======================================
  • trunk/bootcode/regular/partmain.asm

    r111 r117  
    11221122
    11231123IFDEF   AUX_DEBUG
    1124     pusha
    1125     mov     si,offset [ptetb]
    1126     call    AuxIO_Print
    1127     call    DEBUG_DumpRegisters
    1128     call    AuxIO_TeletypeNL
    1129     mov     ax, word ptr [FreeDriveletterMap+00h]
    1130     mov     dx, word ptr [FreeDriveletterMap+02h]
    1131     call    AuxIO_TeletypeBinDWord
    1132     popa
     1124        IF 1
     1125        pushf
     1126        pusha
     1127            mov     si,offset [ptetb]
     1128            call    AuxIO_Print
     1129            call    DEBUG_DumpRegisters
     1130            call    AuxIO_TeletypeNL
     1131            mov     ax, word ptr [FreeDriveletterMap+00h]
     1132            mov     dx, word ptr [FreeDriveletterMap+02h]
     1133            call    AuxIO_TeletypeBinDWord
     1134        popa
     1135        popf
     1136        ENDIF
    11331137ENDIF
    11341138
     
    19691973
    19701974IFDEF   AUX_DEBUG
    1971     pusha
    1972     call    AuxIO_TeletypeNL
    1973     mov     bx, [PhysDiskBpbIndex]
    1974     inc     bx
    1975     mov     al, [di+bx]
    1976     call    AuxIO_TeletypeHexByte
    1977     mov     bl,[BootPartNo]
    1978     mov     al, [DriveLetters+bx]
    1979     call    AuxIO_TeletypeHexByte
    1980     mov     al, [PartitionVolumeLetters+bx]
    1981     add     al, 3dh
    1982     call    AuxIO_TeletypeHexByte
    1983     mov     al, [LVMdl]
    1984     add     al, 3dh
    1985     call    AuxIO_TeletypeHexByte
    1986     mov     al, [si+LocIPT_SystemID]
    1987     call    AuxIO_TeletypeHexByte
    1988     mov     al,[FSType]
    1989     call    AuxIO_TeletypeHexByte
    1990     popa
     1975        IF 1
     1976        pushf
     1977        pusha
     1978            call    AuxIO_TeletypeNL
     1979            mov     bx, [PhysDiskBpbIndex]
     1980            inc     bx
     1981            mov     al, [di+bx]
     1982            call    AuxIO_TeletypeHexByte
     1983            mov     bl,[BootPartNo]
     1984            mov     al, [DriveLetters+bx]
     1985            call    AuxIO_TeletypeHexByte
     1986            mov     al, [PartitionVolumeLetters+bx]
     1987            add     al, 3dh
     1988            call    AuxIO_TeletypeHexByte
     1989            mov     al, [LVMdl]
     1990            add     al, 3dh
     1991            call    AuxIO_TeletypeHexByte
     1992            mov     al, [si+LocIPT_SystemID]
     1993            call    AuxIO_TeletypeHexByte
     1994            mov     al,[FSType]
     1995            call    AuxIO_TeletypeHexByte
     1996        popa
     1997        popf
     1998        ENDIF
    19911999ENDIF
    19922000
     
    21052113
    21062114
    2107     IFDEF   AUX_DEBUG
     2115IFDEF   AUX_DEBUG
     2116        IF 1
     2117        pushf
    21082118        pusha
    2109         call    DEBUG_Dump2
    2110         ;~ call    DEBUG_DumpBSSSectors
    2111         call    DEBUG_DumpDriveLetters
    2112         call    DEBUG_DumpVolumeLetters
    2113         call    AuxIO_TeletypeNL
     2119            call    DEBUG_Dump2
     2120            ;~ call    DEBUG_DumpBSSSectors
     2121            call    DEBUG_DumpDriveLetters
     2122            call    DEBUG_DumpVolumeLetters
     2123            call    AuxIO_TeletypeNL
    21142124        popa
    2115     ENDIF
     2125        popf
     2126        ENDIF
     2127ENDIF
    21162128
    21172129
  • trunk/bootcode/regular/partscan.asm

    r111 r117  
    6868        mov     byte ptr [CurIO_Scanning], 0             ; Reset flag due scanning complete
    6969
    70     IFDEF   AUX_DEBUG
    71         ;~ pusha
    72         ;~ call    DEBUG_DumpHidePartTables
    73         ;~ popa
    74     ENDIF
     70IFDEF   AUX_DEBUG
     71        IF 0
     72        pushf
     73        pusha
     74            call    DEBUG_DumpHidePartTables
     75        popa
     76        popf
     77        ENDIF
     78ENDIF
     79
    7580        ; Use X-Reference to sync NewPartitionTable with Hide-Config
    7681        call    PARTSCAN_SyncHideConfigWithXref
    7782
    78     IFDEF   AUX_DEBUG
    79         ;~ pusha
    80         ;~ call    DEBUG_DumpHidePartTables
    81         ;~ popa
    82     ENDIF
     83IFDEF   AUX_DEBUG
     84        IF 0
     85        pushf
     86        pusha
     87        call    DEBUG_DumpHidePartTables
     88        popa
     89        popf
     90        ENDIF
     91ENDIF
    8392
    8493        ; Now we copy the new IPT over the old one...
     
    418427PARTSCAN_CheckThisPartition     Proc Near  Uses di si
    419428
     429        local   PartSystemID:byte, PartTypeFlags:byte
     430        local   PartCRC:word, PartPtr:word
     431
    420432IFDEF   AUX_DEBUG
    421433        IF 0
     
    437449ENDIF
    438450
    439         local   PartSystemID:byte, PartTypeFlags:byte
    440         local   PartCRC:word, PartPtr:word
    441451
    442452        mov     wptr [PartPtr], si          ; Save Pointer to PartitionEntry
     
    512522        add     ax, wptr [CurPartition_Location+0] ; +Partition-Absolute
    513523        adc     dx, wptr [CurPartition_Location+2] ;  sectors
    514         mov     si, offset LVMSector
     524
     525        mov     si, offset [LVMSector]
     526
    515527        call    LVM_SearchForPartition     ; Search for DX:AX partition
     528
    516529        jnc     PCCTP_CheckBootRecord
    517530        ; Check, if volume has driveletter assigned and remember it for later
     
    10781091
    10791092
    1080     IFDEF   AUX_DEBUG
    1081         ;~ pusha
    1082         ;~ mov     al,dl
    1083         ;~ call    AuxIO_TeletypeHexByte
    1084         ;~ call    AuxIO_TeletypeNL
    1085         ;~ popa
    1086     ENDIF
     1093IFDEF   AUX_DEBUG
     1094        IF 0
     1095        pushf
     1096        pusha
     1097            mov     al,dl
     1098            call    AuxIO_TeletypeHexByte
     1099            call    AuxIO_TeletypeNL
     1100        popa
     1101        popf
     1102        ENDIF
     1103ENDIF
    10871104
    10881105
     
    10981115
    10991116    IFDEF   AUX_DEBUG
    1100         ; debug code
    1101         ;~ mov     ax,di
    1102         ;~ call    AuxIO_TeletypeHexWord
    1103         ;~ call    AuxIO_TeletypeNL
     1117        IF 0
     1118        pushf
     1119        pusha
     1120            mov     ax,di
     1121            call    AuxIO_TeletypeHexWord
     1122            call    AuxIO_TeletypeNL
     1123        popa
     1124        popf
     1125        ENDIF
    11041126    ENDIF
    11051127
  • trunk/bootcode/regular/videoio.asm

    r94 r117  
    887887        push    dx
    888888        ; Offset of array containing LVM SPT values for each disk found
    889         mov     bx,offset TrueSecs
     889        mov     bx,offset [TrueSecs]
    890890        ; DX to index
    891891        xor     dh,dh
  • trunk/bootcode/setup/part_set.asm

    r76 r117  
    973973
    974974IFDEF   AUX_DEBUG
    975         ;~ pusha
    976         ;~ mov     al,dl   ; Partition the hiding is set for.
    977         ;~ call    AuxIO_TeletypeHexByte
    978         ;~ call    AuxIO_TeletypeNL
    979         ;~ popa
     975        IF 0
     976        pushf
     977        pusha
     978            mov     al,dl   ; Partition the hiding is set for.
     979            call    AuxIO_TeletypeHexByte
     980            call    AuxIO_TeletypeNL
     981        popa
     982        popf
     983        ENDIF
    980984ENDIF
    981985
     
    9971001
    9981002IFDEF   AUX_DEBUG
    999         ;~ pusha
    1000         ;~ mov     al,dl   ; Index of partition to set Special Marker on.
    1001         ;~ call    AuxIO_TeletypeHexByte
    1002         ;~ call    AuxIO_TeletypeNL
    1003         ;~ popa
     1003        IF 0
     1004        pushf
     1005        pusha
     1006            mov     al,dl   ; Index of partition to set Special Marker on.
     1007            call    AuxIO_TeletypeHexByte
     1008            call    AuxIO_TeletypeNL
     1009        popa
     1010        popf
     1011        ENDIF
    10041012ENDIF
    10051013
  • trunk/bootcode/special/apm.asm

    r83 r117  
    3131
    3232IFDEF       AUX_DEBUG
     33            IF 1
     34            pushf
    3335            pusha
    34             mov     si, offset $+5
    35             jmp     @F
    36             db      10,'>> System Shutdown <<',10,0
    37 @@:         call    AuxIO_Print
     36                mov     si, offset $+5
     37                jmp     @F
     38                db      10,'>> System Shutdown <<',10,0
     39        @@:     call    AuxIO_Print
    3840            popa
     41            popf
     42            ENDIF
    3943ENDIF
    4044
  • trunk/bootcode/special/lvm.asm

    r114 r117  
    207207            call    AuxIO_Print
    208208            pop     si
    209             ;~ call    DEBUG_DumpRegisters
     209            call    DEBUG_DumpRegisters
    210210            ;~ call    AuxIO_DumpParagraph
    211211            ;~ call    AuxIO_TeletypeNL
Note: See TracChangeset for help on using the changeset viewer.