Ignore:
Timestamp:
Apr 11, 2014, 9:36:56 PM (12 years ago)
Author:
Ben Rietbroek
Message:

Converting to JWasm -- phase #1 (not working) [2012-02-15]

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 WLink generates an oversized image
o Only Tasm with TLink works correctly

File:
1 edited

Legend:

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

    r37 r38  
    153153
    154154DriveIO_GetHardDriveCount       Proc Near   Uses ds si
    155    push    ds
    156    push    si
     155   push    ds si
    157156      push    0040h
    158157      pop     ds
    159158      mov     si, 0075h
    160159      mov     dh, ds:[si]                ; 40:75 -> POST: Total Harddiscs == DL
    161    pop     si
    162    pop     ds
     160   pop     si ds
    163161   mov     TotalHarddiscs, dh
    164162   ret
     
    175173   mov     dl, 80h
    176174  DIOILUT_DriveLoop:
    177       push    dx
    178       push    di
     175      push    dx di
    179176         mov     ah, 08h
    180177         int     13h            ; DISK - GET DRIVE PARAMETERS
     
    193190                                ;  bit 16-23 of the LBA address
    194191        DIOILUT_Error:
    195       pop     di
    196       pop     dx
     192      pop     di dx
    197193      mov     bptr ds:[di], ah  ; Save that value
    198194      inc     di                ; Go to next BYTE
     
    210206; Rousseau: Enhanced to handle sector-numbers 127 and 255 besides 63 for LVM-info sectors.
    211207;           Ugly, need to cleanup.
    212 DriveIO_LVMAdjustToInfoSector   Proc Near
     208DriveIO_LVMAdjustToInfoSector   Proc Near   Uses
    213209
    214210
     
    475471DriveIO_LVMAdjustToInfoSector   EndP
    476472
    477 drive                   db 'drive                    : ',0
    478 before_lvm_adjust       db 'before lvm adjust        : ',0
    479 after_lvm_adjust        db 'after lvm adjust         : ',0
    480 before_lvm_adjust_log   db 'before lvm logical adjust: ',0
    481 after_lvm_adjust_log    db 'after lvm logical adjust : ',0
    482 spt_used                db 'spt used                 : ',0
     473drive:                  db 'drive                    : ',0
     474before_lvm_adjust:      db 'before lvm adjust        : ',0
     475after_lvm_adjust:       db 'after lvm adjust         : ',0
     476before_lvm_adjust_log:  db 'before lvm logical adjust: ',0
     477after_lvm_adjust_log:   db 'after lvm logical adjust : ',0
     478spt_used:               db 'spt used                 : ',0
    483479
    484480
     
    555551
    556552; Keeps DS:SI for caller
    557 DriveIO_LoadTmpSector           Proc Near
     553DriveIO_LoadTmpSector           Proc Near  Uses
    558554   mov     si, offset TmpSector
    559555   call    DriveIO_LoadSector                                                    ; Uses INT13X if needed
     
    562558
    563559; Keeps DS:SI for caller
    564 DriveIO_SaveTmpSector           Proc Near
     560DriveIO_SaveTmpSector           Proc Near  Uses
    565561   mov     si, offset TmpSector
    566562   call    DriveIO_SaveSector
     
    630626
    631627; Memory-Block that holds information for LBA-access via INT 13h
    632 DriveIO_DAP                db       10h  ; Size of paket
     628DriveIO_DAP:               db       10h  ; Size of paket
    633629                           db        0   ; Reserved
    634630DriveIO_DAP_NumBlocks      dw        0   ; Number of blocks
     
    656652   mov     bptr [si+5], dl
    657653   call    MBR_Teletype
    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
     654   jmp     MBRLE_Halt
    664655DriveIO_GotLoadError            EndP
    665656
     
    12461237
    12471238; Values for sectors per track table corresponding to DriveIO_IsHugeDrive return value.
    1248 secs_per_track_table    db    63,127,255,255,255,255
     1239secs_per_track_table:   db    63,127,255,255,255,255
    12491240
    12501241;db_lmlvm:   db 'Load Master LVM -- disk: ',0
Note: See TracChangeset for help on using the changeset viewer.