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/SETUP/PART_SET.ASM

    r38 r40  
    2525
    2626; This here is called from Menu in AIR-BSET.asm
    27 PARTSETUP_Main                  Proc Near   Uses
     27PARTSETUP_Main                  Proc Near
    2828   ; Build Fixed Content...
    2929   call    PARTSETUP_DrawMenuBase
     
    5353      cmp     ah, Keys_F1
    5454      je      PSM_KeyF1
    55       cmp     ah, Keys_Enter
     55      cmp     ah, Keys_ENTER
    5656      je      PSM_KeyENTER
    5757      ; Flags-Change
     
    110110   jmp     PSM_MainLoop
    111111
     112    ; Disabling editing for type 0x35 is currently implemented
     113    ; in PARTSETUP_ChangePartitionName.
    112114  PSM_KeyENTER:
    113115   call    PARTSETUP_ChangePartitionName
     
    120122  PSM_KeyBootAble:
    121123   call    PART_GetPartitionPointer      ; Gets Partition (DL) Pointer -> SI
     124   ; See if this is an eCS LVM Volume.
     125   ; In that case, we don't allow it to be made bootable.
     126   ; We also show a popup to inform the user.
     127   call    PARTSETUP_IsType35
     128   je      PSM_KeyBootAble_istype35
     129
     130  PSM_KeyBootAble_notype35:
    122131   mov     al, [si+LocIPT_Flags]
    123    xor     al, Flags_BootAble
     132   xor     al, Flags_Bootable
    124133   mov     [si+LocIPT_Flags], al
    125134   call    PARTSETUP_DrawPartitionInfo
    126135   call    PARTSETUP_BuildChoiceBar
     136  PSM_KeyBootAble_istype35:
    127137   jmp     PSM_MainLoop
    128138
     
    164174PARTSETUP_Main                  EndP
    165175
     176
     177; See if this is a partition of type 0x35 and display error
     178; when user tries to set it as bootable.
     179; IN:   SI = Pointer to partition
     180; OUT:  ZF = Set if 0x35, clear otherwise
     181PARTSETUP_IsType35      Proc    Near
     182   mov     al, [si+LocIPT_SystemID]
     183   cmp     al, 35h
     184   jne     PARTSETUP_IsType35_end
     185   pushf
     186   pusha
     187   ; Cannot boot LVM-Data partitions
     188   mov     cx, 0C04h
     189   mov     si, offset TXT_SETUP_NoBootType35
     190   call    SETUP_ShowErrorBox
     191   popa
     192   call    PARTSETUP_DrawMenuBase
     193   call    PARTSETUP_RefreshPartitions
     194   call    PARTSETUP_BuildChoiceBar
     195   popf
     196  PARTSETUP_IsType35_end:
     197   ret
     198PARTSETUP_IsType35      EndP
     199
     200
    166201; Draw all standard-things for Partition Setup, dynamic content not included.
    167202PARTSETUP_DrawMenuBase          Proc Near   Uses dx
     
    251286   call    VideoIO_FixedPrint
    252287
    253    mov     si, offset TXT_SETUPHELP_PARTSETUP
     288   mov     si, offset TXT_SETUPHELP_PartSetup
    254289   call    SETUP_DrawMenuHelp
    255290   ret
     
    370405         mov     cl, 11
    371406         call    VideoIO_FixedPrint
    372    pop     si cx
     407   pop     si
     408   pop     cx
    373409
    374410   ; Display "Flags" field aka "BVHL"
     
    379415   mov     bh, bl
    380416   mov     al, TXT_SETUP_FlagLetterBootable
    381    and     bl, Flags_BootAble
     417   and     bl, Flags_Bootable
    382418   call    PARTSETUP_DrawOneFlag
    383419   mov     bl, bh
     
    429465;            DH - New Active (to be activated)
    430466; Destroyed: None
    431 PARTSETUP_BuildChoiceBar        Proc Near   Uses
     467PARTSETUP_BuildChoiceBar        Proc Near
    432468   cmp     dl, dh
    433469   je      PSBCB_SkipRetrace
     
    666702        cmp     byte ptr [si+LocIPT_SystemID], 035h
    667703        jnz     no_type_35h
     704
     705   ; Cannot boot LVM-Data partitions
     706   pusha
     707   mov     cx, 0C04h
     708   mov     si, offset TXT_SETUP_NoEditType35
     709   call    SETUP_ShowErrorBox
     710   popa
     711
     712
    668713        jmp     PSCPN_AllDone
    669714    no_type_35h:
    670715
    671716   mov     cx, 11                        ; Partition-Name-Length = 11 Bytes
    672    push    si di
     717   push    si
     718   push    di
    673719      add     si, LocIPT_Name            ; DS:SI -> Partition-Name
    674720      repz    cmpsb
    675    pop     di si
     721   pop     di
     722   pop     si
    676723   jne     PSCPN_LetUserEditPartName     ; -> No BR/LVM Changing/Saving
    677724
     
    741788
    742789   ; ----------------------------------------------[LVM SAVE PARTITION NAME]---
    743    ; Copy 11 bytes from IPT into LVM PartitonName, back-padd with zero's
     790   ; Copy 11 bytes from IPT into LVM PartitionName, back-padd with zero's
    744791   mov     cx, 11
    745792   push    si
     
    848895      cmp     ah, Keys_F1
    849896      je      PHSM_KeyF1
    850       cmp     ah, Keys_Enter
     897      cmp     ah, Keys_ENTER
    851898      je      PHSM_KeyToogle
    852899      cmp     ah, Keys_Plus
     
    9581005   sub     dl, cl                        ; Adjust position
    9591006   sub     dl, 2
    960    push    cx si                         ; SI == Label Field
     1007   push    cx
     1008   push    si                         ; SI == Label Field
    9611009      mov     cx, dx
    9621010      call    VideoIO_Locate
     
    9651013      mov     si, offset TXT_SETUP_HideFeature2
    9661014      call    VideoIO_Print
    967    pop     si cx
     1015   pop     si
     1016   pop     cx
    9681017   call    VideoIO_FixedPrint
    9691018   mov     al, '>'
     
    11341183;            DH - New Active (to be activated)
    11351184; Destroyed: None
    1136 PARTHIDESETUP_BuildChoiceBar    Proc Near   Uses
     1185PARTHIDESETUP_BuildChoiceBar    Proc Near
    11371186   cmp     dl, dh
    11381187   je      PHSBCB_SkipRetrace
     
    12651314   mov     di, offset HidePartitionTable
    12661315   add     di, ax                        ; We got the pointer
    1267    push    di di
     1316   push    di
     1317   push    di
    12681318      mov     cx, LocIPT_MaxPartitions
    12691319      mov     al, 0FFh
     
    13671417         cmp     ah, Keys_ESC
    13681418         je      PSDLS_KeyDONE
    1369          cmp     ah, Keys_Enter
     1419         cmp     ah, Keys_ENTER
    13701420         je      PSDLS_KeyDONE
    13711421         ; Direct-Letter-Input
Note: See TracChangeset for help on using the changeset viewer.