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

updated libupnp and libupnp-dev (1.12.0 -> 1.14.12)
author Hans-G?nter Theisgen
date Fri Mar 25 14:27:13 2022 +0100 (2022-03-25)
parents d8c511e24c20
children d1f31f5f6401
line diff
     1.1 --- a/BootProg/stuff/bootex.asm	Fri Feb 18 22:59:06 2022 +0000
     1.2 +++ b/BootProg/stuff/bootex.asm	Fri Mar 25 14:27:13 2022 +0100
     1.3 @@ -269,19 +269,22 @@
     1.4  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     1.5  ;; Setup and run a .COM program ;;
     1.6  ;; Set CS=DS=ES=SS SP=0 IP=100h ;;
     1.7 +;; AX=0ffffh BX=0 CX=0 DX=drive ;;
     1.8  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     1.9  
    1.10 +        mov     ax, 0ffffh              ; both FCB in the PSP don't have a valid drive identifier
    1.11 +        mov     di, 100h                ; ip
    1.12          mov     bp, ImageLoadSeg-10h    ; "org 100h" stuff :)
    1.13          mov     ss, bp
    1.14          xor     sp, sp
    1.15          push    bp                      ; cs, ds and es
    1.16 -        mov     bh, 1                   ; ip
    1.17          jmp     short Run
    1.18  
    1.19  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    1.20  ;; Relocate, setup and run a .EXE program     ;;
    1.21  ;; Set CS:IP, SS:SP, DS, ES and AX according  ;;
    1.22  ;; to wiki.osdev.org/MZ#Initial_Program_State ;;
    1.23 +;; AX=0ffffh BX=0 CX=0 DX=drive               ;;
    1.24  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    1.25  
    1.26  ReloCycle:
    1.27 @@ -304,11 +307,11 @@
    1.28          push    si                      ; containing the PSP structure
    1.29  
    1.30          add     bp, [bx+16h]            ; cs for EXE
    1.31 -        mov     bx, [bx+14h]            ; ip for EXE
    1.32 +        mov     di, [bx+14h]            ; ip for EXE
    1.33  Run:
    1.34          pop     ds
    1.35          push    bp
    1.36 -        push    bx
    1.37 +        push    di
    1.38          push    ds
    1.39          pop     es
    1.40  
    1.41 @@ -355,7 +358,7 @@
    1.42          xchg    eax, esi
    1.43          div     esi                             ; eax=FAT sector #, edx=entry # in sector
    1.44  
    1.45 -        imul    si, dx, 4                       ; si=entry # offset in sector
    1.46 +        imul    si, dx, byte 4                  ; si=entry # offset in sector
    1.47  
    1.48          cdq
    1.49          add     eax, [bx(bpbFatSectorStart)]    ; sector # relative to FAT32