$m1000 ! Reserve 1000 bytes storage space. ap_id&=APPL_INIT() ! Declare program a GEM application and get an ' ! application ID. IF ap_id&=0 ! If it's NOT started as an accessory, @u_ram ! run the routine (as a program) END ! and then end the program. ENDIF me_id&=MENU_REGISTER(ap_id&," UncleRam 3 ") ! Pass the ACCs name to GEM ' ! and get a menu ID number. DO ! Start an endless loop. ~EVNT_MESAG(0) ! Scan the message buffer. IF MENU(1)=40 ! If selected from menu @u_ram ! run the routine, ENDIF LOOP ! otherwise keep looping and scanning the buffer. PROCEDURE u_ram adr%=LPEEK(&H4F2) ! Get location of TOS version and date c$=HEX$(DPEEK(adr%+2)) ! Isolate TOS version and assign "value" to c$ d$=HEX$(LPEEK(adr%+24)) ! Isolate TOS date and assign "value" to d$ MODE 1 ! Display TIME$ and DATE$ in MODE 1 z$="[0][ Free RAM: "+STR$(MALLOC(-1))+" | TOS Version: "+c$+" | TOS Date: "+d$+"| Time: "+TIME$+" | Date: "+DATE$+" ][ Cold | Warm | Exit ] " rr%=FORM_ALERT(3,z$) ! Place ALERT box on screen IF rr%=1 ! Cold reboot SLPOKE &H420,0 SLPOKE &H426,0 SLPOKE &H43A,0 ~XBIOS(38,L:LPEEK(4)) ELSE IF rr%=2 ! Warm reboot ~XBIOS(38,L:LPEEK(4)) ENDIF ' If you select EXIT, rr% will equal 3, in which case nothing happens and ' you are returned to the loop. RETURN