You are here, vous êtes ici:
Atari Pages/Support and FAQ/Technical documentation page

Philippe PVBest's Atari 8bit Web Site

Atari 8bit Technical Documentation
Documentation Technique Atari 8bit

 

Disque BOOT
Atari Boot disk and boot program

1. What is a Boot program or a Boot disk?

An Atari 'Boot' program is either on a floppy disk or either on a tape, and it is automatically loaded and run by the operating system (OS) (the OS is part of the Atari resident ROM), as soon as the Atari computer is switched on.

It allows then the loading and the automatic execution of a Atari program at the Atari computer powering.

Remarks about the Atari keys while starting/powering:

The START or OPTION keys of Atari XL/XE must sometimes be pressed at the powering of the Atari computer... Why?

On an Atari XL/XE, if the OPTION key is pressed during powering, the BASIC ROM is disconnected, which is normally necessary for any non BASIC Boot program.

By default, no other keys have to be pressed, reading on the Atari disk drive, searching and loading the Boot program is fully automatic.

On an Atari XL/XE, if the START key is pressed during powering, then the reading of a BOOT tape (on the tape device) is launched (of course if the tape device in connected to the serial port), instead of launching a reading on the Atari disk drive.

If the OPTION key is not pressed and the tape device or disk device are not connected and not ready, the BASIC ROM is loaded and run. Its interface is displayed with the famous blue screen and the ''READY'' message.

If the OPTION key is pressed and the tape device or disk device are not connected and not ready, the computer test program which is resident in OS memory ROM, is run.

If the tape device or the disk device are connected and ready, but if no valid BOOT program is found, the screen will display a continuous ''BOOT ERROR'' message.

2. The first sector of the disk:

Example of sector BOOT (arbitrary example):

BYT#>00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
CHAR>
0123456789ABCDEF
00 : 00 03 00 3E 10 3E 00 00 00 00 00 00 00 00 00 00
10 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  ..>..>..........
................
................
................
................
................
................
................
Checksum = $8F, Next sector = $000, Bytes per sector = $00

Nota: The Next sector and Bytes per sector values are not used by the Boot programs.

The first 6 bytes of the Boot disk first sector contain information necessary for the loading and the execution of the boot program:

00 : The first byte is copied in the DFLAGS control address, it is not used during the loading of the program, and it generally has no utility.

03 : the second byte indicates the number of sector to be loaded in the Atari memory. This byte is copied in the DBSECT control address. In our example, 3 sectors are to be loaded.
The maximum number of sector that could be loaded on a Boot disk is $FF (= 255) sectors.

00 3E : 3rd and 4th bytes indicate the memory storage address (in RAM) of the sectors to load (these first 6 bytes are also stored in memory at this address). These 2 bytes constitute the BOOTAD vector. In our example, the 3 sectors are to be stored starting from the address $3E00.

10 3E: the 5th and 6th bytes are copied in the Atari DOSINI vector. In our example, the address $3E10 is stored in this vector.

3. Execution of the boot program:

Once the number of DBSECT sectors is loaded into memory, the operating system (OS) run the first instruction of the loaded program. This first instruction is at the address: value of storage + 6 , i.e. (BOOTAD) + 6. Therefore this address is $3E06 in our example. This launching of the program execution is done through a JSR instruction, therefore in our example a JSR $3E06 is executed.

If a RTS instruction is encountered while running the code, then the operating system (OS) tests the 6502 processor carry flag. If the carry is set (1), then the message ''BOOT ERROR'' will be displayed on the screen. If the carry is clear (0), then the operating system (OS) executes a JSR (DOSINI) instruction, that is to say a JSR $3E10 in our example.

If a new RTS instruction is encountered again while running the code, then the operating system executes a JMP(DOSVEC) instruction. The Atari DOSVEC vector must thus be previously initialized by the Atari boot program.

The JMP (DOSVEC) instruction ends the action of the operating system (OS) and leaves the ''hand'' to the Boot program definitively. The stack pointer of pile is then set to the top, i.e. re-initialized to $FF.

 

[Page Top]

To contact me:/Pour me contacter: M'envoyer un EMail

[ Retour Sommaire Documentation Technique/Back to the Technical Issues Index]

[ Back to My Atari Site Index/Retour vers Mon Index Site Atari]

[Site Philippe Index Principal]

PVBest's Atari 8bit website

This page © PVBest 2002
Atari is a registered trademark / Atari est une marque déposée.
MS-DOS and Windows are registered trademarks of Microsoft Corp / MS-DOS et Windows sont des marques déposées de Microsoft Corp.
All Software names are registered by their owner / Les noms de logiciel appartiennent à leur auteur
.
If you have any comments or anything to tell me about the content of this page please contact me Webmaster [PVBest@free.fr]
Pour tous commentaires ou suggestions sur le contenu de cette page contactez-moi Webmaster [PVBest@free.fr]