home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.apple2
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!caen!destroyer!cs.ubc.ca!unixg.ubc.ca!kakwa.ucs.ualberta.ca!acs.ucalgary.ca!cpsc.ucalgary.ca!debug!griffin!dockery
- From: dockery@griffin.cuc.ab.ca (Sean Dockery)
- Subject: stable method of calling RESET code question
- Message-ID: <C0Av7A.CIF@griffin.cuc.ab.ca>
- Organization: Synchrotron Software Group, Calgary, Alberta
- Date: Sun, 3 Jan 1993 22:45:09 GMT
- Lines: 47
-
- I have come across a little dilemma regarding the method of calling
- the RESET code that is portable between all Apple II machines.
-
- As for why I want to do this...
-
- While working on the assembly language end of a BASIC based bulletin
- board program, it is absolutely necessary that there is a way of
- protecting against all users (except the system administrator) from
- entering BASIC either by accident or by design.
-
- While intercepting input through a routine of my own, I keep track of
- the state of input (be it from the keyboard, exec file, or deferred
- mode via the STATE flag ($BE42) in the BASIC.SYSTEM global page.)
-
- In the event that there is an illegal entry to BASIC by a normal user,
- I have set up the routine so that it will disconnect with the user,
- decrement the PWREDUP byte (at $03F4) to fool the computer into
- thinking that there is a cold boot about to occur (hopefully an
- infallible way to minimize downtime and potential damage by malicious
- users,) and call the RESET code to reboot the computer. (I have to
- say here that no one plans on writing programs which won't recover
- from all errors, but better safe than sorry.) I thought that by using
- the RESET code of the computer, it would avoid the ambiguous choice of
- what drive to reboot (via a JMP $Cx00.)
-
- Now, that I have explained WHY I want to do this...
-
- There is more than one method of calling the RESET code, and I am
- curious as to which method would be the best to use so that the
- program will be completely portable between machines.
-
- The two possible methods which I know of to call the RESET code are:
-
- 1) do a JMP ($FFFC), or
- 2) do a JMP $FA62
-
- Simply put, which method is safer/better? Is there any difference?
-
- I hope that someone from Apple, Inc. will enlighten me as to which
- method (if either) should be used [the standard] and possibly why.
-
- sean
- --
- # internet: dockery@griffin.cuc.ab.ca | "alone. death can't hold a candle
- # -or- dockery@pro-calgary.cts.com | to it, and hell is a poor synonym"
- # pro-line: dockery@pro-calgary | -stephen king
- # uucp: crash!pro-calgary!dockery | disclaimer: i am unemployed
-