Ignore:
Timestamp:
Apr 11, 2014, 9:58:17 PM (11 years ago)
Author:
Ben Rietbroek
Message:

Converting to JWasm -- phase 3 (not working) [2012-02-16]

WARNING!!

All commits upto and including the commit of [2012-05-13] contain
a severe bug!! Building from these sources and then disabling
the 'force LBA' feature while also using the drive-letter feature or
editing the label can DESTROY THE MBR on ALL ATTACHED DISKS!!
DO NOT DISABLE 'FORCE LBA USAGE' WHEN BUILT FROM THE THESE COMMITS!!

Problems

o Problem with location of BSS
o Problem with segments

Info

o Adjusted DISCLAIM.TXT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/REGULAR/DRIVEIO.ASM

    r38 r40  
    153153
    154154DriveIO_GetHardDriveCount       Proc Near   Uses ds si
    155    push    ds si
     155   push    ds
     156   push    si
    156157      push    0040h
    157158      pop     ds
    158159      mov     si, 0075h
    159160      mov     dh, ds:[si]                ; 40:75 -> POST: Total Harddiscs == DL
    160    pop     si ds
     161   pop     si
     162   pop     ds
    161163   mov     TotalHarddiscs, dh
    162164   ret
     
    173175   mov     dl, 80h
    174176  DIOILUT_DriveLoop:
    175       push    dx di
     177      push    dx
     178      push    di
    176179         mov     ah, 08h
    177180         int     13h            ; DISK - GET DRIVE PARAMETERS
     
    190193                                ;  bit 16-23 of the LBA address
    191194        DIOILUT_Error:
    192       pop     di dx
     195      pop     di
     196      pop     dx
    193197      mov     bptr ds:[di], ah  ; Save that value
    194198      inc     di                ; Go to next BYTE
     
    206210; Rousseau: Enhanced to handle sector-numbers 127 and 255 besides 63 for LVM-info sectors.
    207211;           Ugly, need to cleanup.
    208 DriveIO_LVMAdjustToInfoSector   Proc Near   Uses
     212DriveIO_LVMAdjustToInfoSector   Proc Near
    209213
    210214
     
    471475DriveIO_LVMAdjustToInfoSector   EndP
    472476
    473 drive:                  db 'drive                    : ',0
    474 before_lvm_adjust:      db 'before lvm adjust        : ',0
    475 after_lvm_adjust:       db 'after lvm adjust         : ',0
    476 before_lvm_adjust_log:  db 'before lvm logical adjust: ',0
    477 after_lvm_adjust_log:   db 'after lvm logical adjust : ',0
    478 spt_used:               db 'spt used                 : ',0
     477drive                   db 'drive                    : ',0
     478before_lvm_adjust       db 'before lvm adjust        : ',0
     479after_lvm_adjust        db 'after lvm adjust         : ',0
     480before_lvm_adjust_log   db 'before lvm logical adjust: ',0
     481after_lvm_adjust_log    db 'after lvm logical adjust : ',0
     482spt_used                db 'spt used                 : ',0
    479483
    480484
     
    551555
    552556; Keeps DS:SI for caller
    553 DriveIO_LoadTmpSector           Proc Near  Uses
     557DriveIO_LoadTmpSector           Proc Near
    554558   mov     si, offset TmpSector
    555559   call    DriveIO_LoadSector                                                    ; Uses INT13X if needed
     
    558562
    559563; Keeps DS:SI for caller
    560 DriveIO_SaveTmpSector           Proc Near  Uses
     564DriveIO_SaveTmpSector           Proc Near
    561565   mov     si, offset TmpSector
    562566   call    DriveIO_SaveSector
     
    626630
    627631; Memory-Block that holds information for LBA-access via INT 13h
    628 DriveIO_DAP:               db       10h  ; Size of paket
     632DriveIO_DAP                db       10h  ; Size of paket
    629633                           db        0   ; Reserved
    630634DriveIO_DAP_NumBlocks      dw        0   ; Number of blocks
     
    652656   mov     bptr [si+5], dl
    653657   call    MBR_Teletype
    654    jmp     MBRLE_Halt
     658
     659   ; JWasm: cannot jump to local label in procedure.
     660   ; Changed to halt here.
     661   ;jmp     MBRLE_Halt
     662  DriveIO_GotLoadError_halt:
     663   jmp     DriveIO_GotLoadError_halt
    655664DriveIO_GotLoadError            EndP
    656665
     
    12371246
    12381247; Values for sectors per track table corresponding to DriveIO_IsHugeDrive return value.
    1239 secs_per_track_table:   db    63,127,255,255,255,255
     1248secs_per_track_table    db    63,127,255,255,255,255
    12401249
    12411250;db_lmlvm:   db 'Load Master LVM -- disk: ',0
Note: See TracChangeset for help on using the changeset viewer.