home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!ohstpy!miavx1!rlcollins
- Newsgroups: comp.sys.atari.8bit
- Subject: Re: File Headers.
- Message-ID: <1993Jan22.002215.15197@miavx1.acs.muohio.edu>
- From: rlcollins@miavx1.acs.muohio.edu (Ryan 'Gozar' Collins)
- Date: 22 Jan 93 00:22:15 -0500
- References: <1jjps0INNek1@nz12.rz.uni-karlsruhe.de> <C16AKJ.3CI@mentor.cc.purdue.edu>
- Organization: Miami University Academic Computer Service"
- Lines: 43
-
- In article <C16AKJ.3CI@mentor.cc.purdue.edu>, smb@pern.cc.purdue.edu (Scott M. Ballew) writes:
- > In article <1jjps0INNek1@nz12.rz.uni-karlsruhe.de> UJ1G@DKAUNI2.BITNET (Marek Tomczyk) writes:
- >>> What determines if it runs or returns to DOS?
- >>In order to automatically run a program you should specify a
- >>starting address. This starting address is stored into the
- >>memory locations $02E0-$02E1. An initiation address should be
- >>written into $02E2-$02E3 (it could be vice versa, I don't have my
- >>notes with me).
- >>
- >>> If you chain (by appending) files together, Which one gets control?
- >>
- >>Very simple, that one whose address is stored in the $02E0 vector.
- >>You could specify an init address somewhere in the middle of the
- >>chained file. Then DOS jumps to this routine. In order to continue
- >>loading you have to exit your init routine with an RTS instruction.
- >
- > You missed a very important subtlety in this system. First, there
- > is a difference between the RUN address and the INIT address (and I,
- > too, cannot remember which is at $2E0-2E1 vs $2E2-2E3). When DOS
- > loads the INIT address, it does a jsr to that address _immediately_
- > (without continuing the load). When that code does and rts to DOS,
- > DOS picks up with the load where it left off. This means that you can
- > have multiple INIT addresses strewn through your load file and they
- > are treated like subroutines to the load process (be sure the code
- > they run has already been loaded, though :-). In the case of the RUN
- > address, only the last value stored here matters. This is the one
- > that DOS jsr's to _after_ the load is complete.
- >
- > Now, can someone with a memory map handy verify which address is
- > which? I'm not sure where my memory map is.
-
- $2E0-2E1 (736-737) is RUNAD for run address.
- $2E2-2E3 (738-739) is INITAD.
-
- Later.......
-
- ------======={{{{{{{{((((((Ryan 'Gozar' Collins))))))))}}}}}}}}=======--------
- "You can never own enough / __ ___ ___ \rlcollins@miavx1.acs.muohio.edu
- computer equipment" / / / / / / \RC1DSANU@miamiu.acs.muohio.edu
- / / _ / / / \rcollins@apsvax.aps.muohio.edu
- ||| "Power Without / /__/ /__/ /___ \ R.COLLINS1 on GEnie
- / | \ The Price" / \
- ------======={{{{{{{{(((((())))))))}}}}}}}}=======----- 22-JAN-1993
-