***************************************************************************

	N88-BASIC / Be88-BASIC
		English reference manual (Commands)
			by SHINTA

***************************************************************************



===== Quick description =====

 This document is a command reference about N88-BASIC or Be88-BASIC.
 This may include something unsupported by Be88-BASIC, supported by only N88-BASIC.
 See reference book of N88-BASIC for more information.



===== Overview =====


[ Commands for running programs ]

Run


[ File operation ]

FILES


[ General commands ]

CHAIN
DATA
DEF FN
DEFINT / DEFSNG / DEFDBL / DEFSTR
DIM
END
FOR ~ TO ~ STEP ~ NEXT
GOSUB
GOTO / GO TO
IF ~ THEN ~ ELSE / IF ~ GOTO ~ ELSE
LET
ON ~ GOSUB / ON ~ GOTO
OPTION BASE
RANDOMIZE
READ
REM
RESTORE
RETURN
STOP
SWAP
WHILE ~ END


[ Text screen ]

CLS
[1] COLOR
COLOR@
CONSOLE
LOCATE
PRINT
PRINT USING
WRITE


[ Graphic screen ]

CIRCLE
CLS
[2] COLOR
GET@
LINE
[1] PAINT
POINT
PRESET
PSET
PUT@
ROLL
SCREEN


[ 1-byte string ]

MID$


[ File control ]

CLOSE
INPUT#
LINE INPUT#
OPEN
PRINT#
WRITE#


[ Key control ]

HELP ON / OFF / STOP
INPUT
INPUT WAIT
KINPUT
LINE INPUT
LINE INPUT WAIT
ON HELP GOSUB


[ I/O port ]

BEEP


[ Sound control ]

PLAY
PLAY ALLOC



===== Legend =====

* Description * says the action in easy.
* Format * is general format. Items inserted between [ and ] is abbreviate.
* Example * is cencrete expression. You can copy and paste these strings to Main Window and run ( probably ...).



===== Reference =====


[ BEEP ]

* Description *	Make beep sounds.
* Format *		BEEP [<Switch>]
* Example *		BEEP

 If switch is 1, beep is on. If switch is 0, beep is off.
 If switch is abbreviated, beep is on in 0.5 seconds.


[ CHAIN ]

* Description *	Run saved program.
* Format *		CHAIN [MERGE] <File name> [,<Line number>] [,ALL ] [,DELETE <Range>]
* Example *		CHAIN MERGE "SAMPLE.BAS",3000,ALL,DELETE 200-250

(1) Without MERGE option

 The program in Main Window is cleared, and, the program specified as <File name> is loaded, and run.
 Program is run from <Line number> or from begining if <Line number> is abbreviated.

(2) With MERGE option

 Two programs in Main Window and <File descriptor> are merged and run.


[ CIRCLE ]

* Description *	Draw circle or ellipse.
* Format *		CIRCLE |  (Wx, Wy)  | ,<Radius> [,<Palette 1>] [,<Start angle>] [,<End angle>] [,<Ratio>] [,F [, |  <Palette 2>  | ]]
				       | STEP(x, y) |                                                                            | <Tile string> |
* Example *		CIRCLE (100, 100), 50, 5, 3.14, 6.28
				CIRCLE STEP(20, -60), 30,,,, 1.5, F

 Stroke circle. Center position is (Wx, Wy), radius is <Radius>.
 Color is <Palette 1>.
 If <Start angle> and <End angle> is specified, stroke arc. Angle's unit is radian.
 If <Ratio> isn't 1, draw ellipse.
 If F option is specified, fill circle. Fill color is <Palette 2>


[ CLOSE ]

