Sharp OZ-707 Operation Manual - Page 99
On Key Gosub
![]() |
UPC - 074000012141
View all Sharp OZ-707 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 99 highlights
ON KEY GOSUB p FORMAT: ON KEY GOSUB {line number 1} {line number 2} *Iabel 1 ' *label2 ,... , line number 20} {*label20 4bbrev;ation: O. KE. GOS. See Also: KEY (n) ON/OFF, ON...GOSUB, GOSUB...RETURN PURPOSE: )efines the interrupt service line for a transparent guide key. qEMARK5: )N KEY GOSUB command passes execution to the line with the line lumber given by this command when a transparent guide key with the .ey number given in the KEY (key number) ON command is pressed. .ine number 1 gives the first line of the interrupt service routine to vhich execution is passed when transparent guide key 1 is pressed; ine number 2 gives the line to which execution is passed when ransparent guide key 2 is pressed, and so on. Jse commas to separate line numbers. No line numbers need be ;pecified for keys which are not ON, but the comma separator is lecessary. If guide key n is the highest guide key used, n-1 commas lre required. Line numbers may also be specified with *Iabels. An !rror occurs if a specified line was not found. lince interrupt service is executed in a subroutine, the last line of Ivery routine must be a RETURN statement. :XAMPLE: 10: CLS: A=O:WAIT 20: KEY (2)ON :KEY (4)ON 30: KEY (10)ON :KEY (16)ON 40: ON KEY GOSUB ,80"90"""100,,,,..110 50: A=A+1 60: WAIT :LOCATE 2,0:PRINT A 70: GOTO 50 80: WAIT 10:LOCATE O,2:PRINT "key 2":RETURN 90: WAIT 10:LOCATE 0,2:PRINT "key 4":RETURN 00: WAIT 10:LOCATE 0,2:PRINT "key10":RETURN 10: WAIT 10:LOCATE 0,2:PRINT "key16":RETURN 186 OPEN P D FORMAT: 1. OPEN "d:filename" FOR mode AS # file number d: E, PACOM, CAS 2. OPEN "baud rate, parity, word length, stop bit, type of code, delimiter, end-of-file code, XON, shift code" AS # file number 3. OPEN Abbreviation: OP. See Also: CLOSE, OPEN$ PURPOSE: Opens a file or the serial 1/0 interface for data transfer. REMARKS: Format 1 opens the file specified by "d:filename" for use with the specified file number. Subsequent input/output to the file is accomplished by referring to the file number. Formats 2 and 3 allow data to be transferred through the serial 1/0 interface (COM). The file number must be from 1 to 255. A maximum of two files on any devices may be opened at the same time. Only the following device combinations are possible: E E 0 PACOM 0 CAS 0 COM*' 0 PACOM 0 x x 0 CAS 0 x x 0 COM* 0 0 0 x 0 : may be opened at the same time. x : may not be opened at the same time. • To open files on the device COM and another device at the same time. open the file on the device COM first. Note: When executing the SAVE, LOAD, CHAIN, or MERGE statement, the Card opens one file automatically. In format 1, "mode" specifies the method of access to the file, as follows: INPUT Specifies sequential input from an existing file. OUTPUT Specifies sequential output to a device or file. APPEND Specifies addition to a sequential file. 187
![](/manual_guide/products/sharp-oz707-operation-manual-7aa0508/99.png)