@nataliapc/mcp-openmsx 1.1.15 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/README.md +25 -14
  2. package/dist/server.js +73 -24
  3. package/dist/utils.js +10 -2
  4. package/dist/vectordb.js +60 -0
  5. package/package.json +8 -3
  6. package/resources/audio/msx-midi.md +872 -0
  7. package/resources/audio/psg_registers.md +281 -0
  8. package/resources/audio/sound_cartridge_scc.md +123 -0
  9. package/resources/audio/sound_cartridge_scci.md +250 -0
  10. package/resources/audio/toc.json +8 -4
  11. package/resources/book--msx2-technical-handbook/toc.json +1 -1
  12. package/resources/msx-unapi/toc.json +2 -2
  13. package/resources/programming/basic_wiki/ABS().md +36 -0
  14. package/resources/programming/basic_wiki/AND.md +71 -0
  15. package/resources/programming/basic_wiki/ASC().md +38 -0
  16. package/resources/programming/basic_wiki/ATN().md +36 -0
  17. package/resources/programming/basic_wiki/AUTO.md +39 -0
  18. package/resources/programming/basic_wiki/BASE().md +147 -0
  19. package/resources/programming/basic_wiki/BEEP.md +27 -0
  20. package/resources/programming/basic_wiki/BIN$().md +36 -0
  21. package/resources/programming/basic_wiki/BLOAD.md +63 -0
  22. package/resources/programming/basic_wiki/BSAVE.md +61 -0
  23. package/resources/programming/basic_wiki/CALL.md +391 -0
  24. package/resources/programming/basic_wiki/CALL_ADJUST.md +40 -0
  25. package/resources/programming/basic_wiki/CALL_IMPOSE.md +28 -0
  26. package/resources/programming/basic_wiki/CALL_OPTIONS.md +26 -0
  27. package/resources/programming/basic_wiki/CALL_PAUSE.md +119 -0
  28. package/resources/programming/basic_wiki/CALL_PCMPLAY.md +60 -0
  29. package/resources/programming/basic_wiki/CALL_PCMREC.md +70 -0
  30. package/resources/programming/basic_wiki/CDBL().md +36 -0
  31. package/resources/programming/basic_wiki/CHR$().md +51 -0
  32. package/resources/programming/basic_wiki/CINT().md +36 -0
  33. package/resources/programming/basic_wiki/CIRCLE.md +51 -0
  34. package/resources/programming/basic_wiki/CLEAR.md +39 -0
  35. package/resources/programming/basic_wiki/CLOAD.md +27 -0
  36. package/resources/programming/basic_wiki/CLOAD?.md +31 -0
  37. package/resources/programming/basic_wiki/CLOSE.md +44 -0
  38. package/resources/programming/basic_wiki/CLS.md +51 -0
  39. package/resources/programming/basic_wiki/COLOR.md +143 -0
  40. package/resources/programming/basic_wiki/COLOR=.md +93 -0
  41. package/resources/programming/basic_wiki/COLOR_SPRITE$().md +83 -0
  42. package/resources/programming/basic_wiki/COLOR_SPRITE().md +85 -0
  43. package/resources/programming/basic_wiki/CONT.md +23 -0
  44. package/resources/programming/basic_wiki/COPY.md +215 -0
  45. package/resources/programming/basic_wiki/COPY_SCREEN.md +61 -0
  46. package/resources/programming/basic_wiki/COS().md +37 -0
  47. package/resources/programming/basic_wiki/CSAVE.md +35 -0
  48. package/resources/programming/basic_wiki/CSNG().md +36 -0
  49. package/resources/programming/basic_wiki/CSRLIN.md +33 -0
  50. package/resources/programming/basic_wiki/DATA.md +47 -0
  51. package/resources/programming/basic_wiki/DEFDBL.md +40 -0
  52. package/resources/programming/basic_wiki/DEFINT.md +40 -0
  53. package/resources/programming/basic_wiki/DEFSNG.md +40 -0
  54. package/resources/programming/basic_wiki/DEFSTR.md +40 -0
  55. package/resources/programming/basic_wiki/DEF_FN.md +49 -0
  56. package/resources/programming/basic_wiki/DEF_USR.md +33 -0
  57. package/resources/programming/basic_wiki/DELETE.md +49 -0
  58. package/resources/programming/basic_wiki/DIM.md +59 -0
  59. package/resources/programming/basic_wiki/DRAW.md +77 -0
  60. package/resources/programming/basic_wiki/ELSE.md +45 -0
  61. package/resources/programming/basic_wiki/END.md +32 -0
  62. package/resources/programming/basic_wiki/EOF().md +36 -0
  63. package/resources/programming/basic_wiki/EQV.md +76 -0
  64. package/resources/programming/basic_wiki/ERASE.md +35 -0
  65. package/resources/programming/basic_wiki/ERL.md +34 -0
  66. package/resources/programming/basic_wiki/ERR.md +143 -0
  67. package/resources/programming/basic_wiki/ERROR.md +145 -0
  68. package/resources/programming/basic_wiki/EXP().md +38 -0
  69. package/resources/programming/basic_wiki/FIELD.md +48 -0
  70. package/resources/programming/basic_wiki/FIX().md +44 -0
  71. package/resources/programming/basic_wiki/FN.md +61 -0
  72. package/resources/programming/basic_wiki/FOR...NEXT.md +80 -0
  73. package/resources/programming/basic_wiki/FRE().md +66 -0
  74. package/resources/programming/basic_wiki/GET_DATE.md +60 -0
  75. package/resources/programming/basic_wiki/GET_TIME.md +34 -0
  76. package/resources/programming/basic_wiki/GOSUB.md +41 -0
  77. package/resources/programming/basic_wiki/GOTO.md +41 -0
  78. package/resources/programming/basic_wiki/HEX$().md +36 -0
  79. package/resources/programming/basic_wiki/IF...GOTO...ELSE.md +55 -0
  80. package/resources/programming/basic_wiki/IF...THEN...ELSE.md +50 -0
  81. package/resources/programming/basic_wiki/IMP.md +83 -0
  82. package/resources/programming/basic_wiki/INKEY$.md +65 -0
  83. package/resources/programming/basic_wiki/INP().md +33 -0
  84. package/resources/programming/basic_wiki/INPUT$().md +51 -0
  85. package/resources/programming/basic_wiki/INPUT.md +93 -0
  86. package/resources/programming/basic_wiki/INSTR().md +44 -0
  87. package/resources/programming/basic_wiki/INT().md +44 -0
  88. package/resources/programming/basic_wiki/INTERVAL.md +57 -0
  89. package/resources/programming/basic_wiki/KEY().md +51 -0
  90. package/resources/programming/basic_wiki/KEY.md +254 -0
  91. package/resources/programming/basic_wiki/LEFT$().md +39 -0
  92. package/resources/programming/basic_wiki/LEN().md +36 -0
  93. package/resources/programming/basic_wiki/LET.md +68 -0
  94. package/resources/programming/basic_wiki/LINE.md +74 -0
  95. package/resources/programming/basic_wiki/LINE_INPUT.md +79 -0
  96. package/resources/programming/basic_wiki/LIST.md +58 -0
  97. package/resources/programming/basic_wiki/LLIST.md +43 -0
  98. package/resources/programming/basic_wiki/LOAD.md +56 -0
  99. package/resources/programming/basic_wiki/LOCATE.md +67 -0
  100. package/resources/programming/basic_wiki/LOG().md +36 -0
  101. package/resources/programming/basic_wiki/LPOS().md +31 -0
  102. package/resources/programming/basic_wiki/LPRINT.md +46 -0
  103. package/resources/programming/basic_wiki/MAXFILES.md +39 -0
  104. package/resources/programming/basic_wiki/MERGE.md +54 -0
  105. package/resources/programming/basic_wiki/MID$().md +72 -0
  106. package/resources/programming/basic_wiki/MOD.md +39 -0
  107. package/resources/programming/basic_wiki/MOTOR.md +46 -0
  108. package/resources/programming/basic_wiki/NEW.md +27 -0
  109. package/resources/programming/basic_wiki/NOT.md +61 -0
  110. package/resources/programming/basic_wiki/OCT$().md +36 -0
  111. package/resources/programming/basic_wiki/ON...GOSUB.md +45 -0
  112. package/resources/programming/basic_wiki/ON...GOTO.md +42 -0
  113. package/resources/programming/basic_wiki/ON_ERROR_GOTO.md +61 -0
  114. package/resources/programming/basic_wiki/ON_INTERVAL_GOSUB.md +54 -0
  115. package/resources/programming/basic_wiki/ON_KEY_GOSUB.md +56 -0
  116. package/resources/programming/basic_wiki/ON_SPRITE_GOSUB.md +41 -0
  117. package/resources/programming/basic_wiki/ON_STOP_GOSUB.md +56 -0
  118. package/resources/programming/basic_wiki/ON_STRIG_GOSUB.md +70 -0
  119. package/resources/programming/basic_wiki/OPEN.md +103 -0
  120. package/resources/programming/basic_wiki/OR.md +75 -0
  121. package/resources/programming/basic_wiki/OUT.md +35 -0
  122. package/resources/programming/basic_wiki/PAD().md +110 -0
  123. package/resources/programming/basic_wiki/PAINT.md +66 -0
  124. package/resources/programming/basic_wiki/PDL().md +53 -0
  125. package/resources/programming/basic_wiki/PEEK().md +44 -0
  126. package/resources/programming/basic_wiki/PLAY().md +58 -0
  127. package/resources/programming/basic_wiki/PLAY.md +196 -0
  128. package/resources/programming/basic_wiki/POINT.md +52 -0
  129. package/resources/programming/basic_wiki/POKE.md +51 -0
  130. package/resources/programming/basic_wiki/POS().md +36 -0
  131. package/resources/programming/basic_wiki/PRESET.md +61 -0
  132. package/resources/programming/basic_wiki/PRINT.md +179 -0
  133. package/resources/programming/basic_wiki/PSET.md +82 -0
  134. package/resources/programming/basic_wiki/PUT_KANJI.md +93 -0
  135. package/resources/programming/basic_wiki/PUT_SPRITE.md +143 -0
  136. package/resources/programming/basic_wiki/READ.md +45 -0
  137. package/resources/programming/basic_wiki/REM.md +42 -0
  138. package/resources/programming/basic_wiki/RENUM.md +78 -0
  139. package/resources/programming/basic_wiki/RESTORE.md +52 -0
  140. package/resources/programming/basic_wiki/RESUME.md +45 -0
  141. package/resources/programming/basic_wiki/RETURN.md +47 -0
  142. package/resources/programming/basic_wiki/RIGHT$().md +39 -0
  143. package/resources/programming/basic_wiki/RND().md +51 -0
  144. package/resources/programming/basic_wiki/RUN.md +56 -0
  145. package/resources/programming/basic_wiki/SAVE.md +65 -0
  146. package/resources/programming/basic_wiki/SCREEN.md +164 -0
  147. package/resources/programming/basic_wiki/SET_ADJUST.md +66 -0
  148. package/resources/programming/basic_wiki/SET_BEEP.md +76 -0
  149. package/resources/programming/basic_wiki/SET_DATE.md +103 -0
  150. package/resources/programming/basic_wiki/SET_PAGE.md +52 -0
  151. package/resources/programming/basic_wiki/SET_PASSWORD.md +75 -0
  152. package/resources/programming/basic_wiki/SET_PROMPT.md +61 -0
  153. package/resources/programming/basic_wiki/SET_SCREEN.md +100 -0
  154. package/resources/programming/basic_wiki/SET_SCROLL.md +55 -0
  155. package/resources/programming/basic_wiki/SET_TIME.md +83 -0
  156. package/resources/programming/basic_wiki/SET_TITLE.md +87 -0
  157. package/resources/programming/basic_wiki/SET_VIDEO.md +49 -0
  158. package/resources/programming/basic_wiki/SGN().md +38 -0
  159. package/resources/programming/basic_wiki/SIN().md +36 -0
  160. package/resources/programming/basic_wiki/SOUND.md +188 -0
  161. package/resources/programming/basic_wiki/SPACE$().md +38 -0
  162. package/resources/programming/basic_wiki/SPC().md +34 -0
  163. package/resources/programming/basic_wiki/SPRITE$().md +50 -0
  164. package/resources/programming/basic_wiki/SPRITE.md +31 -0
  165. package/resources/programming/basic_wiki/SQR().md +32 -0
  166. package/resources/programming/basic_wiki/STICK().md +70 -0
  167. package/resources/programming/basic_wiki/STOP.md +70 -0
  168. package/resources/programming/basic_wiki/STR$().md +37 -0
  169. package/resources/programming/basic_wiki/STRIG().md +82 -0
  170. package/resources/programming/basic_wiki/STRING$().md +42 -0
  171. package/resources/programming/basic_wiki/SWAP.md +62 -0
  172. package/resources/programming/basic_wiki/TAB().md +38 -0
  173. package/resources/programming/basic_wiki/TAN().md +36 -0
  174. package/resources/programming/basic_wiki/TIME.md +59 -0
  175. package/resources/programming/basic_wiki/TROFF.md +21 -0
  176. package/resources/programming/basic_wiki/TRON.md +39 -0
  177. package/resources/programming/basic_wiki/USR().md +66 -0
  178. package/resources/programming/basic_wiki/VAL().md +36 -0
  179. package/resources/programming/basic_wiki/VARPTR().md +50 -0
  180. package/resources/programming/basic_wiki/VDP().md +103 -0
  181. package/resources/programming/basic_wiki/VPEEK().md +46 -0
  182. package/resources/programming/basic_wiki/VPOKE.md +48 -0
  183. package/resources/programming/basic_wiki/WAIT.md +38 -0
  184. package/resources/programming/basic_wiki/WIDTH.md +76 -0
  185. package/resources/programming/basic_wiki/XOR.md +72 -0
  186. package/resources/programming/basic_wiki/_toc.json +871 -0
  187. package/resources/sdcc/toc.json +1 -1
  188. package/vector-db/index.json +1 -0
  189. /package/resources/msx-unapi/{Ethernet_UNAPI_specification_1.1.md → Ethernet_UNAPI_specification_1_1.md} +0 -0
  190. /package/resources/msx-unapi/{MSX_UNAPI_specification_1.1.md → MSX_UNAPI_specification_1_1.md} +0 -0
