Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions boot/boot.asm
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ read_next:
;******************** LBA_READ *******************************

; check for LBA support

mov ah,041h ;
mov bx,055aah ;
mov dl, [drive]
Expand All @@ -414,22 +414,22 @@ read_next:

sbb bx,0aa55h - 1 ; tests for carry (from shr) too!
jne read_normal_BIOS


; OK, drive seems to support LBA addressing

lea si,[LBA_PACKET]
; setup LBA disk block

; setup LBA disk block
mov LBA_SECTOR_32,bx ; bx is 0 if extended 13h mode supported
mov LBA_SECTOR_48,bx

mov ah,042h
jmp short do_int13_read



read_normal_BIOS:

read_normal_BIOS:

;******************** END OF LBA_READ ************************
mov cx,LBA_SECTOR_0
Expand Down Expand Up @@ -473,12 +473,12 @@ read_normal_BIOS:

les bx,[LBA_OFF]
mov ax, 0x0201
do_int13_read:
do_int13_read:
mov dl, [drive]
int 0x13
jc boot_error ; exit on error

mov ax, word [bsBytesPerSec]
mov ax, word [bsBytesPerSec]

push di
mov si,READBUF ; copy read in sector data to
Expand Down
28 changes: 14 additions & 14 deletions boot/boot32.asm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Entry: jmp short real_start

%define LOADSEG 0x0060

%define FATSEG 0x2000
%define FATSEG 0x2000

%define fat_sector bp+0x48 ; last accessed sector of the FAT

Expand Down Expand Up @@ -141,7 +141,7 @@ secshift: inc ax
jne secshift
mov byte [fat_secshift], al
dec cx

; FINDFILE: Searches for the file in the root directory.
;
; Returns:
Expand All @@ -157,7 +157,7 @@ ff_next_cluster:
push ax
call convert_cluster
jc boot_error ; EOC encountered

ff_next_sector:
push bx ; save sector count

Expand Down Expand Up @@ -189,11 +189,11 @@ ff_find_next_cluster:
call next_cluster
jmp short ff_next_cluster
ff_done:

mov ax, [es:di+0x1A-11] ; get cluster number
mov dx, [es:di+0x14-11]
c4:
sub bx, bx ; ES points to LOADSEG
sub bx, bx ; ES points to LOADSEG
c5: push dx
push ax
push bx
Expand All @@ -209,24 +209,24 @@ c6:
pop dx
call next_cluster
jmp short c5

boot_error:
xor ah,ah
int 0x16 ; wait for a key
int 0x19 ; reboot the machine

; input:
; input:
; DX:AX - cluster
; output:
; DX:AX - next cluster
; CX = 0
; modify:
; DI
next_cluster:
next_cluster:
push es
mov di, ax
and di, [fat_secmask]

mov cx, [fat_secshift]
cn_loop:
shr dx,1
Expand All @@ -236,7 +236,7 @@ cn_loop:
; cluster resides
; DI - cluster index in this
; sector

shl di,1 ; DI - offset in the sector
shl di,1
add ax, [fat_start]
Expand Down Expand Up @@ -264,7 +264,7 @@ cn_exit:
ret


boot_success:
boot_success:
mov bl, [drive]
jmp far [loadsegoff_60]

Expand Down Expand Up @@ -302,7 +302,7 @@ c3:

; prints text after call to this function.

print_1char:
print_1char:
xor bx, bx ; video page 0
mov ah, 0x0E ; else print it
int 0x10 ; via TTY mode
Expand All @@ -312,7 +312,7 @@ print1: lodsb ; get token
cmp al, 0 ; end of string?
jne print_1char ; until done
ret ; and jump to it

;input:
; DX:AX - 32-bit DOS sector number
; ES:BX - destination buffer
Expand Down Expand Up @@ -366,7 +366,7 @@ read_next: push dx
int 0x13

pop ax
pop dx
pop dx
jnc read_ok ; jump if no error
xor ah, ah ; else, reset floppy
int 0x13
Expand Down
6 changes: 3 additions & 3 deletions boot/boot32lb.asm
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ff_next_clust: push eax ; save cluster
call convert_cluster
jc boot_error ; EOC encountered
; EDX is clust/sector, EAX is sector

