Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!nrl-cmf!cmcl2!rutgers!iuvax!bsu-cs!cfchiesa From: cfchiesa@bsu-cs.UUCP (Christopher Chiesa) Newsgroups: comp.sys.atari.8bit Subject: Re: boot disks Message-ID: <2538@bsu-cs.UUCP> Date: 2 Apr 88 08:34:22 GMT References: <8803290341.AA03091@mitre-bedford.ARPA> Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 75 Summary: Some additional information In article <8803290341.AA03091@mitre-bedford.ARPA>, jhs@MITRE-BEDFORD.ARPA writes: [introductory text omitted; remaining text edited for brevity and to satisfy the line-counter... grrr...] > .. brief description of the boot process. ... O/S will read the first sector > of the disk into memory starting at address $0700 and then will look... to > determine how to proceed. The first few bytes of data loaded have the > following meanings: > > $0700 BFLAG Flag (normally 0) > $0701 BRCNT Boot Record Count (nr of consec sectors to read into > memory for boot record (typically 3). > $0702 BLDADR Boot Load Address, i.e. where to put the stuff. > $0704 BIWTARR Initialization address > $0706 JMP XBCONT This is an actual jump instruction followed by > a 2-byte address indicating where to go. According to the Atari Operating System User's Manual, these six bytes are ALL you need concern yourself with for a pure autoboot disk; the remaining bytes are specific to the DOS 2.0 boot process, which the OS User's Manual cites specifically as a "special case of diskette-booted software." > $0709 SABYTE Number of sector buffers to allocate > $070A DRVBYT Bit map of the disk drive unit numbers to plan for. > $070B Unused > $070C SASA Buffer Start Address > $070E DFSFLG DOS Flag > $070E DFLINK Sector at which DOS.SYS starts > $070F BLDISP Displacement in sector to sector link (differs for > DD versus SD disk format). > $0712 DFLADR Address for loading DOS.SYS file. > [interpretation of byte functions omitted] This set of locations are DOS-related ONLY, and aren't significant to the boot process itself. They can, and often do, contain executable code. The special functions above are valid only when the program to be booted is the DOS.SYS portion of DOS 2.0. [process description omitted] > (you can autoboot a program...) up to 256 sectors long, so long as the > sectors are contiguous. If it is longer or non-contiguous, you will have to > provide code to read the sector links and figure out where to go for the next > sector. This is important to remember, because the boot process doesn't use the concept of "files" on the disk; unless you load in your own file management software, too, you won't be ABLE to access the disk as files -- no directory, no VTOC, will exist except as managed by YOUR program. The built-in disk handler in the computer operates ONLY at the SECTOR level. > > I hope this is enough to get you started. I also hope it is true. I am > playing back what they say in "Inside Atari DOS", which pertains to DOS 2.0S. > Your DOS may differ, depending on road conditions and your style of driving. > I'm sure there are other readers of this august journal who can give you > the benefit of their greater experience with how it all REALLY works. As far as I can tell, John got it right. In fact, his posting is so con- cise that it obviates any need for me to duplicate his effort by posting my own long-winded version. On the other hand, I remember being EXTREMELY confused and uninformed by manuals explaining things by saying "load stuff starting at LDADR and then jump through DOSINI" or whatever; if there's anyone reading this who doesn't follow the notation, make sure you speak up. I hated that more than anything, but had to bull through it without benefit of the net; as a result, progress has been slow... you have a chance to do better, so take advantage! > > -John Sangster / jhs@mitre-bedford.apra -- UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!cfchiesa cfchiesa@bsu-cs.UUCP