: INTTEST.BAS by Jack Thompson, Copyright 1986 (modified for Tqndy 600): From Heath Users Group SIG courtesy Jack ThompsonW This program makes use of the DBSYSINT function to exercisex machine interrupt routines***************************************************** ***WARNING*** calling certain interrupts can cause a crash'  of the machine necessitating a cold restart._  do not use this program unless all critical files  have been uploaded to another computer!!! ***************************************************   "utility.lib" %$ & setup a string containing the register namesK (REGS$"AXBXCXDXSIDIBPESDSFLCSSSSP"Q / 0 initialize the source and return register strings to blanks 2 I% :SREGS$SREGS$" ": I%:RREGS$SREGS$ 9 : use QREGS to initialize the values in the source register string.* < QREGS(SREGS$)0 Ck D the MODE% variable is used to control whether or not E the subroutine that inputs hex values from the keyboard F will accept just a return to indicate keep the previous G value. If MODE%=0 then a new value must be input$ Md N setup the message string for the hex input routine to ask O for the interrupt to be tested. PMSG$"Enter Interrupt # in hex (00 to FF): ":MODE%:  W X this code is executed after the first run of the program+ ZMODE%:ANSWER%SYSINT%:H d "Current Interrupt= ";e n ("00"(ANSWER%),) xMSG$"Enter new Interrupt # in Hex (00 to FF) or RETURN to keep the same one: " MAX%:  SYSINT%ANSWER% C%   ' get new values if any for the registers.GANSWER%((SREGS$,C%,)):"Current ";(REGS$,C%,);" Value=";("0000"(ANSWER%),)MSG$"Enter New Hex Value(0000-FFFF) or RETURN to keep present Value: "MODE%:MAX%: (SREGS$,C%,)(ANSWER%) C%G prepare to execute the interrupt.k: "Press any key to execute."A$: (A$)  DBSYSINT(SYSINT%,SREGS$,RREGS$) print the register values sent and returned" SENT","RETURNED" I%  1 (REGS$,I%,);"=";]" ("0000"(((SREGS$,I%,))),),, ("0000"(((RREGS$,I%,))),)6 I%@ I%   J (REGS$,I%,);"=";T ("0000"(((RREGS$,I%,))),),^ ("0000"(((RREGS$,I%,))),)!h I%7r " FLAGS=",b| ("0000"(((RREGS$,,))),)l ZTHIS SUBROUTINE PRINTS THE CONTENTS OF MSG$ AS A PROMPT  then inputs a hex response MAX% indicates the length# that the response should be. MODE% determines if a nullA response is acceptable.M MSG$;] ANSWER$ (ANSWER$) MODE%  (ANSWER$) MAX% :  I% MAX%C$(ANSWER$,I%,) C$ "a" C$ "f" C$((C$) ) C$ "0" : / C$ "F" : Q C$ "9" C$ "A" : i(ANSWER$,I%,)C$r I%ANSWER%("&H"ANSWER$)