wok diff BootProg/stuff/bootex.asm @ rev 24943

BootProg: clear cmdline (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 20 16:57:09 2022 +0000 (2022-04-20)
parents d1f31f5f6401
children 584e67527789
line diff
     1.1 --- a/BootProg/stuff/bootex.asm	Wed Apr 20 15:10:50 2022 +0000
     1.2 +++ b/BootProg/stuff/bootex.asm	Wed Apr 20 16:57:09 2022 +0000
     1.3 @@ -226,12 +226,12 @@
     1.4          popa                            ; restore ax, cx, si, di
     1.5  
     1.6          add     di, byte 32
     1.7 -        cmp     di, bp
     1.8 -        jne     FindNameCycle           ; next root entry
     1.9 +        sub     bp, byte 32
    1.10 +        jnz     FindNameCycle           ; next root entry
    1.11          popf                            ; restore carry="not last sector" flag
    1.12          jc      RootDirReadContinue     ; continue to the next root dir cluster
    1.13  FindNameFailed:                         ; end of root directory (dir end reached)
    1.14 -;        mov     dx, [bx]                ; restore BIOS boot drive number
    1.15 +        mov     dx, [bx]                ; restore BIOS boot drive number
    1.16          call    Error
    1.17          db      "File not found."
    1.18  FindNameFound:
    1.19 @@ -242,16 +242,16 @@
    1.20  ;;;;;;;;;;;;;;;;;;;;;;;;;;
    1.21  
    1.22          push    es
    1.23 -        xor     bp, bp
    1.24  FileReadContinue:
    1.25          shr     bp, 4                   ; bytes to paragraphs
    1.26          mov     di, es
    1.27          add     di, bp                  ; adjust segment for next sector
    1.28          mov     es, di                  ; es:0 updated
    1.29 -        call    ReadCluster             ; read one cluster of root dir
    1.30 +        call    ReadCluster             ; read one more sector of the boot file
    1.31          sub     [bx+FileSize], ebp
    1.32          ja      FileReadContinue
    1.33          mov     dx, [bx]                ; restore BIOS boot drive number
    1.34 +        xor     ax, ax
    1.35          pop     bp
    1.36  
    1.37  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    1.38 @@ -312,7 +312,6 @@
    1.39          push    di
    1.40          push    ds
    1.41          pop     es
    1.42 -        xor     ax, ax
    1.43          mov     [80h], ax               ; clear cmdline
    1.44          dec     ax                      ; both FCB in the PSP don't have a valid drive identifier
    1.45  
    1.46 @@ -392,8 +391,6 @@
    1.47  ;;         ES:0   -> next address    ;;
    1.48  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    1.49  
    1.50 -ReadSector:
    1.51 -
    1.52          xor     ebp, ebp
    1.53          inc     bp
    1.54