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/SPECIAL/LINUX.ASM

    r38 r40  
    188188   add     di, LocIPT_Name
    189189  LSKN_SearchLoop:
    190       push    cx si di
     190      push    cx
     191      push    si
     192      push    di
    191193         mov     cx, 11
    192194         repe    cmpsb                   ; Compare total 11-bytes
    193       pop     di si cx
     195      pop     di
     196      pop     si
     197      pop     cx
    194198      je      LSKN_Found
    195199      add     di, LocIPT_LenOfIPT
     
    224228   ; Linux has 1 'BR' (which is crap) and some setup sectors
    225229   ; we load them at 9000:0, what a luck, we are at 8000:0 :-))
    226    push    ds es
     230   push    ds
     231   push    es
    227232      mov     ax, 9000h
    228233      mov     es, ax
     
    255260      mov     ax, 6000h
    256261      mov     es, ax
    257       push    cx si                      ; Push Kernel-Entry-Pointer
     262      ; Push Kernel-Entry-Pointer
     263      push    cx
     264      push    si
    258265         mov     si, di
    259266         shl     cx, 9                   ; Sectors to Byte Count
     
    262269         shr     cx, 1
    263270         rep     movsw                   ; Copy Data...
    264       pop     si cx                      ; Get Kernel-Entry-Pointer back
     271      ; Get Kernel-Entry-Pointer back
     272      pop     si
     273      pop     cx
    265274     LLL_GotAll:
    266    pop     es ds
    267 
    268    push    cx dx                          ; Push Missing-Sectors, StartCluster
     275   pop     es
     276   pop     ds
     277
     278   ; Push Missing-Sectors, StartCluster
     279   push    cx
     280   push    dx
    269281      mov     ax, 9000h
    270282      mov     ds, ax
     
    336348         stosb                            ; Write another NUL
    337349      pop     cx
    338    pop     dx bx                          ; Pop StartCluster, Missing-Sectors
     350   ; Pop StartCluster, Missing-Sectors
     351   pop     dx
     352   pop     bx
    339353   ; CX - Sector-Count of Kernel Image, DX - Starting Cluster of Kernel Image
    340354   ; BX - Sector-Count left over in 6000:0 area from Setup Code loading
Note: See TracChangeset for help on using the changeset viewer.