wok diff BootProg/stuff/boot16.asm @ rev 25012

Up python-xmlutils (1.4.1)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 16 19:42:25 2022 +0000 (2022-05-16)
parents d1f31f5f6401
children 180119c209e8
line diff
     1.1 --- a/BootProg/stuff/boot16.asm	Wed Apr 20 15:10:50 2022 +0000
     1.2 +++ b/BootProg/stuff/boot16.asm	Mon May 16 19:42:25 2022 +0000
     1.3 @@ -64,12 +64,12 @@
     1.4  ;;                                                                          ;;
     1.5  ;;                   Boot Image Startup (register values):                  ;;
     1.6  ;;                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                  ;;
     1.7 -;;  dl = BIOS boot drive number (e.g. 0, 80H)                               ;;
     1.8 +;;  ax = 0ffffh (both FCB in the PSP don't have a valid drive identifier),  ;;
     1.9 +;;  bx = cx = 0, dl = BIOS boot drive number (e.g. 0, 80H)                  ;;
    1.10  ;;  cs:ip = program entry point                                             ;;
    1.11  ;;  ss:sp = program stack (don't confuse with boot sector's stack)          ;;
    1.12  ;;  COM program defaults: cs = ds = es = ss = 50h, sp = 0, ip = 100h        ;;
    1.13  ;;  EXE program defaults: ds = es = EXE data - 10h (fake MS-DOS psp),       ;;
    1.14 -;;  ax = 0ffffh (both FCB in the PSP don't have a valid drive identifier),  ;;
    1.15  ;;  cs:ip and ss:sp depends on EXE header                                   ;;
    1.16  ;;  Magic numbers:                                                          ;;
    1.17  ;;    si = 16381 (prime number 2**14-3)                                     ;;
    1.18 @@ -78,6 +78,7 @@
    1.19  ;;  The magic numbers let the program know whether it has been loaded by    ;;
    1.20  ;;  this boot sector or by MS-DOS, which may be handy for universal, bare-  ;;
    1.21  ;;  metal and MS-DOS programs.                                              ;;
    1.22 +;;  The command line contains no arguments.                                 ;;
    1.23  ;;                                                                          ;;
    1.24  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    1.25  
    1.26 @@ -213,7 +214,7 @@
    1.27          mul     bx                      ; dx:ax = 0 = LBA (LBA are relative to FAT)
    1.28          mov     cx, word [bx(bpbSectorsPerFAT)]
    1.29  
    1.30 -        call    ReadCXSectors           ; read fat and clear ax & cx
    1.31 +        call    ReadCXSectors           ; read fat and clear ax & cx; bp = SectorsPerFAT
    1.32  
    1.33  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    1.34  ;; load the root directory in ;;
    1.35 @@ -230,7 +231,7 @@
    1.36          mul     bp                      ; [bx(bpbSectorsPerFAT)], set by ReadCXSectors
    1.37  
    1.38          push    es
    1.39 -        call    ReadCXSectors           ; read root directory; clear ax, cx and di
    1.40 +        call    ReadCXSectors           ; read root directory; clear ax, cx & di; bp = first data sector
    1.41          pop     es
    1.42  
    1.43  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    1.44 @@ -334,6 +335,7 @@
    1.45  ;;         SI = cluster list ;;
    1.46  ;;         DI = file sectors ;;
    1.47  ;;         CH = 0            ;;
    1.48 +;;         BP = 1st data sec ;;
    1.49  ;; Output: BP:0 -> buffer    ;;
    1.50  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    1.51