Changeset 106


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

This file updated for consistency - not part of AirBoot [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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/special/fat16.asm

    r57 r106  
    4242   mov    edx, dptr ds:[si+LocIPT_AbsoluteBegin]
    4343   mov    FAT16_AbsPartitionBegin, edx
    44    mov    DriveIO_DAP_Absolute, edx      ; Read in Boot-Record of partition
    45    mov    DriveIO_DAP_NumBlocks, 1       ; 1 Sector to load
     44   mov    INT13X_DAP_Absolute, edx       ; Read in Boot-Record of partition
     45   mov    INT13X_DAP_NumBlocks, 1        ; 1 Sector to load
    4646   mov    FAT16_FATCacheSector, 255      ; Sector 255 - So nothing cached
    4747   mov    ax, ds
    4848   shl    eax, 16
    4949   mov    ax, offset FAT16_FATCache
    50    mov    DriveIO_DAP_Transfer, eax      ; Transfer to FAT-Cache Area
     50   mov    INT13X_DAP_Transfer, eax       ; Transfer to FAT-Cache Area
    5151   call   FAT16_LoadSectors
    5252   mov    al, bptr [FAT16_FATCache+13]
     
    7979   mov    ax, 9000h
    8080   shl    eax, 16                        ; 9000:0 -> Space for Root
    81    mov    DriveIO_DAP_Transfer, eax      ; Transfer to that segment
     81   mov    INT13X_DAP_Transfer, eax       ; Transfer to that segment
    8282   mov    eax, FAT16_AbsRootBegin
    83    mov    DriveIO_DAP_Absolute, eax      ; Read in Root-Entries...
     83   mov    INT13X_DAP_Absolute, eax       ; Read in Root-Entries...
    8484   mov    ax, FAT16_NumOfRootEntries
    8585   shr    ax, 4                          ; NumOfRootEntries/16
    86    mov    DriveIO_DAP_NumBlocks, ax      ;  -> Sectors of Root-Entries
     86   mov    INT13X_DAP_NumBlocks, ax       ;  -> Sectors of Root-Entries
    8787   call   FAT16_LoadSectors              ; DONE.
    8888   ret
     
    134134      shl    eax, 16
    135135      mov    ax, di
    136       mov    DriveIO_DAP_Transfer, eax   ; Read to 9000:DI
     136      mov    INT13X_DAP_Transfer, eax    ; Read to 9000:DI
    137137      mov    ax, dx
    138138      sub    ax, 2                       ; Everything starts at Cluster 2
     
    145145      mov    dx, ax                      ; EDX - Relative to Cluster-Start
    146146      add    edx, FAT16_AbsClusterBegin  ; EDX - Absolute Sector Count
    147       mov    DriveIO_DAP_Absolute, edx
    148       mov    DriveIO_DAP_NumBlocks, bx   ; Get a whole cluster
     147      mov    INT13X_DAP_Absolute, edx
     148      mov    INT13X_DAP_NumBlocks, bx    ; Get a whole cluster
    149149      call   FAT16_LoadSectors           ; DONE.
    150150   pop    dx
     
    167167   shl    eax, 16
    168168   mov    ax, offset FAT16_FATCache
    169    mov    DriveIO_DAP_Transfer, eax      ; Transfer to FAT-Cache Area
     169   mov    INT13X_DAP_Transfer, eax       ; Transfer to FAT-Cache Area
    170170   movzx  edx, dx
    171171   mov    eax, FAT16_AbsFATBegin
    172172   add    eax, edx
    173    mov    DriveIO_DAP_Absolute, eax      ; Read in Boot-Record of partition
    174    mov    DriveIO_DAP_NumBlocks, 1       ; 1 Sector to load
     173   mov    INT13X_DAP_Absolute, eax       ; Read in Boot-Record of partition
     174   mov    INT13X_DAP_NumBlocks, 1        ; 1 Sector to load
    175175   call   FAT16_LoadSectors              ; DONE.
    176176  FAT16RC_GotFATsectorAlready:
     
    184184   push   cs
    185185   pop    ds
    186    mov    si, offset DriveIO_DAP
     186   mov    si, offset INT13X_DAP
    187187   mov    dl, ds:[FAT16_Drive]
    188188   mov    ah, 42h                        ; Extended Read
     
    192192
    193193  FAT16LS_Success:
    194    movzx  eax, wptr ds:[DriveIO_DAP_NumBlocks]
    195    add    dptr ds:[DriveIO_DAP_Absolute+0], eax ; Adjust Absolute Offset
     194   movzx  eax, wptr ds:[INT13X_DAP_NumBlocks]
     195   add    dptr ds:[INT13X_DAP_Absolute+0], eax ; Adjust Absolute Offset
    196196   ret
    197197FAT16_LoadSectors               EndP
Note: See TracChangeset for help on using the changeset viewer.