home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / apple2 / 26338 < prev    next >
Encoding:
Text File  |  1993-01-04  |  2.5 KB  |  57 lines

  1. Newsgroups: comp.sys.apple2
  2. 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
  3. From: dockery@griffin.cuc.ab.ca (Sean Dockery)
  4. Subject: stable method of calling RESET code question
  5. Message-ID: <C0Av7A.CIF@griffin.cuc.ab.ca>
  6. Organization: Synchrotron Software Group, Calgary, Alberta
  7. Date: Sun, 3 Jan 1993 22:45:09 GMT
  8. Lines: 47
  9.  
  10. I have come across a little dilemma regarding the method of calling
  11. the RESET code that is portable between all Apple II machines.
  12.  
  13. As for why I want to do this...
  14.  
  15. While working on the assembly language end of a BASIC based bulletin
  16. board program, it is absolutely necessary that there is a way of
  17. protecting against all users (except the system administrator) from
  18. entering BASIC either by accident or by design.
  19.  
  20. While intercepting input through a routine of my own, I keep track of
  21. the state of input (be it from the keyboard, exec file, or deferred
  22. mode via the STATE flag ($BE42) in the BASIC.SYSTEM global page.)
  23.  
  24. In the event that there is an illegal entry to BASIC by a normal user,
  25. I have set up the routine so that it will disconnect with the user,
  26. decrement the PWREDUP byte (at $03F4) to fool the computer into
  27. thinking that there is a cold boot about to occur (hopefully an
  28. infallible way to minimize downtime and potential damage by malicious
  29. users,) and call the RESET code to reboot the computer.  (I have to
  30. say here that no one plans on writing programs which won't recover
  31. from all errors, but better safe than sorry.)  I thought that by using
  32. the RESET code of the computer, it would avoid the ambiguous choice of
  33. what drive to reboot (via a JMP $Cx00.)
  34.  
  35. Now, that I have explained WHY I want to do this...
  36.  
  37. There is more than one method of calling the RESET code, and I am
  38. curious as to which method would be the best to use so that the
  39. program will be completely portable between machines.
  40.  
  41. The two possible methods which I know of to call the RESET code are:
  42.  
  43.     1) do a JMP ($FFFC), or
  44.     2) do a JMP $FA62
  45.  
  46. Simply put, which method is safer/better?  Is there any difference?
  47.  
  48. I hope that someone from Apple, Inc. will enlighten me as to which
  49. method (if either) should be used [the standard] and possibly why.
  50.  
  51. sean
  52. -- 
  53. # internet: dockery@griffin.cuc.ab.ca   | "alone.  death can't hold a candle
  54. #      -or- dockery@pro-calgary.cts.com |  to it, and hell is a poor synonym"
  55. # pro-line: dockery@pro-calgary         |                       -stephen king
  56. #     uucp: crash!pro-calgary!dockery   | disclaimer: i am unemployed
  57.