* Description *	Close file.
* Format *		CLOSE [[#]<File number> [,[#]<File number>] ... ]
* Example *		CLOSE #1, #3, #5

 CLOSE close files opened by OPEN.
 If <File number> is abbreviated, all files are closed.


[ CLS ]

* Description *	Clear active screen.
* Format *		CLS [<Function>]
* Example *		CLS 3

 If <Function> is 1 or abbreviated, clear only text screen.
 If <Function> is 2, clear only graphic screen.
 If <Function> is 3, clear text and graphic screen.


[ [1] COLOR ]

* Description *	Specify colors.
* Format *		COLOR [<Function code>] [,<Background color>] [,<Border color>] [,Foreground color> [,<Palette mode>]
* Example *		COLOR 4,0,0,7

 <Function code> is text color.
  0: Black, 1: Blue, 2: Red, 3: Purple, 4: Green, 5: Sky blue, 6: Yellow, 7: White
 <Background color> is background color of graphic screen. Specify with palette number. CLS clears graphic screen with this color.
 <Border color> has no effect.
 <Palette mode> has no effect currently.


[ [2] COLOR ]

* Description *	Change color of palette.
* Format *		COLOR[=(<Palette number>, <Color code>)]
* Example *		COLOR=(8,&HFAA)

 <Palette number> specifies palette's number, whose color is changed.
 <Color code> specify color. 0~ 4096. If you specify as hex (&Hxxx), its order is GRB.
 
 
 [ COLOR@ ]

* Description *	Set new color to the text that is already printed.
* Format *		COLOR@ (X1, Y1)-(X2, Y2) [,<Function code>]
* Example *		COLOR@ (10, 10)-(20, 12), 6

 COLOR@ changes color of the text in the rectangle (X1, Y1)-(X2, Y2) to <Function code>.
 If <Function code> is abbreviated, 7 ( white ) is taken.
 <Function code> is same as [1] COLOR.


[ CONSOLE ]

* Description *	Set text screen mode.
* Format *		CONSOLE [<Scroll begin line>] [,<Num of screen lines>] [,<Function key show switch>] [,<Color/Mono switch>]
* Example *		CONSOLE 3,10,0,1

 Set scroll area to <Num of screen lines> begining at <Scroll begin line>. CLS clears only scroll area.
 <Function key show switch> has no effect currently.
 <Color/Mono switch> has no effect currently.


[ DATA ]

* Description *	Define number/string constants to be read by READ.
* Format *		DATA <Constant> [,<Constant> ...]
* Example *		DATA Test,"Happy birthday!",1000,2000

 Separator between constant and constant is comma.
 If you want to specify string which includes comma, period, or space, put the string between double quotes.
 You can put any number of DATA in program.


[ DEF FN ]

* Description *	Define user defined function.
* Format *		DEF FN<Name> [(<Parameter list>)]=<Definition>
* Example *		DEF FNMYFUNC(X, Y)=3*X+SIN(Y)

 Space is needed between DEF and FN.


[ DEFINT / DEFSNG / DEFDBL / DEFSTR ]

* Description *	Set default variable type.
* Format *		1) DEFINT <Char range> [,<Char range> ...]
				2) DEFSNG <Char range> [,<Char range> ...]
				3) DEFDBL <Char range> [,<Char range> ...]
				4) DEFSTR <Char range> [,<Char range> ...]
* Example *		DEFINT A-C, I, J

 Variable type is usually specified by suffix. % is INT, ! is SNG, # is DBL, $ is string.
 But no suffix is specified, default variable type specified by DEFINT / DEFSNG / DEFDBL / DEFSTR is used. Variable whose name is begin at <Char range> is INT (DEFINT), SNG (DEFSNG), DBL (DEFDBL), STR (DEFSTR). For example, DEFINT A make variables named AAA, ABC, AIR ... type INT.


[ DIM ]

* Description *	Set array size.
* Format *		DIM <Variable name> (<Max subscript> [,<Max subscript> ...]) [,<Variable name> (<Max subscript> [,<Max subscript> ...]) ...]
* Example *		DIM VAR(10,10), STRARRAY$(20)

 DIM sets array size.


[ END ]

* Description *	Quit program.
* Format *		END
* Example *		END

 You can put any number of END in program.


[ FILES ]

* Description *	Print files in the drive ( drive folder ).
* Format *		FILES [<Drive number>]
* Example *		FILES 2

 If <Drive number> is abbreviated, 1 is taken.


[ FOR ~ TO ~ STEP ~ NEXT ]

* Description *	Loop
* Format *		FOR <Variable name>=<Initial value> TO <End value> [STEP <Step>]
				 ...
				NEXT [<Variable name>] [,<Variable name>...]
* Example *		FOR I=1 TO 10
				 FOR J=5 TO 1 STEP -1
				  ...
				NEXT J,I

 Variable's value is <Initial value> at first. FOR ~ NEXT loops until variable's value change to <End value>.
 After NEXT, <Step> is added to variable.


[ GET@ ]