ff_next_sector: les bx, [loadsegoff_60] ; load to loadseg:0
call readDisk
;--- push eax ; save sector
Expand Down Expand Up @@ -231,7 +231,7 @@ rk_in_cluster: call readDisk
rk_walk_fat: pop eax
call next_cluster
jmp read_kernel

;-----------------------------------------------------------------------

boot_success: mov bl, [drive]
Expand Down Expand Up @@ -360,7 +360,7 @@ read_next: push eax ; would ax be enough?
mov si, sp
mov dl, [drive]
mov ah, 42h ; disk read
int 0x13
int 0x13

mov sp, di ; remove parameter block from stack
; (without changing flags!)
Expand Down
20 changes: 10 additions & 10 deletions boot/oemboot.asm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
; |LBA PKT |
; |--------| 0000:7E00 (0:BP+200)
; |BOOT SEC| contains BPB
; |ORIGIN |
; |ORIGIN |
; |--------| 0000:7C00 (0:BP)
; |VARS | only known is 1st data sector (start of cluster 2)
; |--------| 0000:7BFC (DS:[BP-4])
Expand Down Expand Up @@ -128,7 +128,7 @@ CPU 8086 ; enable assembler warnings to limit instruction set
;%define WINBOOT 1 ; use win9x kernel calling conventions (name & jmp addr)
;%define MSCOMPAT 1 ; sets default filename to MSDOS IO.SYS

%ifdef WINBOOT ; if set also change from PC-DOS to
%ifdef WINBOOT ; if set also change from PC-DOS to
%ifndef MSCOMPAT ; kernel name to MS-DOS kernel name
%define MSCOMPAT
%endif
Expand Down Expand Up @@ -452,13 +452,13 @@ cluster_next: lodsw ; AX = next cluster to read
mov di, [first_cluster] ; set di (si:di on FAT32) to starting cluster #
%ifdef WINBOOT
jmp LOADSEG:0x0200 ; yes, pass control to kernel
%else
%else
jmp LOADSEG:0000 ; yes, pass control to kernel
%endif


; failed to boot
boot_error:
boot_error:
call show
; db "Error! Hit a key to reboot."
db "):."
Expand Down Expand Up @@ -530,7 +530,7 @@ read_next:
;******************** LBA_READ *******************************

; check for LBA support

%ifdef TRYLBAREAD
mov ah,041h ;
mov bx,055aah ;
Expand All @@ -550,15 +550,15 @@ read_next:
; setup LBA disk block
mov LBA_SECTOR_32,bx ; bx is 0 if extended 13h mode supported
mov LBA_SECTOR_48,bx


mov ah,042h
jmp short do_int13_read
%endif



read_normal_BIOS:

read_normal_BIOS:

;******************** END OF LBA_READ ************************
mov cx, LBA_SECTOR_0
Expand Down Expand Up @@ -600,7 +600,7 @@ read_normal_BIOS:

les bx,[LBA_OFF]
mov ax, 0x0201
do_int13_read:
do_int13_read:
mov dl, [drive]
int 0x13

Expand All @@ -616,7 +616,7 @@ read_next_chained:
%endif

read_ok:
mov ax, word [bsBytesPerSec]
mov ax, word [bsBytesPerSec]
mov cl, 4 ; adjust segment pointer by increasing
shr ax, cl
add word [LBA_SEG], ax ; by paragraphs read in (per sector)
Expand Down
26 changes: 13 additions & 13 deletions docs/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ DEVICEHIGH
Usage: devicehigh=[d:][path]file [options]
This is just like device= statement, except it attempts to load
the device driver into high memory first (failing that it should
load it in conventional memory).
load it in conventional memory).
Note: The order you load devices may have a large impact on amount
of free memory available. In general try to load large (in memory
usage) programs into high memory first.
Expand All @@ -91,7 +91,7 @@ DOS
Usage: dos=high|low,umb|noumb
Indicates whether the kernel should try to load itself into
high memory or only conventional (low), and whether to link
upper memory blocks in with normal memory or not.
upper memory blocks in with normal memory or not.
Note: only one set need be given, ie dos=high and dos=noumb are ok.
Important: if you specify dos=high[,umb|noumb] then you must also
load a high memory manager (first), ie FDXMS or HIMEM
Expand All @@ -111,7 +111,7 @@ Usage: ECHO Message to be displayed to user.
ECHO displays (echos) its arguments to the console during
config.sys processing when device drivers are loaded (when
DEVICE= lines are executed).
Example:
Example:
ECHO loading driver 1
device=Driver1.sys
ECHO driver1 successfully loaded
Expand All @@ -135,7 +135,7 @@ Example: fcbs=4