@@ -0,0 +1,78 @@
1
+ # RENUM
2
+
3
+ ## Effect
4
+
5
+ Renumbers the lines of a program in memory, including all references to these lines by `GOSUB`, `GOTO`, etc.
6
+
7
+ The renumbered value is based on the new line number which has been changed due to the re-ordering. If a non-existing line number is recognized the error _"Undefined line XX in YY"_ is raised. So, it can be a way to find errors in your program.
8
+
9
+ ## Syntax
10
+
11
+ `RENUM <NewLineNumber>,<CurrentLineNumber>,<Increment>`
12
+
13
+ Parameters can not end with a comma alone.
14
+
15
+ ## Parameters
16
+
17
+ `<NewLineNumber>` specifies the line number that will be used as first number in the renumbered part of your program. it is a number between 0 and 65529. (10 by default).
18
+
19
+ `<CurrentLineNumber>` specifies the current line number from which renumbering should start.
20
+
21
+ When this parameter is not specified, the default line number corrresponds to the first line of your program.
22
+
23
+ If you specify a current line number than the new line number must be greater than any of the line numbers that will not be renumbered. In other words, `RENUM` cannot be used to change the order of the program.
24
+
25
+ If you specify an old line number that does not exist, `RENUM` will be executed from the first line number that he will find after the non-existing line number.
26
+
27
+ `<Increment>` is a number between 0 and 65529. When it is not specified, the lines of your program will be incremented in steps of 10.
28
+
29
+ ## Examples
30
+
31
+ Assuming the following program for all of the examples:
32
+
33
+ ```basic
34
+ 12 PRINT "HELLO"
35
+ 34 PRINT "WORLD"
36
+ 56 GOTO 12
37
+ ```
38
+
39
+ ```basic
40
+ RENUM
41
+ LIST
42
+ 10 PRINT "HELLO"
43
+ 20 PRINT "WORLD"
44
+ 30 GOTO 10
45
+ ```
46
+ ```basic
47
+ RENUM 100
48
+ LIST
49
+ 100 PRINT "HELLO"
50
+ 110 PRINT "WORLD"
51
+ 120 GOTO 100
52
+ ```
53
+ ```basic
54
+ RENUM 0,,1
55
+ LIST
56
+ 0 PRINT "HELLO"
57
+ 1 PRINT "WORLD"
58
+ 2 GOTO 0
59
+ ```
60
+ ```basic
61
+ RENUM 20,34
62
+ LIST
63
+ 12 PRINT "HELLO"
64
+ 20 PRINT "WORLD"
65
+ 30 GOTO 12
66
+ ```
67
+
68
+ ## Related to
69
+
70
+ `AUTO`, `DELETE`, `ELSE`, `LIST`, `LLIST`
71
+
72
+ ## Compatibility
73
+
74
+ MSX-BASIC 1.0 or higher
75
+
76
+ ## Source
77
+
78
+ Retrieved from "https://www.msx.org/wiki/RENUM"
@@ -0,0 +1,52 @@
1
+ # RESTORE
2
+
3
+ ## Effect
4
+
5
+ Sets the line number where the `READ` instruction can read next value.
6
+
7
+ ## Syntax
8
+
9
+ `RESTORE [<LineNumber>]`
10
+
11
+ ## Parameter
12
+
13
+ `<LineNumber>` is a line where next `DATA` instruction will be searched for. If line number is not set the next `READ` instruction will read fist value again.
14
+
15
+ ## Example
16
+
17
+ ```basic
18
+ 10 GOSUB 60
19
+ 20 PRINT"-----"
20
+ 30 RESTORE 90
21
+ 40 GOSUB 60
22
+ 50 END
23
+ 60 PRINT"Four MSX manufacturers:"
24
+ 70 FOR I=1 TO 4:READ A$:PRINT A$:NEXT I:RETURN
25
+ 80 DATA Philips, Pioneer
26
+ 90 DATA Spectravideo, Casio, Goldstar, Panasonic
27
+  
28
+ RUN
29
+ Four MSX manufacturers:
30
+ Philips
31
+ Pioneer
32
+ Spectravideo
33
+ Casio
34
+ -----
35
+ Four MSX manufacturers:
36
+ Spectravideo
37
+ Casio
38
+ Goldstar
39
+ Panasonic
40
+ ```
41
+
42
+ ## Related to
43
+
44
+ `DATA`, `READ`
45
+
46
+ ## Compatibility
47
+
48
+ MSX-BASIC 1.0 or higher
49
+
50
+ ## Source
51
+
52
+ Retrieved from "https://www.msx.org/wiki/RESTORE"
@@ -0,0 +1,45 @@
1
+ # RESUME
2
+
3
+ ## Effect
4
+
5
+ Jumps to a specified line after execution of the error handling routine specified by `ON ERROR GOTO`.
6
+
7
+ ## Syntaxes
8
+
9
+ `RESUME <LineNumber>`
10
+
11
+ `RESUME NEXT`
12
+
13
+ ## Parameter
14
+
15
+ `<LineNumber>` is a the number of line on which the program will resume when the execution of the error handling routine is finished.
16
+
17
+ If you don't specify the line or use `RESUME 0`, the program will be continued on the location where the error was detected.
18
+
19
+ If you want that the program is resumed on the instruction immediately following the error location, then use `RESUME NEXT` instead of specifying a line.
20
+
21
+ ## Example
22
+
23
+ ```basic
24
+ 10 ON ERROR GOTO 400
25
+ 20 INPUT "X= ";A
26
+ 30 IF A>100 THEN ERROR 210
27
+ 40 IF A<10 THEN ERROR 211
28
+ 50 END
29
+ 400 IF ERR=210 THEN PRINT "MAXIMUM 100!"
30
+ 410 IF ERR=211 THEN PRINT "MINIMUM 10!"
31
+ 420 RESUME 20
32
+ 430 ON ERROR GOTO 0
33
+ ```
34
+
35
+ ## Related to
36
+
37
+ `ERL`, `ERR`, `ERROR`, `ON ERROR GOTO`
38
+
39
+ ## Compatibility
40
+
41
+ MSX-BASIC 1.0 or higher
42
+
43
+ ## Source
44
+
45
+ Retrieved from "https://www.msx.org/wiki/RESUME"
@@ -0,0 +1,47 @@
1
+ # RETURN
2
+
3
+ ## Effect
4
+
5
+ Returns from a subroutine that was invoked by `GOSUB`.
6
+
7
+ ## Syntax
8
+
9
+ `RETURN <LineNumber>`
10
+
11
+ ## Parameter
12
+
13
+ `<LineNumber>` if the number of the line on which the program will return when the execution of the subroutine is finished.
14
+
15
+ If you don't specify the line number, the program will return to the instruction directly after `GOSUB`.
16
+
17
+ ## Examples
18
+
19
+ ```basic
20
+ 90 ' RETURN without line
21
+ 100 PRINT "Hello"
22
+ 110 GOSUB 200
23
+ 120 END
24
+ 200 PRINT "Here am I"
25
+ 210 RETURN
26
+ ```
27
+
28
+ ```basic
29
+ 90 ' RETURN with line for infinite loop
30
+ 100 PRINT "Hello"
31
+ 110 GOSUB 200
32
+ 120 END
33
+ 200 PRINT "Here am I"
34
+ 210 RETURN 100
35
+ ```
36
+
37
+ ## Related to
38
+
39
+ `GOSUB`, `ON...GOSUB`, `ON INTERVAL GOSUB`, `ON KEY GOSUB`, `ON SPRITE GOSUB`, `ON STOP GOSUB`, `ON STRIG GOSUB`
40
+
41
+ ## Compatibility
42
+
43
+ MSX-BASIC 1.0 or higher
44
+
45
+ ## Source
46
+
47
+ Retrieved from "https://www.msx.org/wiki/RETURN"
@@ -0,0 +1,39 @@
1
+ # RIGHT$()
2
+
3
+ ## Effect
4
+
5
+ Returns a string corresponding to a specified number of the rightmost characters from an original string.
6
+
7
+ _Note: For strings with Japanese or Korean characters, you need to use `CALL KMID`._
8
+
9
+ ## Syntax
10
+
11
+ `RIGHT$("<String>",<Length>)`
12
+
13
+ ## Parameters
14
+
15
+ `<String>` is a string of characters between double quotes `"`. It can include non-printable characters and be replaced by a numeric or string variable (also named as alphanumeric variable).
16
+
17
+ `<Length>` is a number between 0 and 255.
18
+
19
+ ## Example
20
+
21
+ ```basic
22
+ 10 A$=RIGHT$("MSX Forever!",8)
23
+ 20 PRINT A$
24
+  
25
+ RUN
26
+ Forever!
27
+ ```
28
+
29
+ ## Related to
30
+
31
+ `CALL KMID`, `LEFT$`, `MID$`
32
+
33
+ ## Compatibility
34
+
35
+ MSX-BASIC 1.0 or higher
36
+
37
+ ## Source
38
+
39
+ Retrieved from "https://www.msx.org/wiki/RIGHT$()"
@@ -0,0 +1,51 @@
1
+ # RND()
2
+
3
+ ## Effect
4
+
5
+ Returns a pseudo-random value between 0 and 1. Each time a program is started with `RUN` the sequence of randomly generated output will be identical.
6
+
7
+ ## Syntax
8
+
9
+ `RND(<Variable>)`
10
+
11
+ ## Parameter
12
+
13
+ `<Variable>` must be a numeric variable:
14
+ - When this variable is negative, the random number generation is re-seeded.
15
+ - When this variable is positive, a new random number will be returned.
16
+ - When this variable is equal to zero, the last generated random number will be repeated.
17
+
18
+ To generate a real random-number the generator must always select a new sequence after the program has been started. This can be ensured by using the variable `TIME`.
19
+
20
+ ## Examples
21
+
22
+ ```basic
23
+ 10 X=RND(1)*100
24
+ 20 PRINT X;" is a pseudo-random number between 0 and 100 ";
25
+  
26
+ RUN
27
+ 59.521943994623 is a pseudo-random number between 0 and 100
28
+ ```
29
+
30
+ ```basic
31
+ 10 R=RND(-TIME)
32
+ 20 FOR I=1 TO 10
33
+ 30 SCREEN 2:COLOR 15,4,7
34
+ 40 C=INT(RND(1)*15+1)
35
+ 50 IF C=4 GOTO 40
36
+ 60 CIRCLE (80,80),20,C
37
+ 70 PAINT (80,80),C
38
+ 90 NEXT I
39
+ ```
40
+
41
+ ## Related to
42
+
43
+ `TIME`
44
+
45
+ ## Compatibility
46
+
47
+ MSX-BASIC 1.0 or higher
48
+
49
+ ## Source
50
+
51
+ Retrieved from "https://www.msx.org/wiki/RND()"
@@ -0,0 +1,56 @@
1
+ # RUN
2
+
3
+ ## Effect
4
+
5
+ Executes a BASIC program present in the MSX memory or after loading of this program in the MSX memory.
6
+
7
+ For the latter, if you use cassette (device `CAS`), the program to be loaded and run must be in ASCII text, what means that it must have been saved with `SAVE` (which uses ASCII format), not with `CSAVE` (which uses tokenized format).
8
+
9
+ However, to load and manually run for BASIC programs in tokenized format on tape, you can just use `RUN` after `CLOAD`.
10
+
11
+ If you use another device, the program can be in ASCII mode or in tokenized format.
12
+
13
+ ## Syntax
14
+
15
+ `RUN <LineNumber>`
16
+
17
+ `RUN "<Device>:\<Path>\<Filename>"`
18
+
19
+ _Notes:_
20
+ - Character backslash `\` serves as a separator between the folders and the file name in MSX-DOS2. You don't have to put it after the colon of the device name.
21
+ - Parameters in quotes can be replaced by a alphanumeric variable containing the corresponding parameters.
22
+ - Character backslash is replaced by the character yen `¥` on Japanese MSX or the character won `₩` on Korean MSX.
23
+ - Parameters can not end with a comma alone.
24
+
25
+ ## Parameters
26
+
27
+ `<LineNumber>` specifies the line number where the BASIC program will start. This parameter is available only if the program is currently in the MSX memory (after having been loaded with `LOAD` or `CLOAD` or directly entered on the MSX-BASIC screen). By default, the program start at the first line.
28
+
29
+ `<Device>` is the name for used device (see table below).
30
+
31
+ |Device type|Device name|Remark|
32
+ |:--|:-:|---|
33
+ |Disk drive|A, B, C, D, E, F, G, H|A floppy disk interface can control until 2 drives.|
34
+ |Data recorder|CAS|Not available on MSX turbo R|
35
+ |Memory disk|MEM|Created with CALL MEMINI|
36
+ |Stringy Floppy Drive<br>(special data recorder)|S|Requires Spectravideo SVI-777Not available on MSX turbo R|
37
+
38
+ By default, the loading will be made from tape on a system without any disk drive, from the current active drive (generally drive A) in the other cases.
39
+
40
+ `<Path>` is used to specify the location in folders of file to execute. Each folder name in path are separate by a backslash `\`. This parameter is only available in version 2 of Disk BASIC.
41
+
42
+ `<Filename>` is the name of BASIC program to run. It needs to be specified if the file is on disk or memory disk. If you use a tape and don't indicate the file name, `RUN` will load and execute the first BASIC program in ASCII text found on tape.
43
+
44
+ The size of file name is limited to 6 characters without extension, when the file is saved on tape. If another device is used, then the size is 8 characters followed by a point and an extension with 3 characters.
45
+
46
+ ## Related to
47
+
48
+ `CALL MEMINI`, `CLOAD`, `CSAVE`, `LOAD`, `MERGE`, `SAVE`
49
+
50
+ ## Compatibility
51
+
52
+ MSX-BASIC 1.0 or higher
53
+
54
+ ## Source
55
+
56
+ Retrieved from "https://www.msx.org/wiki/RUN"
@@ -0,0 +1,65 @@
1
+ # SAVE
2
+
3
+ ## Effect
4
+
5
+ Saves the BASIC program present in the MSX memory to a device.
6
+
7
+ If you use cassette, the program will be saved in ASCII mode.
8
+
9
+ If you use another device, the program can be saved in ASCII text or in tokenized format.
10
+
11
+ ## Syntax
12
+
13
+ `SAVE "<Device>:\<Path>\<Filename>",A`
14
+
15
+ _Notes:_
16
+ - Character backslash `\` serves as a separator between the folders and the file name in MSX-DOS2. You don't have to put it after the colon of the device name.
17
+ - Parameters in quotes can be replaced by a alphanumeric variable containing the corresponding parameters.
18
+ - Character backslash is replaced by the character yen `¥` on Japanese MSX or the character won `₩` on Korean MSX.
19
+ - Parameters can not end with a comma alone.
20
+
21
+ ## Parameters
22
+
23
+ `<Device>` is the name for used device (see table below):
24
+
25
+ |Device type|Device name|Remark|
26
+ |:--|:-:|---|
27
+ |Disk drive|A, B, C, D, E, F, G, H|A floppy disk interface can control until 2 drives.|
28
+ |Data recorder|CAS|Not available on MSX turbo R|
29
+ |Data cartridge (Sony)|CAT|Requires Sony HBI-55|
30
+ |Linked computer|COM[n]|Requires RS-232C interface|
31
+ |Data cartridge (Yamaha)|DC|Requires Yamaha UDC-01 + YRM-104 or YRM-504|
32
+ |Memory disk|MEM|Created with CALL MEMINI|
33
+ |Device controlled by Pioneer UC-V102|RS[n]|Requires Pioneer UK-V104 RS-232C board|
34
+ |Stringy Floppy Drive(special data recorder)|S|Requires Spectravideo SVI-777Not available on MSX turbo R|
35
+
36
+ By default, the saving will be made to tape on a system without any disk drive, to the current active drive (generally drive A) in the other cases.
37
+
38
+ `<Path>` is used to specify the location in folders where you want save the file. Each folder name in path are separate by a backslash `\`. This parameter is only available in version 2 of Disk BASIC.
39
+
40
+ `<Filename>` is a string that contains the file name of Basic program to save.
41
+
42
+ When the file is saved on tape the format of file name is case sensitive and limited to 6 characters without extension. If another device is used, then the format is 8 characters followed by a point and an extension with 3 characters (not case sensitive).
43
+
44
+ if you use `CAT`, `DC` or `MEM` as device, the saving will always be made in ASCII text mode (not tokenized).
45
+
46
+ On other devices, when the parameter `A` is indicated, the BASIC program will be saved to ASCII codes otherwise it will be saved as it is (tokenized format).
47
+
48
+ Parameter `A` is only useful if you save on disk or another computer and want to get the program in ASCII mode.
49
+
50
+ ## ASCII text and Tokenized format
51
+
52
+ The tokenized format allows a faster loading than the loading of the same BASIC program in ASCII text and the loaded program takes less space in the MSX memory.
53
+ However, contrary to the ASCII text, the listing of the program can't be directly displayed and read. Besides, `RUN` needs to be used after loading with `CLOAD` instead of using `RUN` as unique instruction.
54
+
55
+ ## Related to
56
+
57
+ `CALL MEMINI`, `CLOAD`, `CSAVE`, `LOAD`, `MERGE`, `RUN`
58
+
59
+ ## Compatibility
60
+
61
+ MSX-BASIC 1.0 or higher
62
+
63
+ ## Source
64
+
65
+ Retrieved from "https://www.msx.org/wiki/SAVE"
@@ -0,0 +1,164 @@
1
+ # SCREEN
2
+
3
+ ## Effect
4
+
5
+ Sets display mode, sprite size, keyboard click, cassette speed, printer type and interlace mode.
6
+
7
+ ## Syntax
8
+
9
+ `SCREEN <DisplayMode>,<SpriteSize>,<Keyclick>,<BaudRate>,<PrinterType>,<InterlaceMode>`
10
+
11
+ _Note: Each parameter is optional except the last specified. Do not put a comma after this parameter._
12
+
13
+ ## Parameters
14
+
15
+ ### `<DisplayMode>`
16
+
17
+ #### MSX1
18
+
19
+ |SCREEN|Type|Screen resolution|Colors per block|Max colors at screen|
20
+ |:-:|---|---|---|:-:|
21
+ |0|Text, characters of 6 x 8|40 x 24 characters||2|
22
+ |1|Text, characters of 8 x 8|32 x 24 characters|2 per 8 characters|16|
23
+ |2|Graphic, blocks of 8 x 8|32 x 8 blocks x 3|2 for each 8 x 1 line of block|16|
24
+ |3|Graphic, bitmap|64 × 48 pixels||16|
25
+
26
+ These screen mode are also present on MSX2 or newer with a color palette of 512 by color in extra.
27
+
28
+ `SCREEN 1` is a text screen, but the charset can be filled with game graphics and sprites can also be used.
29
+
30
+ #### MSX2
31
+
32
+ |SCREEN|Type|Screen resolution|Colors per block|Max colors at screen|
33
+ |:-:|---|---|---|:-:|
34
+ |0 (WIDTH>40)|Text, characters of 6 x 8|80 x 24 characters||2+2 of 512 RGB|
35
+ |4|Graphic, blocks of 8 x 8|32 x 8 blocks x 3|2 for each 8 x 1 line of block|16 of 512 RGB|
36
+ |5|Graphic, Bitmap|256 x 212 pixel||16 of 512 RGB|
37
+ |6|Graphic, Bitmap|512 x 212 pixel||4 of 512 RGB|
38
+ |7|Graphic, Bitmap|512 x 212 pixel||16 of 512 RGB|
39
+ |8|Graphic, Bitmap|256 x 212 pixel||256|
40
+
41
+ MSX2 and MSX2+ modes have better sprite possibilities compared to MSX1 modes. On MSX2 and higher you can change between 40x24 and 80x24 `SCREEN 0` mode by using `WIDTH` command.
42
+
43
+ #### Korean MSX2
44
+
45
+ |SCREEN|Type|Screen resolution|Colors per block|Max colors at screen|
46
+ |:-:|---|---|---|:-:|
47
+ |9 (WIDTH<41)|Text, characters of 6 x 16|40 x 24 characters|2 per character|16 of 512 RGB|
48
+ |9 (WIDTH>40)|Text, characters of 6 x 16|80 x 24 characters|2 per character|4 of 512 RGB|
49
+
50
+ `SCREEN 9` is a text mode using a graphic screen (5 or 6). It is A-available only on Korean MSX2 computers and consoles, but version 4 of Hangul BASIC developed by Korean MSX fan Plaire extends `SCREEN 9` to non-Korean MSX2, MSX2+ and MSX turbo R machines, and its working is the same as in the Korean MSX2 consoles.
51
+
52
+ The mode 9 (WIDTH<41) is used on Zemmix consoles only, not on computers. `SCREEN 5` mode is used for this mode instead of `SCREEN 6` used on computers, no matter the width parameter.
53
+
54
+ #### MSX2+
55
+
56
+ |SCREEN|Type|Screen resolution|Colors per block|Max colors at screen|
57
+ |:-:|---|---|---|:-:|
58
+ |10|Graphic, bitmap|256 x 212|16 RGB (or YJK)|16 of 512 RGB (+12499)|
59
+ |11|Graphic, blocks of 4 x 1|64 x 212 blocks|4 YJK (or bitmap)|12499 (+16 of 512 RGB)|
60
+ |12|Graphic, blocks of 4 x 1|64 x 212 blocks|4 YJK|19268|
61
+
62
+ SCREEN10` and `11` are in fact the same mixed RGB/YJK mode with the difference that the graphic instructions from BASIC/BIOS operate
63
+ - in `SCREEN 10` as in `SCREEN 5`.
64
+ - in `SCREEN 11` with direct VRAM values similar to `SCREEN 8` but in YJK mode.
65
+
66
+ Screen is not cleared when `SCREEN 10`/`11` is used to switch from one mode to another. When mode is changed from `SCREEN 12`, the YJK colors are automatically reduced from 19268 colors to 12499 colors.
67
+
68
+ KANJI screens: Besides `SCREEN 0` to `8`, `10` to `12`, the Japanese MSX2+ and MSX turbo R computers have 4 Kanji text modes, that can be activated with `CALL KANJI`.
69
+
70
+ By default, without using of `SET SCREEN` on MSX2 and higher, the MSX-BASIC screen after booting is displayed in `SCREEN 1` on Korean and Arabic MSX1 machines, Bawareth Perfect MSX2, Daewoo CPC-300, Korean MSX2 consoles, Brazilian MSX2+ Ciel machines and all Japanese machines, in `SCREEN 0` on all other machines.
71
+
72
+ ### `<SpriteSize>`
73
+
74
+ - 0: Sprite size is 8 by 8 pixels (default value).
75
+ - 1: Sprite size is 8 by 8 pixels, magnified to 16 by 16 pixels.
76
+ - 2: Sprite size is 16 by 16 pixels.
77
+ - 3: Sprite size is 16 by 16 pixels, magnified to 32 by 32 pixels.
78
+
79
+ ### `<Keyclick>`
80
+
81
+ - 0: Keyclick off.
82
+ - 1: Keyclick on (default value).
83
+
84
+ ### `<BaudRate>`
85
+
86
+ - 1: Cassette writing speed is 1200 baud (default value).
87
+ - 2: Cassette writing speed is 2400 baud.
88
+
89
+ This parameter is ignored on MSX turbo R.
90
+
91
+ ### `<PrinterType>`
92
+
93
+ - 0: MSX printer (default value).
94
+ - 1: No MSX printer.
95
+
96
+ When Arabic BASIC is enabled, this parameter is extended as follows:
97
+
98
+ - 0: Standard MSX printer (default value).
99
+ - 1: Arabic MSX printer.
100
+ - 2: Arabic non-MSX printer.
101
+ - 3: Other printer (or for hard copy without any modification).
102
+
103
+ These 4 options are also available with the `CALL OPTIONS` instruction on Sakhr MSX2 computers.
104
+
105
+ ### `<InterlaceMode>`
106
+
107
+ - 0: Off (default value for SCREEN 0 to 8, 10 to 12).
108
+ - 1: On, displays odd & even pages (default value for SCREEN 9).
109
+ - 2: Off, displays odd / even page alternating.
110
+ - 3: On, displays odd / even page alternating.
111
+
112
+ This parameter requires a MSX2 or higher machine (don't use it on MSX1, it will lead to a _"Syntax error"_ message). Modes 2 and 3 are only possible when uneven pagenumbers are used (see `SET PAGE`).
113
+
114
+ ## Examples
115
+
116
+ ```basic
117
+ 5 ' Example for MSX1
118
+ 10 SCREEN 0: PRINT"You are in SCREEN 0 - Press a key"
119
+ 20 A$=INKEY$
120
+ 30 IF A$="" THEN 20
121
+ 40 ' Baud and printertype are not changed
122
+ 50 SCREEN 2,3,0
123
+ 60 OPEN"GRP:"AS 1:PRINT #1,"You are in SCREEN 2 - Press a key"
124
+ 70 A$=INKEY$
125
+ 80 IF A$="" THEN 70
126
+ 90 ' Back to default values in SCREEN 0
127
+ 100 SCREEN 0,0,1
128
+ ```
129
+
130
+ ```basic
131
+ 5 ' Example for MSX2 and higher
132
+ 10 SCREEN 0: PRINT"You are in SCREEN 0 - Press a key"
133
+ 20 A$=INKEY$
134
+ 30 IF A$="" THEN 20
135
+ 40 ' Baud and printertype are not changed
136
+ 50 SCREEN 2,3,0,,,1
137
+ 60 OPEN"GRP:"AS 1:PRINT #1,"You are in SCREEN 2 - Press a key"
138
+ 70 A$=INKEY$
139
+ 80 IF A$="" THEN 70
140
+ 90 ' Back to default values in SCREEN 0
141
+ 100 SCREEN 0,0,1,,,0
142
+ ```
143
+
144
+ ## How to change the default values
145
+
146
+ With exception for the spritesize, all parameters of `SCREEN` that will be used each time that you boot the computer are stored in the Real Time Clock (RTC) with the `SET SCREEN` command on the MSX2, MSX2+ and MSX turbo R machines.
147
+
148
+ The parameters related to the displaymode are generally limited to screen 0 or screen 1, as these screens are used for the BASIC screen after booting, it implies that the 'alternating even/uneven' parameter is not saved in the RTC.
149
+
150
+ On the mentioned machines, you can change the default values by using first `SCREEN`, then `SET SCREEN` to save the new parameters in the RTC.
151
+
152
+ If you use `SET SCREEN` when you are on `SCREEN 9`, the computer will display the MSX-BASIC screen after booting in `SCREEN 9` instead of `SCREEN 0` or `1`; some parameters of the other screens, especially `SCREEN 0` and `SCREEN 1`, will also be modified.
153
+
154
+ ## Related to
155
+
156
+ `BASE()`, `CALL EDIT`, `CALL KANJI`, `CALL OPTIONS`, `COLOR`, `CSAVE`, `LPRINT`, `LLIST`, `SET PAGE`, `SET SCREEN`, `WIDTH`
157
+
158
+ ## Compatibility
159
+
160
+ MSX-BASIC 1.0 or higher
161
+
162
+ ## Source
163
+
164
+ Retrieved from "https://www.msx.org/wiki/SCREEN"
@@ -0,0 +1,66 @@
1
+ # SET ADJUST
2
+
3
+ ## Effect
4
+
5
+ Sets the top left point of the MSX screen (without the borders) and stores the coordinates in the SRAM of the Real Time Clock (RTC).
6
+
7
+ This instruction is useful on some monitors or televisions to reframe the picture on the screen. It can also create special effects in some demos.
8
+
9
+ ## Syntax
10
+
11
+ `SET ADJUST (<OffsetX>,<OffsetY>)`
12
+
13
+ ## Parameters
14
+
15
+ `<OffsetX>` is the offset on the abscisse from the top left point of the screen. The value is between -7 and 8.
16
+
17
+ `<OffsetY>` is the offset on the ordinate from the top left point of the screen. The value is between -7 and 8.
18
+
19
+ ## Example
20
+
21
+ ```basic
22
+ SET ADJUST (4,-2)
23
+ ```
24
+
25
+ ## Storage in the RTC
26
+
27
+ The Real Time Clock (RTC) is a small storage of 53 bytes in blueMSX (52 bytes in openMSX). It is a little different in blueMSX because this emulator stores an extra setting in #1A, that probably checks if the computer is normally working.
28
+
29
+ The data saved with `SET SCREEN` are stored as follows (hexadecimal locations in the files):
30
+
31
+ - #1C and #1D in blueMSX (#1B and #1C in openMSX).
32
+
33
+ The first byte stores the `<x>` coordinate, the second byte stores the `<y>` coordinate.
34
+
35
+ |Value|x or y|
36
+ |:--|:-:|
37
+ |00|0|
38
+ |01|-1|
39
+ |02|-2|
40
+ |03|-3|
41
+ |04|-4|
42
+ |05|-5|
43
+ |06|-6|
44
+ |07|-7|
45
+ |08|8|
46
+ |09|7|
47
+ |0A|6|
48
+ |0B|5|
49
+ |0C|4|
50
+ |0D|3|
51
+ |0E|2|
52
+ |0F|1|
53
+
54
+ See also the Description of RTC SRAM's Block 2.
55
+
56
+ ## Related to
57
+
58
+ `SET SCROLL`
59
+
60
+ ## Compatibility
61
+
62
+ MSX-BASIC 2.0 or higher
63
+
64
+ ## Source
65
+
66
+ Retrieved from "https://www.msx.org/wiki/SET_ADJUST"