* Description *	Copy graphic on screen to variable.
* Format *		GET[@] (Sx1, Sy1)-| (Sx2, Sy2)|, <Variable name>[<Subscript>]
				                  |STEP (x, y)|
* Example *		GET@ (0, 0)-(31, 31), BOSS

 Copy graphic in the rectangle (Sx1, Sy1)-(Sx2, Sy2) to variable.


[ GOSUB ]

* Description *	Call sub routine.
* Format *		GOSUB <Line number>
* Example *		GOSUB 1000
				GOSUB *MYSUB

 You can use label name instead of <Line number>.


[ GOTO / GO TO ]

* Description *	Jump.
* Format *		1) GOTO <Line number>
				2) GO TO <Line number>
* Example *		GOTO 2000
				GO TO *GAMEOVER

 You can use label name instead of <Line number>.


[ HELP ON / OFF / STOP ]

* Description *	Allow / Forbid / Stop interrupt by HELP ( End ) key.
* Format *		1) HELP ON
				2) HELP OFF
				3) HELP STOP
* Example *		HELP ON

1) Allow interrupt by HELP ( End ) key. If HELP key is pressed, program goes the routine specified by ON HELP GOSUB.
2) Forbid interrupt by HELP key.
3) Stop interrupt by HELP key. Program doesn't go to HELP routine even if HELP key is pressed. But, program goes to HELP routine on HELP ON.


[ IF ~ THEN ~ ELSE / IF ~ GOTO ~ ELSE ]

