Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!pro-exchange.cts.com!rich From: rich@pro-exchange.cts.com (Rich Sims) Newsgroups: comp.sys.apple Subject: Re: IIgs Software Reboot Message-ID: <15960.apple.info-apple@pro-exchange> Date: 14 Dec 89 04:32:28 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 37 In-Reply-To: message from Les_Ferch@MTSG.UBC.CA > I need a routine that will reboot a IIgs in the same way that > pressing Control-Apple-Reset does. I already have the program > sreset.sys, but it's just a little too severe for my needs because > it clears the /RAM5 volume. > My thanks in advance for anyone who can post Hex, > assembler, or Applesoft code that will do the trick. OK, hex, assembler, or Applesoft (not in that order) Applesoft: POKE 1012,0 : CALL 64098 8-bit hex/assembler: 92 F4 03 STZ 03F4 4C 62 FA JMP FA62 Now it gets tricky.... full native mode..... I don't know an "elegant" way that's quick, easy, and that will always work - I'd use the exact same code as shown in the 8-bit mode above, but kick in emulation mode first! :-) All that stuff does exactly the same thing -- zaps the power-up byte and calls a reset routine in the monitor -- it ought to work on any GS that can still emulate an Apple II, but I've only checked it on my ROM 01 machine. Non-GS owners can do exactly the same thing - but the 6502 doesn't understand the STZ instruction, so you'll have to store the 0 with an LDA-STA pair. An INC or DEC should also work, since all you should "really" have to do is *change* the value at $03F4, not necessarily zero it. -Rich Sims- UUCP: crash!pro-exchange!rich ARPA: crash!pro-exchange!rich@nosc.mil INET: rich@pro-exchange.cts.com