wok diff BootProg/stuff/boot32.asm @ rev 25454
oldrunner: add apple2 keys mapping
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Sep 22 07:58:57 2022 +0000 (20 months ago) |
parents | 62d43c1b8453 |
children | ad0bc3efbf37 |
line diff
1.1 --- a/BootProg/stuff/boot32.asm Wed Sep 14 18:33:54 2022 +0000 1.2 +++ b/BootProg/stuff/boot32.asm Thu Sep 22 07:58:57 2022 +0000 1.3 @@ -60,7 +60,7 @@ 1.4 ;; Boot Image Startup (register values): ;; 1.5 ;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;; 1.6 ;; ax = 0ffffh (both FCB in the PSP don't have a valid drive identifier), ;; 1.7 -;; bx = cx = 0, dl = BIOS boot drive number (e.g. 0, 80H) ;; 1.8 +;; bx = 0, dl = BIOS boot drive number (e.g. 0, 80H) ;; 1.9 ;; cs:ip = program entry point ;; 1.10 ;; ss:sp = program stack (don't confuse with boot sector's stack) ;; 1.11 ;; COM program defaults: cs = ds = es = ss = 50h, sp = 0, ip = 100h ;; 1.12 @@ -234,7 +234,7 @@ 1.13 je ErrFind ; end of root directory (NULL entry found) 1.14 %endif 1.15 pusha 1.16 - mov cl, 11 1.17 + mov cl, NameLength 1.18 mov si, ProgramName ; ds:si -> program name 1.19 repe cmpsb 1.20 je FindNameFound 1.21 @@ -289,8 +289,8 @@ 1.22 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.23 ;; Setup and run a .COM program ;; 1.24 ;; Set CS=DS=ES=SS SP=0 IP=100h ;; 1.25 -;; AX=0ffffh BX=0 CX=0 DX=drive ;; 1.26 -;; and cmdline=void ;; 1.27 +;; AX=0ffffh BX=0 DX=drive and ;; 1.28 +;; cmdline=void ;; 1.29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.30 1.31 mov di, 100h ; ip 1.32 @@ -304,7 +304,7 @@ 1.33 ;; Relocate, setup and run a .EXE program ;; 1.34 ;; Set CS:IP, SS:SP, DS, ES and AX according ;; 1.35 ;; to wiki.osdev.org/MZ#Initial_Program_State ;; 1.36 -;; AX=0ffffh BX=0 CX=0 DX=drive cmdline=void ;; 1.37 +;; AX=0ffffh BX=0 DX=drive cmdline=void ;; 1.38 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.39 1.40 ReloCycle: 1.41 @@ -387,7 +387,7 @@ 1.42 mul dword [bx(bsSectorsPerFAT32)] 1.43 1.44 xchg eax, edi 1.45 - movzx ecx, byte [bx(bpbSectorsPerCluster)] 1.46 + movzx ecx, byte [bx(bpbSectorsPerCluster)] ; 8..128 1.47 mul ecx ; edx:eax=sector number in data area 1.48 add eax, edi 1.49 1.50 @@ -400,7 +400,7 @@ 1.51 %if LBA48bits != 0 1.52 adc word [bx(HiLBA)], bx 1.53 %endif 1.54 - mov dx, word [bx(bpbReservedSectors)] 1.55 + mov dx, [bx(bpbReservedSectors)] 1.56 1.57 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.58 ;; Reads a sector using BIOS Int 13h fn 42h ;; 1.59 @@ -468,7 +468,7 @@ 1.60 mov dl, [bx(DriveNumber)] ; restore BIOS boot drive number 1.61 %endif 1.62 1.63 -ReadSectorLBARetry: 1.64 +ReadSectorRetry: 1.65 mov si, sp 1.66 mov ah, 42h ; ah = 42h = extended read function no. 1.67 int 13h ; extended read sectors (DL, DS:SI) 1.68 @@ -490,7 +490,7 @@ 1.69 int 13h ; reset drive (DL) 1.70 1.71 dec bp 1.72 - jnz ReadSectorLBARetry 1.73 + jnz ReadSectorRetry 1.74 %endif 1.75 1.76 call Error 1.77 @@ -543,6 +543,7 @@ 1.78 1.79 ProgramName db "STARTUP BIN" ; name and extension each must be 1.80 times (510-($-$$)) db ' ' ; padded with spaces (11 bytes total) 1.81 +NameLength equ $-ProgramName 1.82 1.83 ;;;;;;;;;;;;;;;;;;;;;;;;;; 1.84 ;; End of the sector ID ;;