* Description *	Branch by logical expression.
* Format *		1) IF <Logical expression> THEN |  <Statement>  | [ELSE |  <Statement>  | ]
				                                | <Line number> |       | <Line number> |
				2) IF <Logical expression> GOTO <Line number> [ELSE |  <Statement>  |
				                                                    | <Line number> |
* Example *		IF INKEY$<>"" THEN PRINT "START!"
				IF TERM=-1 GOTO *CLR

 If <Logical expression> is true ( except for 0 ), execute THEN or GOTO. Otherwise, execute ELSE.


[ INPUT ]

* Description *	Store data inputted by user to variable.
* Format *		INPUT [<Prompt sentence> |;|] <Variable> [,<Variable>...]
				                         |,|
* Example *		INPUT NUM
				INPUT "Your name";NAM$

 When INPUT is executed, program waits for input from keyboard.
 <Prompt sentence> specify message shown before input. If ';' is followed, '?' is shown next to <Prompt sentence>.
 If multiple variables are specified, user must input multiple data that are separated by comma (;).


[ INPUT# ]

* Description *	Store data from file to variable.
* Format *		INPUT #<File number>, <Variable name>, [,<Variable name>...]
* Example *		INPUT #1, ADDR, NAM$, BIRTHDAY

 <File number> specifies the number specified by OPEN.
 If data to be stored are number, they must be separated by space, comma, or return(CHR$(13)). If data to be stored are string, they must be separeted by comma or return(CHR$(13)).


[ INPUT WAIT ]

* Description *	Store data inputted by user to variable with time limit.
* Format *		INPUT WAIT <Time limit>, [<Prompt sentence> |;|] <Variable> [,<Variable>...]
				                                            |,|
* Example *		INPUT WAIT 100, "Some animal: ", ANIM$

 INPUT WAIT is same INPUT except for time limit.
 The unit of time limit is 0.1 second.


[ KINPUT ]

* Description *	Store data inputted by user to variable. Data is converted to 2-byte character.
* Format *		KINPUT <Variable name>
* Example *		KINPUT TXT$

 KINPUT is similar to INPUT. The difference is that data inputted by user is converted to 2-byte character.


[ LET ]

* Description *	Assign data to variable.
* Format *		[LET] <Variable name> = <Expression>
* Example *		LET A=2*B+50
				B$=LEFT$(C$,5)

 You can abbreviate LET.


[ LINE ]

* Description *	Draw line or rectangle.
* Format *		LINE [| (Wx1, Wy1) |]-| (Wx2, Wy2) | [,<Palette number 1>] [,|B |] [,|   <Line style>   |]
				      |STEP(x1, y1)|  |STEP(x2, y2)|                         |BF|    |<Palette number 2>|
				                                                                     |   <Tile string>  |
* Example *		LINE (50, 50)-(200, 70), 3
				LINE (200, 10)-STEP(5, 50), 4, BF, 7

 Stroke line from (Wx1, Wy1) to (Wx2, Wy2).
 <Palette number 1> specifies the line color.
 If B option is specified, stroke rectangle, not line. If BF option is specified, fill rectangle.
 <Palette number 2> specifies the fill color. <Line style> and <Tile string> have no effect currently.


[ LINE INPUT ]

* Description *	Store data inputted by user to variable. Data isn't separated by comma.
* Format *		LINE INPUT [<Prompt sentence>;] <Variable name>
* Example *		LINE INPUT "How are you";ANS$


[ LINE INPUT# ]

* Description *	Store data from file to variable. Data isn't separated by comma.
* Format *		LINE INPUT #<File number>, <Variable name>
* Example *		LINE INPUT #1, TXT$

 LINE INPUT# reads data separated by CR+LF ( CHR$(13)+CHR$(10) ) from file.
 <File number> specifies the number specified by OPEN.


[ LINE INPUT WAIT ]

* Description *	Store data inputted by user to variable with time limit. Data isn't separated by comma.
* Format *		LINE INPUT WAIT <Time limit>, [<Prompt sentence> |;|] <Variable name>
				                                                 |,|
* Example *		LINE INPUT WAIT 50, "Why";REASON$

 LINE INPUT WAIT is LINE INPUT with time limit.


[ LOCATE ]

* Description *	Move cursor of text screen.
* Format *		LOCATE [<X>] [,<Y>] [,<Cursor switch>]
* Example *		LOCATE 0,5

 Move text cursor to (<X>, <Y>).
 <Cursor switch> has no effect currently.


[ MID$ ]

* Description *	Replace string.
* Format *		MID$(<Variable name>, <Expression 1> [,<Expression 2>]) = <String>
* Example *		MID$(A$, 3)="Sweet"
				MID$(B$, 5, 2)=C$

 Replace <Expression 2> characters of <Variable name>'s string at the begining of <Expression 1> to <String>.


[ ON ~ GOSUB / ON ~ GOTO ]

* Description *	Jump to either line.
* Format *		1) ON <Expression> GOSUB <Line number> [,<Line number>...]
				2) ON <Expression> GOTO <Line number> [,<Line number>...]
* Example *		ON -(KEYNUM$="4")-(KEYNUM$="6")*2 GOSUB 1000, 2000
				ON A GOTO *APPLE, *ORANGE,,, *PEACH

 Jump to the target specified by <Expression>. For example, if <Expression>'s value is 2, jump to second target.
 If <Expression> is 0 or <Expression> overs the number of targets, program goes to next line.
 If <Expression> is negative, error occurs.


[ ON HELP GOSUB ]

* Description *	Define the bigining of interrupt routine by HELP ( End ) key.
* Format *		ON HELP GOSUB <Line number>
* Example *		ON HELP GOSUB *HELPINTERRUPT

 Once this command is executed, program jumps to <Line number> when HELP ( End ) key is pressed.
 HELP ON command is needed to enable this interrupt.


[ OPEN ]

* Description *	Open file.
* Format *		OPEN <File name> [FOR <Mode>] AS [#]<File number>
* Example *		OPEN "TEST.DAT" FOR INPUT AS #1
				OPEN "2:RESULT.DAT" FOR OUTPUT AS #1

 Open <File name> file and bind <File number> to the file.
 There are 4 modes for <Mode>.
	INPUT	: Input mode. Input from file that already exists.
	OUTPUT	: Output mode. Create new file and output to it.
	APPEND	: Append mode. Append to file that already exists.


[ OPTION BASE ]

* Description *	Specify minimum number of array subscript.
* Format *		OPTION BASE |0|
				            |1|
* Example *		OPTION BASE 1

 Default option base is 0.


[ [1] PAINT ]

* Description *	Fill area enclosed by specified color.
* Format *		PAINT | (Wx, Wy) | [,<Area color>] [,<Border color>]
				      |STEP(x, y)|
* Example *		PAINT (320, 200), 7, 4

 Fill area with <Area color>.
 The area is that center position is (Wx, Wy) and enclosed by <Border color>.


[ PLAY ]

* Description *	Play sounds.
* Format *		PLAY [#<Mode number>,] [<String 1>] [,<String 2>...] [,<String 6>]
* Example *		PLAY "O4L4EFGAGFE2","O3L4CDEFEDC2"

 Play sounds according to MML specified by <String 1>~<String 6>.
 <Mode number> has no effect currlently.
 <String 1>~<String 3> specifies MML of channel 1~3. These channel's tone is similar to that of FM tone generator. <String 4>~<String 6> specifies MML of channel 4~6. These channel's tone is similar to that of SSG tone generator.
 MML has follow commands.

Cx, Dx, Ex, Fx, Gx, Ax, Bx
 Specify pitch. x is time value ( length ). If time value is abbreviated, time value is specified by Lx command.

Vx
 Specify volume roughly.
 "V0" is minimum volume, "V15" is maximum volume.

Lx
 Specify time value. 1 <= x <= 64.

Qx
 Specify ratio; gate time / step time. x is gate time. 1 <= x <= 8. Step time is 8.

Ox
 Specify octave. 1 <= x <= 8.

<, >
 > increase octave, < decrease octave.

Tx
 Specify tempo. 32 <= x <= 255.

Rx, Px
 Rest. x is time value.

+, #, -
 + or # increase half pitch. - decrease half pitch. These commands follows pitch.

. ( period )
 Dot. Increase time value.

^
 Join time value. For example "C8^8" equals "C4"

{ ... }x
 Sequencial note. x is time value.

@x
 Specify voice. This command is effective on only channel 1~3.
 x is voice number.See the follow table.
 In N88-BASIC, these voices are outputted by FM tone generator. But, in Be88-BASIC, these voices are outputtend by MIDI tone generator. So, actual voice is different.

================================================
Voice	Voice		Description
Number	Name
================================================
 0		DEFAULT		Same as 11
 1		BRASS 2		Same as 22
 2		STRING 2	Same as 25
 3		EPIANO 3	Same as 28
 4		EBASS 1		Same as 30
 5		EORGAN 1	Same as 32
 6		PORGAN 1	Same as 34
 7		FLUTE		Same as 36
 8		OBOE		Same as 38
 9		CLARINET	Same as 39
10		VIBRAPHON	Same as 41
11		HARPSIC		Harpsicode
12		BELL		Bell
13		PIANO		Acostic piano
14		MUSHI		Bug's chirp
15		DESCENT		Effect like going descent
16		UFO			Effect like flying UFO
17		GRANPRI		Effect like running race car
18		LASER 1		Effect like SF (1)
19		LASER 2		Effect like SF (2)
20		SINWAVE		Sin wave
21		BRASS 1		Brass ( High )
22		BRASS 2		Brass ( Low )
23		TRUMPET		Trumpet
24		STRING 1	String ( Low )
25		STRING 2	String ( High )
26		EPIANO 1	Electric piano
27		EPIANO 2	Hard electric piano
28		EPIANO 3	Soft electric piano
29		GUITAR		Electric guitar
30		EBASS 1		Synthesizer bass
31		EBASS 2		Wood bass
32		EORGAN 1	Hard electric organ
33		EORGAN 2	Soft electric organ
34		PORGAN 1	Pipe organ ( Low )
35		PORGAN 2	Pipe organ ( High )
36		FLUTE		Flute
37		PICCOLO		Piccolo
38		OBOE		Oboe
39		CLARINET	Clarinet
40		GROCKEN		Grocken
41		VIBRAPHON	Vibraphon
42		XYLOPHN		Xylophon
43		KOTO		Koto
44		ZITAR		ZITAR
45		CLAVINET	Clavinet
46		HARPSIC		Same as 11
47		BELL		Same as 12
48		HARP		Harp
49		BELL/BRASS	Unison of bell and brass
50		HARMONICA	Harmonica
51		STEELDRUM	Steel drum
52		TIMPANI		Timpani
53		TRAIN		Whistle
54		AMBULANCE	Ambulance
55		TWEET		Bird
56		RAIN DROP	Rain drop
57		HORN		Horn
58		SNARE DRUM	Snare drum
59		COW BELL	Cow bell
60		PERC 1		Spring
61		PERC 2		Glass filled in water
62		PERC 3		Wind chime
63		MUSIC BOX	Music box
64		CELLO		Cello
65		LOW BRASS	Tuba
66		WW ENSMBL	Ensemble of woodwind
67		AC GUITAR	Acostic guitar
68		FLUTE/HARP	Unison of flute and harp
69		FUNK PLUC	Dulcimer
70		FUNK BASS	Funky bass
71		SYN LEAD	Lead for melody
72		METAL CLES	Effect like metal (1)
73		STAIN		Effect like metal (2)
74		CUBIN GLASS	Ice in glass
75		HUMAN		Human voice
76		WOOD BASS	Wood bass
77		CHIMES		Chimes
78		SPACY		Machine's whistle
79		OBOE/B.CLAR	Unison of oboe and bass clarinet
80		OLD STRING	Violin produced by old record
81		STEEL'S CRY	Steel's cry
================================================

@Vx
 Specify volume. 0 <= x <= 127

MF, MB
 Specify how to play MML.
 "MF" is foreground play. "MB" is background play.


[ PLAY ALLOC ]

* Description *	Initialize sound buffer.
* Format *		PLAY ALLOC [<Ch 1 buffer size>] [,<Ch 2 buffer size>...] [,<Ch 6 buffer size>]
* Example *		PLAY ALLOC 500, 500, 500

 Initialize sound buffer ( voice etc. ).
 <Ch 1 buffer size>~<Ch 6 buffer size> have no effect.


[ POINT ]

* Description *	Change LP ( Last Referenced Point ).
* Format *		POINT | (Wx, Wy) |
				      |STEP(x, y)|
* Example *		POINT (100, 200)

 Some graphic commands use LP if parameter is abbreviated.
 For example, the follow commands have same effect.

	1) LINE (100, 50)-(200, 150)
	2) POINT (100, 50)
	   LINE -(200,150)


[ PRESET ]

* Description *	Clear dot.
* Format *		PRESET | (Wx, Wy) | [,<Palette number>]
				       |STEP(x, y)|
* Example *		PRESET (70, 80)

 Clear dot (Wx, Wy).
 Usually, <Palette number> is abbreviated.
 If you specify <Palette number>, PRESET become same as PSET.


[ PRINT ]

* Description *	Output data to text screen.
* Format *		PRINT [<Expression>] [|,|<Expression>...] [|,|]
				                      |;|                  |;|
* Example *		PRINT "Your score is";SC,"Average is";(SC+A+B+C+D)/5

 If <Expression> is abbreviated, PRINT do only cariage return.
 If separator is comma (,), some spaces ( max 14 ) are outputted.


[ PRINT# ]

* Description *	Output data to file.
* Format *		PRINT #<File number>, [<Expression>] [|,| <Expression>...] [|,|]
				                                      |;|                   |;|
* Example *		PRINT #1, "Color [";COL$;"]"

 <File number> specifies the number specified by OPEN.


[ PRINT USING ]

* Description *	Output data to text screen in some format.
* Format *		PRINT USING <Format>; <Expression> [|,| <Expression>...] [|,|]
				                                    |;|                   |;|
* Example *		PRINT USING "#####";SCORE

 Output data to text screen according to the format specified by <Format>.
 Below control character is available in <Format>.

# ...... Specify number's figure.


[ PSET ]

* Description *	Show dot.
* Format *		PSET | (Wx, Wy) | [,<Palette number>]
				     |STEP(x, y)|
* Example *		PSET (320, 200), 4

 Show dot (Wx, Wy).


[ PUT@ ]

* Description *	Output graphic pattern or kanji to graphic screen.
* Format *		1) PUT[@] (Sx, Sy), <Variable name> [(<Subscription>)] [,<Term>] [,<Foreground color>] [,<Background color>]
				2) PUT[@] (Sx, Sy), KANJI(<Kanji code>) [,<Term>] [,<Foreground color>] [,<Background color>]
