[comp.sys.amiga.tech] What's the details of the Boot Proceedure?

chymes@fribourg.csmil.umich.edu (Charles Hymes) (07/29/90)

Its a shame that I have to do this, but because this COULD be
sensitive info:
I hearby swear that I am a responcible, honest person, and that I will
not do anthing illeagal, immoral, or malicious with any information
that is given to me on this subject.

There, with that out of the way,

I am trying to figure out what is going on with the boot code of
several programs, including the standard AmigaDos bootblock.
I need to know:

 (A) Exactly what byte does the code start running at? The RKM 1.3 says
	"location 12" but is that in decimal or Hex? Some code seems to
	alreald have run some stuff before the code at 12, decimal starts.
	Also, what is in that word after the bootblock checksum?

 (B) What do the 68k registers contain when the boot block code is loaded
	and run? Especially the Address registers, Particulary A6.

 (C) Where is the bootblock loaded into? The RKM 1.3 manual says that
	it is arbitrary, but two of the first lines in the boot code on
	one autobooting disk are:
		PHA $10?? ( I dont remember these two addresses)
		PHA $2???
	It seems that this code is relying on finding something in
	memory already in those locations. What could they be? Is this area of
	memory written into by the load boot block procedure?

Thanks for your much needed help.

Please email me here, 


Charlweed Hymerfan (A Major Dude)

Home    current: 816 packard st  Ann Arbor MI 48104 (313) 662-2104
        perm:    5454 Olive Street, San Diego CA 92--- (619) 262-2824
Work    C.S.M.I.L: room 2420busad,  (313)-764-6715,
                701 Tappan Street,Ann Arbor Michigan 48109-1234
        Psychology: Perry Building, (313)-747-3699,
                330 Packard st, Ann Arbor Michigan 48109

jms@tardis.Tymnet.COM (Joe Smith) (08/14/90)

In article <1990Jul28.175504.8763@csmil.umich.edu> chymes@fribourg.csmil.umich.edu (Charles Hymes) writes:
>I am trying to figure out what is going on with the boot code of
>several programs, including the standard AmigaDos bootblock.
>I need to know:
> (A) Exactly what byte does the code start running at? The RKM 1.3 says
>	"location 12" but is that in decimal or Hex? Some code seems to
>	alreald have run some stuff before the code at 12, decimal starts.
>	Also, what is in that word after the bootblock checksum?

The RKM also refers to devs/bootblock.h, which says:
	struct BootBlock {
		UBYTE bb_id[4];	   /* 'D','O','S','\0' or 'D','O','S','\1' */
		LONG  bb_chksum;   /* checksum */
		LONG  bb_dosblock; /* reserved for DOS patch */
	}  /* These are bytes 0-11, execution starts with byte 12 (decimal) */

> (B) What do the 68k registers contain when the boot block code is loaded
>	and run? Especially the Address registers, Particulary A6.

A1 points to an I/O request to the trackdisk.device, no other registers are
specified in the RKM.  Because the the code returns, A7 can be assumed to
be a valid stack pointer.  Don't know about A6.

> (C) Where is the bootblock loaded into? The RKM 1.3 manual says that
>	it is arbitrary, but two of the first lines in the boot code on
>	one autobooting disk are:
>		PHA $10?? ( I dont remember these two addresses)
>		PHA $2???

PHA is an opcode for a 6502 processor (Commodore-64), not a 68000 (Amiga).
Looks like you're using the wrong disassembler.  The 68000 does handle
position independent code.
-- 
Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-C41    | BIX: smithjoe | 12 PDP-10s still running! "POPJ P,"
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga speaks for me."