FILES
FILESHIGH
Usage: files=nnn
Usage: files=nnn
where nnn is in range 8-255 (default 8)
Specifies how many files allowed open at once (reserves
memory necessary to support opening this many files).
Expand Down Expand Up @@ -186,7 +186,7 @@ A reasonably safe choice should be "keybuf=0x140,0x1c0".

LASTDRIVE
LASTDRIVEHIGH
Usage: lastdrive=x
Usage: lastdrive=x
where x is last drive letter available for use; A-Z
Example: lastdrive=z

Expand All @@ -213,7 +213,7 @@ Example:

MENUCOLOR
Usage: menucolor foreground[,background]
Use Menucolor before the menu config command, to create a
Use Menucolor before the menu config command, to create a
full screen menu which supports the arrow cursor keys.
The following colors can be used for foreground and background:
0=Black; 1=Blue; 2=Green; 3=Cyan; 4=Red; 5=Magenta;
Expand All @@ -225,7 +225,7 @@ If you do not use MENUCOLOR, the menu will not be full
screen, so some of the BIOS, bootloader and kernel init
messages (list of drives, version info...) stays visible.
To change the colour to white text on blue, use the following:
Example: menucolor 15,1
Example: menucolor 15,1

MENUDEFAULT
Usage: menudefault=defaultoption,delay
Expand Down Expand Up @@ -305,12 +305,12 @@ Example: switchar=-
SWITCHES
Usage: switches=/E[:xxx] /F /K /N /W
Adjusts boot time processing behaviour.
/E specifies how to handle moving of EBDA (Extended BIOS Data Area),
/E specifies how to handle moving of EBDA (Extended BIOS Data Area),
if a size in bytes is specified [xxx, in range of 48-1024]
then the EBDA will be moved from the top of conventional memory
to a lower address (allowing for potentially larger free block
of conventional memory if video memory at A0000 is available).
without a size, the EBDA will not be moved
without a size, the EBDA will not be moved
/F skips the delay checking for F5/F8 keystroke before processing
config.sys [equivalent to SYS CONFIG skipconfigseconds=0]
F5 and F8 are only processed if pressed before DOS boots but
Expand All @@ -326,7 +326,7 @@ Adjusts boot time processing behaviour.
/W is NOT supported in FreeDOS. This option in MS DOS would set a flag
for Windows 3.0 to skip loading wina20.386 from the root directory,
used when \WINA20.386 is moved into a subdirectory, a device line
with proper path must be added to Microsoft (R) Windows SYSTEM.INI
with proper path must be added to Microsoft (R) Windows SYSTEM.INI
[386Enhanced] section. --- may be ignored for compatibility

VERSION
Expand Down Expand Up @@ -379,13 +379,13 @@ rem NETWORK
rem Menu items can only be selected if at least one line uses them:
3? echo Basic configuration selected

Although this is different than MSDOS menuing possibilities, it
Although this is different than MSDOS menuing possibilities, it
allows for selecting from multiple options during bootup while
remaining simple. It, however, does not allow for multi-level
menuing based configuration schemes.


It's also possible to combine menu options, to avoid writing thing every
It's also possible to combine menu options, to avoid writing thing every
time again.
constructions like 0?devicehigh?=cdrom.sys are also possible
("if menu option 0 chosen, ask if you want to load this driver")
Expand Down Expand Up @@ -469,7 +469,7 @@ MENU
MENUDEFAULT=1,10 ( configuration 1, wait 10 seconds)

REM 1st choice
1?ECHO You selected menu #1
1?ECHO You selected menu #1

REM 2nd choice
2?ECHO You selected menu #2
Expand Down
Loading