* Example *		PUT@ (20, 20), ENEMY, PSET
				PUT@ (50, 70), KANJI(&H2022)

Format 1)

 Output graphic pattern that is stored by GET@ to specified position of graphic screen.
 <Variable name> specifies the variable that stores graphic pettern.
 <Subscript> specifies the index. Usually, it is abbreviated.
 See below for <Term>.
	PSET	: Output graphic pattern as is.
	PRESET	: Each dot's color palette is 15-color palette.
	OR		: Output the result; graphic stored in variable OR on graphic screen.
	AND		: Output the result; graphic stored in variable AND on graphic screen.
	XOR		: Output the result; graphic stored in variable XOR on graphic screen.
 If <Term> is abbreviated, XOR is taken.

Format 2)

 Output kanji to specified position of graphic screen.
 You must set Run Window's font to Japanese font ( Haru etc. ) in Preferences Window.


[ RANDOMIZE ]

* Description *	Set new random value series.
* Format *		RANDOMIZE [<Expression>]
* Example *		RANDOMIZE 777

 If <Expression> is abbreviated, user is prompted to input seed.


[ READ ]

* Description *	Store data prepared by DATA to variable.
* Format *		READ <Variable> [,<Variable>]
* Example *		READ YEAR, MONTH, DAY, DIARY$
				DATA 2002, 5, 31, "I went to park."

 READ and DATA are pair.


