home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / atari / 8bit / 5932 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  2.7 KB

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