Ignore:
Timestamp:
Apr 11, 2014, 9:36:56 PM (11 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/SPECIAL/LINUX.ASM

    r37 r38  
    188188   add     di, LocIPT_Name
    189189  LSKN_SearchLoop:
    190       push    cx
    191       push    si
    192       push    di
     190      push    cx si di
    193191         mov     cx, 11
    194192         repe    cmpsb                   ; Compare total 11-bytes
    195       pop     di
    196       pop     si
    197       pop     cx
     193      pop     di si cx
    198194      je      LSKN_Found
    199195      add     di, LocIPT_LenOfIPT
     
    228224   ; Linux has 1 'BR' (which is crap) and some setup sectors
    229225   ; we load them at 9000:0, what a luck, we are at 8000:0 :-))
    230    push    ds
    231    push    es
     226   push    ds es
    232227      mov     ax, 9000h
    233228      mov     es, ax
     
    260255      mov     ax, 6000h
    261256      mov     es, ax
    262       ; Push Kernel-Entry-Pointer
    263       push    cx
    264       push    si
     257      push    cx si                      ; Push Kernel-Entry-Pointer
    265258         mov     si, di
    266259         shl     cx, 9                   ; Sectors to Byte Count
     
    269262         shr     cx, 1
    270263         rep     movsw                   ; Copy Data...
    271       ; Get Kernel-Entry-Pointer back
    272       pop     si
    273       pop     cx
     264      pop     si cx                      ; Get Kernel-Entry-Pointer back
    274265     LLL_GotAll:
    275    pop     es
    276    pop     ds
    277 
    278    ; Push Missing-Sectors, StartCluster
    279    push    cx
    280    push    dx
     266   pop     es ds
     267
     268   push    cx dx                          ; Push Missing-Sectors, StartCluster
    281269      mov     ax, 9000h
    282270      mov     ds, ax
     
    348336         stosb                            ; Write another NUL
    349337      pop     cx
    350    ; Pop StartCluster, Missing-Sectors
    351    pop     dx
    352    pop     bx
     338   pop     dx bx                          ; Pop StartCluster, Missing-Sectors
    353339   ; CX - Sector-Count of Kernel Image, DX - Starting Cluster of Kernel Image
    354340   ; BX - Sector-Count left over in 6000:0 area from Setup Code loading
Note: See TracChangeset for help on using the changeset viewer.