[ REM ]

* Description *	Insert remark to program.
* Format *		|REM| [<Remark>]
				| ' |
* Example *		REM ===== Show score =====

 String following to REM don't affect program.


[ RESTORE ]

* Description *	Specify the top line of DATA for READ.
* Format *		RESTORE [<Line number>]
* Example *		RESTORE *CHARACTERDATA

 READ reads data the line specified by <Line number>.
 If <Line number> is abbreviated, program top is taken.


[ RETURN ]

* Description *	Exit sub routine and continue previous program.
* Format *		RETURN [<Line number>]
* Example *		RETURN

 Usually, <Line number> is abbreviated.


[ ROLL ]

* Description *	Scroll graphic screen.
* Format *		ROLL [<Virtical>] [,<Horizontal>] [,|N|]
				                                    |Y|
* Example *		ROLL 20, -8

 <Virtical> specifies number of dots to scroll viatically.
 <Horizontal> specifies number of dots to scroll Horizontally.
 If Y option is specified, the area appeard by ROLL is filled with background color. If N option is specified or option is abbreviated, filled with palette 0.


[ RUN ]

* Description *	Run program.
* Format *		1) RUN [<Line number>]
				2) RUN <File name> [,R]
* Example *		RUN *SKIP
				RUN "2:FLOWER.BAS"

Format 1)

 Run program in Main Window.

Format 2)

 Run specified program saved in disk.
 R option has no effect currently.


[ SCREEN ]

* Description *	Setup graphic screen.
* Format *		SCREEN [<Screen mode>] [,<Screen switch>] [,<Active page>] [,<Display page>]
* Example *		SCREEN 3, 0, 0, 1

 <Screen mode> specifies resolution.
	0	: Color mode. 640 x 200
	3	: High resolution color mode. 640 x 400
 <Screen switch> shows / hides graphics.
	0 or 1	: Show graphics.
	2 or 3	: Hide graphics temporary.
 <Active page> specifies the graphic page to write.
	* Color mode *
		0~3	: Write to page 1~4.
	* High resolution color mode *
		0, 1	: Write to page 1, 2.
 <Display page> specifies the graphic page to show.

==================================================
		--------------- Shown page ---------------
Value	Color mode		High resolution color mode
==================================================
0		None			None
1		Page 1			Page 1
2		Page 2			---
16		None			None
32		None			None
33		Page 3			Page 2
34		Page 4			---
48		None			None
==================================================


[ STOP ]

* Description *	Break program.
* Format *		STOP
* Example *		STOP


[ SWAP ]

* Description *	Swap value in two variables.
* Format *		SWAP <Variable>, <Variable>
* Example *		SWAP I, J


[ WHILE ~ WEND ]

* Description *	Loop until term is not satisfied.
* Format *		WHILE <Logical expression>
				 ...
				WEND
* Example *		WHILE REST >= 0
				 ...
				WEND

 Loop while <Logical expression> is true.


[ WIDTH ]

* Description *	Specify number of columns/rows of text screen.
* Format *		WIDTH <Columns> [,<Rows>]
* Example *		WIDTH 80,25

 <Columns> is 40 or 80.
 <Rows> is 20 or 25.


[ WRITE ]

* Description *	Output data to text screen.
* Format *		WRITE <Expression> [|,|<Expression>...]
				                    |;|
* Example *		WRITE ZIP, ADDR$, NAME$

 WRITE is similar to PRINT. But, comma(,) and semicolon(;) have no difference. Unnecessary spaces are cut. Strings are put between double quote(").


[ WRITE# ]

* Description *	Output data to file.
* Format *		WRITE #<File number>, <Expression> [|,|<Expression>...]
				                                    |;|
* Example *		WRITE ZIP, ADDR$, NAME$

 WRITE is similar to PRINT. But, comma(,) and semicolon(;) have no difference. Unnecessary spaces are cut. Strings are put between double quote(").

