@nataliapc/mcp-openmsx 1.1.15 → 1.2.3

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 (216) hide show
  1. package/README.md +84 -37
  2. package/dist/server.js +101 -40
  3. package/dist/utils.js +42 -2
  4. package/dist/vectordb.js +61 -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-dos/MSX-DOS_2_Environment_Variables.md +1368 -0
  13. package/resources/msx-dos/MSX-DOS_File_extensions.md +154 -0
  14. package/resources/msx-dos/toc.json +13 -0
  15. package/resources/msx-unapi/toc.json +2 -2
  16. package/resources/others/keyboard_matrices.md +243 -0
  17. package/resources/others/toc.json +6 -0
  18. package/resources/programming/asm_callbios.md +79 -0
  19. package/resources/programming/asm_docopy.md +115 -0
  20. package/resources/programming/asm_fast_loops.md +200 -0
  21. package/resources/programming/asm_getslot.md +143 -0
  22. package/resources/programming/asm_interrupts.md +202 -0
  23. package/resources/programming/asm_load_screen.md +240 -0
  24. package/resources/programming/asm_mult_div_shifts.md +487 -0
  25. package/resources/programming/asm_raminpage1.md +56 -0
  26. package/resources/programming/asm_vdp_detection.md +78 -0
  27. package/resources/programming/asm_vdp_routines.md +343 -0
  28. package/resources/programming/asm_z80_routines_collection.md +810 -0
  29. package/resources/programming/basic_wiki/ABS().md +36 -0
  30. package/resources/programming/basic_wiki/AND.md +71 -0
  31. package/resources/programming/basic_wiki/ASC().md +38 -0
  32. package/resources/programming/basic_wiki/ATN().md +36 -0
  33. package/resources/programming/basic_wiki/AUTO.md +39 -0
  34. package/resources/programming/basic_wiki/BASE().md +147 -0
  35. package/resources/programming/basic_wiki/BEEP.md +27 -0
  36. package/resources/programming/basic_wiki/BIN$().md +36 -0
  37. package/resources/programming/basic_wiki/BLOAD.md +63 -0
  38. package/resources/programming/basic_wiki/BSAVE.md +61 -0
  39. package/resources/programming/basic_wiki/CALL.md +391 -0
  40. package/resources/programming/basic_wiki/CALL_ADJUST.md +40 -0
  41. package/resources/programming/basic_wiki/CALL_IMPOSE.md +28 -0
  42. package/resources/programming/basic_wiki/CALL_OPTIONS.md +26 -0
  43. package/resources/programming/basic_wiki/CALL_PAUSE.md +119 -0
  44. package/resources/programming/basic_wiki/CALL_PCMPLAY.md +60 -0
  45. package/resources/programming/basic_wiki/CALL_PCMREC.md +70 -0
  46. package/resources/programming/basic_wiki/CDBL().md +36 -0
  47. package/resources/programming/basic_wiki/CHR$().md +51 -0
  48. package/resources/programming/basic_wiki/CINT().md +36 -0
  49. package/resources/programming/basic_wiki/CIRCLE.md +51 -0
  50. package/resources/programming/basic_wiki/CLEAR.md +39 -0
  51. package/resources/programming/basic_wiki/CLOAD.md +27 -0
  52. package/resources/programming/basic_wiki/CLOAD?.md +31 -0
  53. package/resources/programming/basic_wiki/CLOSE.md +44 -0
  54. package/resources/programming/basic_wiki/CLS.md +51 -0
  55. package/resources/programming/basic_wiki/COLOR.md +143 -0
  56. package/resources/programming/basic_wiki/COLOR=.md +93 -0
  57. package/resources/programming/basic_wiki/COLOR_SPRITE$().md +83 -0
  58. package/resources/programming/basic_wiki/COLOR_SPRITE().md +85 -0
  59. package/resources/programming/basic_wiki/CONT.md +23 -0
  60. package/resources/programming/basic_wiki/COPY.md +215 -0
  61. package/resources/programming/basic_wiki/COPY_SCREEN.md +61 -0
  62. package/resources/programming/basic_wiki/COS().md +37 -0
  63. package/resources/programming/basic_wiki/CSAVE.md +35 -0
  64. package/resources/programming/basic_wiki/CSNG().md +36 -0
  65. package/resources/programming/basic_wiki/CSRLIN.md +33 -0
  66. package/resources/programming/basic_wiki/DATA.md +47 -0
  67. package/resources/programming/basic_wiki/DEFDBL.md +40 -0
  68. package/resources/programming/basic_wiki/DEFINT.md +40 -0
  69. package/resources/programming/basic_wiki/DEFSNG.md +40 -0
  70. package/resources/programming/basic_wiki/DEFSTR.md +40 -0
  71. package/resources/programming/basic_wiki/DEF_FN.md +49 -0
  72. package/resources/programming/basic_wiki/DEF_USR.md +33 -0
  73. package/resources/programming/basic_wiki/DELETE.md +49 -0
  74. package/resources/programming/basic_wiki/DIM.md +59 -0
  75. package/resources/programming/basic_wiki/DRAW.md +77 -0
  76. package/resources/programming/basic_wiki/ELSE.md +45 -0
  77. package/resources/programming/basic_wiki/END.md +32 -0
  78. package/resources/programming/basic_wiki/EOF().md +36 -0
  79. package/resources/programming/basic_wiki/EQV.md +76 -0
  80. package/resources/programming/basic_wiki/ERASE.md +35 -0
  81. package/resources/programming/basic_wiki/ERL.md +34 -0
  82. package/resources/programming/basic_wiki/ERR.md +143 -0
  83. package/resources/programming/basic_wiki/ERROR.md +145 -0
  84. package/resources/programming/basic_wiki/EXP().md +38 -0
  85. package/resources/programming/basic_wiki/FIELD.md +48 -0
  86. package/resources/programming/basic_wiki/FIX().md +44 -0
  87. package/resources/programming/basic_wiki/FN.md +61 -0
  88. package/resources/programming/basic_wiki/FOR...NEXT.md +80 -0
  89. package/resources/programming/basic_wiki/FRE().md +66 -0
  90. package/resources/programming/basic_wiki/GET_DATE.md +60 -0
  91. package/resources/programming/basic_wiki/GET_TIME.md +34 -0
  92. package/resources/programming/basic_wiki/GOSUB.md +41 -0
  93. package/resources/programming/basic_wiki/GOTO.md +41 -0
  94. package/resources/programming/basic_wiki/HEX$().md +36 -0
  95. package/resources/programming/basic_wiki/IF...GOTO...ELSE.md +55 -0
  96. package/resources/programming/basic_wiki/IF...THEN...ELSE.md +50 -0
  97. package/resources/programming/basic_wiki/IMP.md +83 -0
  98. package/resources/programming/basic_wiki/INKEY$.md +65 -0
  99. package/resources/programming/basic_wiki/INP().md +33 -0
  100. package/resources/programming/basic_wiki/INPUT$().md +51 -0
  101. package/resources/programming/basic_wiki/INPUT.md +93 -0
  102. package/resources/programming/basic_wiki/INSTR().md +44 -0
  103. package/resources/programming/basic_wiki/INT().md +44 -0
  104. package/resources/programming/basic_wiki/INTERVAL.md +57 -0
  105. package/resources/programming/basic_wiki/KEY().md +51 -0
  106. package/resources/programming/basic_wiki/KEY.md +254 -0
  107. package/resources/programming/basic_wiki/LEFT$().md +39 -0
  108. package/resources/programming/basic_wiki/LEN().md +36 -0
  109. package/resources/programming/basic_wiki/LET.md +68 -0
  110. package/resources/programming/basic_wiki/LINE.md +74 -0
  111. package/resources/programming/basic_wiki/LINE_INPUT.md +79 -0
  112. package/resources/programming/basic_wiki/LIST.md +58 -0
  113. package/resources/programming/basic_wiki/LLIST.md +43 -0
  114. package/resources/programming/basic_wiki/LOAD.md +56 -0
  115. package/resources/programming/basic_wiki/LOCATE.md +67 -0
  116. package/resources/programming/basic_wiki/LOG().md +36 -0
  117. package/resources/programming/basic_wiki/LPOS().md +31 -0
  118. package/resources/programming/basic_wiki/LPRINT.md +46 -0
  119. package/resources/programming/basic_wiki/MAXFILES.md +39 -0
  120. package/resources/programming/basic_wiki/MERGE.md +54 -0
  121. package/resources/programming/basic_wiki/MID$().md +72 -0
  122. package/resources/programming/basic_wiki/MOD.md +39 -0
  123. package/resources/programming/basic_wiki/MOTOR.md +46 -0
  124. package/resources/programming/basic_wiki/NEW.md +27 -0
  125. package/resources/programming/basic_wiki/NOT.md +61 -0
  126. package/resources/programming/basic_wiki/OCT$().md +36 -0
  127. package/resources/programming/basic_wiki/ON...GOSUB.md +45 -0
  128. package/resources/programming/basic_wiki/ON...GOTO.md +42 -0
  129. package/resources/programming/basic_wiki/ON_ERROR_GOTO.md +61 -0
  130. package/resources/programming/basic_wiki/ON_INTERVAL_GOSUB.md +54 -0
  131. package/resources/programming/basic_wiki/ON_KEY_GOSUB.md +56 -0
  132. package/resources/programming/basic_wiki/ON_SPRITE_GOSUB.md +41 -0
  133. package/resources/programming/basic_wiki/ON_STOP_GOSUB.md +56 -0
  134. package/resources/programming/basic_wiki/ON_STRIG_GOSUB.md +70 -0
  135. package/resources/programming/basic_wiki/OPEN.md +103 -0
  136. package/resources/programming/basic_wiki/OR.md +75 -0
  137. package/resources/programming/basic_wiki/OUT.md +35 -0
  138. package/resources/programming/basic_wiki/PAD().md +110 -0
  139. package/resources/programming/basic_wiki/PAINT.md +66 -0
  140. package/resources/programming/basic_wiki/PDL().md +53 -0
  141. package/resources/programming/basic_wiki/PEEK().md +44 -0
  142. package/resources/programming/basic_wiki/PLAY().md +58 -0
  143. package/resources/programming/basic_wiki/PLAY.md +196 -0
  144. package/resources/programming/basic_wiki/POINT.md +52 -0
  145. package/resources/programming/basic_wiki/POKE.md +51 -0
  146. package/resources/programming/basic_wiki/POS().md +36 -0
  147. package/resources/programming/basic_wiki/PRESET.md +61 -0
  148. package/resources/programming/basic_wiki/PRINT.md +179 -0
  149. package/resources/programming/basic_wiki/PSET.md +82 -0
  150. package/resources/programming/basic_wiki/PUT_KANJI.md +93 -0
  151. package/resources/programming/basic_wiki/PUT_SPRITE.md +143 -0
  152. package/resources/programming/basic_wiki/READ.md +45 -0
  153. package/resources/programming/basic_wiki/REM.md +42 -0
  154. package/resources/programming/basic_wiki/RENUM.md +78 -0
  155. package/resources/programming/basic_wiki/RESTORE.md +52 -0
  156. package/resources/programming/basic_wiki/RESUME.md +45 -0
  157. package/resources/programming/basic_wiki/RETURN.md +47 -0
  158. package/resources/programming/basic_wiki/RIGHT$().md +39 -0
  159. package/resources/programming/basic_wiki/RND().md +51 -0
  160. package/resources/programming/basic_wiki/RUN.md +56 -0
  161. package/resources/programming/basic_wiki/SAVE.md +65 -0
  162. package/resources/programming/basic_wiki/SCREEN.md +164 -0
  163. package/resources/programming/basic_wiki/SET_ADJUST.md +66 -0
  164. package/resources/programming/basic_wiki/SET_BEEP.md +76 -0
  165. package/resources/programming/basic_wiki/SET_DATE.md +103 -0
  166. package/resources/programming/basic_wiki/SET_PAGE.md +52 -0
  167. package/resources/programming/basic_wiki/SET_PASSWORD.md +75 -0
  168. package/resources/programming/basic_wiki/SET_PROMPT.md +61 -0
  169. package/resources/programming/basic_wiki/SET_SCREEN.md +100 -0
  170. package/resources/programming/basic_wiki/SET_SCROLL.md +55 -0
  171. package/resources/programming/basic_wiki/SET_TIME.md +83 -0
  172. package/resources/programming/basic_wiki/SET_TITLE.md +87 -0
  173. package/resources/programming/basic_wiki/SET_VIDEO.md +49 -0
  174. package/resources/programming/basic_wiki/SGN().md +38 -0
  175. package/resources/programming/basic_wiki/SIN().md +36 -0
  176. package/resources/programming/basic_wiki/SOUND.md +188 -0
  177. package/resources/programming/basic_wiki/SPACE$().md +38 -0
  178. package/resources/programming/basic_wiki/SPC().md +34 -0
  179. package/resources/programming/basic_wiki/SPRITE$().md +50 -0
  180. package/resources/programming/basic_wiki/SPRITE.md +31 -0
  181. package/resources/programming/basic_wiki/SQR().md +32 -0
  182. package/resources/programming/basic_wiki/STICK().md +70 -0
  183. package/resources/programming/basic_wiki/STOP.md +70 -0
  184. package/resources/programming/basic_wiki/STR$().md +37 -0
  185. package/resources/programming/basic_wiki/STRIG().md +82 -0
  186. package/resources/programming/basic_wiki/STRING$().md +42 -0
  187. package/resources/programming/basic_wiki/SWAP.md +62 -0
  188. package/resources/programming/basic_wiki/TAB().md +38 -0
  189. package/resources/programming/basic_wiki/TAN().md +36 -0
  190. package/resources/programming/basic_wiki/TIME.md +59 -0
  191. package/resources/programming/basic_wiki/TROFF.md +21 -0
  192. package/resources/programming/basic_wiki/TRON.md +39 -0
  193. package/resources/programming/basic_wiki/USR().md +66 -0
  194. package/resources/programming/basic_wiki/VAL().md +36 -0
  195. package/resources/programming/basic_wiki/VARPTR().md +50 -0
  196. package/resources/programming/basic_wiki/VDP().md +103 -0
  197. package/resources/programming/basic_wiki/VPEEK().md +46 -0
  198. package/resources/programming/basic_wiki/VPOKE.md +48 -0
  199. package/resources/programming/basic_wiki/WAIT.md +38 -0
  200. package/resources/programming/basic_wiki/WIDTH.md +76 -0
  201. package/resources/programming/basic_wiki/XOR.md +72 -0
  202. package/resources/programming/basic_wiki/_toc.json +871 -0
  203. package/resources/programming/dos_error_handling.md +85 -0
  204. package/resources/programming/toc.json +51 -36
  205. package/resources/programming/vdp_commands_speed.md +147 -0
  206. package/resources/programming/vdp_programming_faq.md +55 -0
  207. package/resources/programming/vdp_programming_tutorial.md +390 -0
  208. package/resources/programming/vdp_screensplit_programming_guide.md +166 -0
  209. package/resources/programming/vdp_scrolling_on_msx.md +124 -0
  210. package/resources/programming/vdp_the_yjk_screen_modes.md +227 -0
  211. package/resources/programming/vdp_v9938_vram_timings.md +539 -0
  212. package/resources/programming/vdp_v9938_vram_timings_part_2.md +281 -0
  213. package/resources/sdcc/toc.json +1 -1
  214. package/vector-db/index.json +1 -0
  215. /package/resources/msx-unapi/{Ethernet_UNAPI_specification_1.1.md → Ethernet_UNAPI_specification_1_1.md} +0 -0
  216. /package/resources/msx-unapi/{MSX_UNAPI_specification_1.1.md → MSX_UNAPI_specification_1_1.md} +0 -0
@@ -0,0 +1,110 @@
1
+ # PAD()
2
+
3
+ ## Effect
4
+
5
+ Returns several infos about different input devices: graphic tablet or touchpad, light pen, mouse or trackball. With exception of the light pen that has its specific connector, all the mentioned devices can be connected to a joystick port.
6
+
7
+ _Notes:_
8
+ - infos about light pen are only available on MSX2 and MSX2+ (the support has been removed on MSX turbo R).
9
+ - infos about mouse or trackball are only available on MSX2 and higher.
10
+ - the button state of the mouse must be retrieved with the STRIG() instruction
11
+ check also the following pages for more info: Touchpad, Light pen, Mouse/Trackball.
12
+
13
+ ## Syntax
14
+
15
+ `PAD(<Number>)`
16
+
17
+ ## Parameter
18
+
19
+ `<Number>` is a value:
20
+ - between 0 and 7 on MSX1 computers.
21
+ - between 0 and 19 on most MSX2 computers, all MSX2+ and MSX turbo R machines.
22
+ - between 0 and 23 on MSX2 computers manufactured by Daewoo (+ probably Sanyo MPC-X and Sanyo MPC-27).
23
+
24
+ You must always check the state of the graphic tablet, touchpad or light pen before trying to get the coordinates. Besides, the internal lightpen interface, present in some MSX2 computers, needs first to be enabled with `CALL ADJUST`. Another preliminary step is required for the mouse or the trackball.
25
+
26
+ |Number|Device|Joystick port|Returned info|
27
+ |:-:|---|:-:|---|
28
+ |0|Graphic Tablet / Touchpad|1|State of the device: -1 if the device is touched and 0 if not|
29
+ |1|´´|1|X-coordinate|
30
+ |2|´´|1|Y-coordinate|
31
+ |3|´´|1|State of the button: -1 if the button is pressed and 0 if not|
32
+ |4|´´|2|State of the device: -1 if the device is touched and 0 if not|
33
+ |5|´´|2|X-coordinate|
34
+ |6|´´|2|Y-coordinate|
35
+ |7|´´|2|State of the button: -1 if the button is pressed and 0 if not|
36
+ |8|Light Pen (external or built-in MSX1 interface)|-|State of the light pen: -1 if the light pen is ready and 0 if not (always 0 on MSX Turbo R)|
37
+ |9|´´|-|X-coordinate (always 0 on MSX Turbo R)|
38
+ |10|´´|-|Y-coordinate (always 0 on MSX Turbo R)|
39
+ |11|´´|-|State of the button: -1 if the button is pressed and 0 if not (always 0 on MSX Turbo R)|
40
+ |12|Mouse / Trackball|1|The X/Y-offset of the device is retrieved and can be queried by using `PAD(13)` and `PAD(14)`. The returned value of `PAD(12)` is always -1.|
41
+ |13|´´|1|X-offset (-128 to +127)|
42
+ |14|´´|1|Y-offset (-128 to +127)|
43
+ |15|´´|1|Always 0 (is reserved for mouse/trackball in joystick port 1, but has never been used)|
44
+ |16|´´|2|The X/Y-offset of the device is retrieved and can be queried by using `PAD(17)` and `PAD(18)`. The returned value of `PAD(16)` is always -1.|
45
+ |17|´´|2|X-offset (-128 to +127)|
46
+ |18|´´|2|Y-offset (-128 to +127)|
47
+ |19|´´|2|Always 0 (is reserved for mouse/trackball in joystick port 2, but has never been used)|
48
+ |20|Light Pen (internal MSX2 interface)<sup>(*)</sup>|1|State of the light pen: -1 if the light pen is ready and 0 if not|
49
+ |21|´´|1|X-coordinate|
50
+ |22|´´|1|Y-coordinate|
51
+ |23|´´|1|State of the button: -1 if the button is pressed and 0 if not|
52
+
53
+ <sup>(\*)</sup> Only with MSX2 computers manufactured by Daewoo:
54
+ - AVT CPC-300
55
+ - Bawareth Perfect MSX2
56
+ - Daewoo CPC-300
57
+ - Daewoo CPC-400
58
+ - Daewoo CPC-400S
59
+ - Talent DPC-300
60
+ - Wandy CPC-300
61
+
62
+ Maybe also with the Sanyo MPC-X Graphic Expander Unit and the Sanyo MPC-27 computer.
63
+
64
+ ## Examples
65
+
66
+ ```basic
67
+ 10 SCREEN 2
68
+ 20 A=0
69
+ 30 IF PAD(0)=0 THEN 20
70
+ 40 X=PAD(1):Y=PAD(2)
71
+ 50 IF A=0 THEN PSET(X,Y) ELSE LINE-(X,Y)
72
+ 60 A=1
73
+ 70 GOTO 30
74
+ ```
75
+ ```basic
76
+ 10 SCREEN 1
77
+ 20 LOCATE 2, 4 : PRINT "MOUSE ON PORT 1: "; PAD(12);
78
+ 30 LOCATE 2, 5 : PRINT "MOUSE 1 X: "; PAD(13);
79
+ 40 LOCATE 2, 6 : PRINT "MOUSE 1 Y: "; PAD(14);
80
+ 50 LOCATE 2, 8 : PRINT "MOUSE ON PORT 2: "; PAD(16);
81
+ 60 LOCATE 2, 9 : PRINT "MOUSE 2 X: "; PAD(17);
82
+ 70 LOCATE 2, 10 : PRINT "MOUSE 2 Y: "; PAD(18);
83
+ 80 LOCATE 2, 12 : PRINT "MOUSE 1 BUTTON ";
84
+ 90 IF STRIG(1) <> 0 THEN PRINT "PRESSED " ELSE PRINT "RELEASED"
85
+ 100 IF STRIG(0) <> 0 THEN END
86
+ 110 GOTO 20
87
+ ```
88
+ ```basic
89
+ 10 SCREEN 1
90
+ 20 A$=STRING$(8,255)
91
+ 30 SPRITE$(0) = A$
92
+ 40 PUT SPRITE 0,(100, 100),15,0
93
+ 50 IF PAD(12) <> 0 THEN PUT SPRITE 0, STEP(PAD(13), PAD(14))
94
+ 60 LOCATE 5, 12 : PRINT "MOUSE BUTTON ";
95
+ 70 IF STRIG(1) <> 0 THEN PRINT "PRESSED " ELSE PRINT "RELEASED"
96
+ 80 IF STRIG(0) <> 0 THEN END
97
+ 90 GOTO 50
98
+ ```
99
+
100
+ ## Related to
101
+
102
+ `CALL ADJUST`, `INKEY$`, `PDL()`, `STICK()`, `STRIG()`
103
+
104
+ ## Compatibility
105
+
106
+ MSX-BASIC 1.0 or higher
107
+
108
+ ## Source
109
+
110
+ Retrieved from "https://www.msx.org/wiki/PAD()"
@@ -0,0 +1,66 @@
1
+ # PAINT
2
+
3
+ ## Effect
4
+
5
+ Fills the zone of a drawing in graphic screen (2 to 8, 10 to 12) with the specified color.
6
+
7
+ ## Syntax
8
+
9
+ `PAINT STEP(<X>,<Y>),<FillingColor>,<BorderColor>`
10
+
11
+ _Note: Parameters can not end with a comma alone._
12
+
13
+ ## Parameters
14
+
15
+ `<X>` is coordinate X (0-255/511) of the starting point to paint a zone of the drawing.
16
+
17
+ `<Y>` is coordinate Y (0-191/211) of the starting point to paint a zone of the drawing.
18
+
19
+ Coordinates cannot be omitted.
20
+
21
+ If `STEP` is used before these starting coordinates, they are interpreted relative to the current cursor position. In this case the values can also be negative.
22
+
23
+ `<FillingColor>` is the color to be used for painting a zone of the drawing. If `<FillingColor>` is not specified the current foreground color is used.
24
+
25
+ `<BorderColor>` is the color to be used as limit of the zone to paint. If `<BorderColor>` is not specified the current draw color is used. If the border line is not fully uninterrupted, the entire screen will be painted. It implies that it is recommended to specify a `<BorderColor>` corresponding to the border line of the zone to paint.
26
+
27
+ Both colors can receive different values according the used screen: 0 to 15 (screens 2 to 5, 7 and 10), 0 to 3 (screen 6), 0 to 255 (screens 8, 11, and 12). However, in screens 2 and 4, `<FillingColor>` needs to be the same color as the border line of the part to paint; in this case, you can omit the `<BorderColor>`.
28
+
29
+ ## Examples
30
+
31
+ ```basic
32
+ 10 COLOR 15,4,7:SCREEN 2
33
+ 20 CIRCLE (80,80),20,8
34
+ 30 PAINT (80,80),8
35
+ 40 GOTO 40
36
+ ```
37
+ ```basic
38
+ 10 COLOR 15,4,7:SCREEN 3
39
+ 20 LINE (10,10)-(100,100),8,B
40
+ 30 PAINT (45,45),2,8
41
+ 40 GOTO 40
42
+ ```
43
+ ```basic
44
+ 10 COLOR 15,4,7:SCREEN 7
45
+ 20 CIRCLE (100,100),40,8
46
+ 30 PAINT (100,100),2,8
47
+ 40 GOTO 40
48
+ ```
49
+ ```basic
50
+ 10 SCREEN 8:COLOR 30,60,90
51
+ 20 CIRCLE (100,100),100,150
52
+ 30 PAINT (100,100),56,150
53
+ 40 GOTO 40
54
+ ```
55
+
56
+ ## Related to
57
+
58
+ `CIRCLE`, `COLOR`, `DRAW`, `LINE`, `PRESET`, `PSET`, `SCREEN`
59
+
60
+ ## Compatibility
61
+
62
+ MSX-BASIC 1.0 or higher
63
+
64
+ ## Source
65
+
66
+ Retrieved from "https://www.msx.org/wiki/PAINT"
@@ -0,0 +1,53 @@
1
+ # PDL()
2
+
3
+ ## Effect
4
+
5
+ Returns the position of asked paddle, connected to a joystick port. The returned position value can vary between 0 and 255.
6
+
7
+ _Notes:_
8
+ - Paddle controllers support is removed on MSX turbo R and these devices are unused on MSXPLAYer.
9
+ - See also MSX Paddle Controller for more information.
10
+
11
+ ## Syntax
12
+
13
+ `PDL(<PaddleNumber>)`
14
+
15
+ ## Parameter
16
+
17
+ `<PaddleNumber>` is a value between 1 and 12 to select the paddle controller to read.
18
+
19
+ |Paddle controller number|Used general port|
20
+ |:--|:-:|
21
+ |1, 3, 5, 7, 9 or 11|1|
22
+ |2, 4, 6, 8, 10 or 12|2|
23
+
24
+ ## Example
25
+
26
+ ```basic
27
+ 5 ' Sample program to use Paddle controllers 1 & 2 in port 1 & 2
28
+ 10 COLOR 15,1,1:SCREEN2,2
29
+ 20 SPRITE$(0)=STRING$(6,CHR$(255))+STRING$(10,CHR$(0))+STRING$(6,CHR$(255))+STRING$(10,CHR$(0))
30
+ 30 SPRITE$(1)=STRING$(16,CHR$(252))+STRING$(16,CHR$(0))
31
+ 40 LINE(0,0)-(37,5),15,BF: LINE(218,0)-(255,5),15,BF
32
+ 50 LINE(0,186)-(37,191),15,BF: LINE(218,186)-(255,191),15,BF
33
+ 60 X=PDL(1):X2=PDL(3):Y=PDL(2):Y2=PDL(4)
34
+ 70 IF X>162 THEN X=162
35
+ 80 IF X2>162 THEN X2=162
36
+ 90 IF Y>162 THEN Y=162
37
+ 100 IF Y2>162 THEN Y2=162
38
+ 110 PUTSPRITE 0,(X+39,-1): PUTSPRITE 2,(X2+39,185),,0
39
+ 120 PUTSPRITE 1,(0,Y+6): PUTSPRITE 3,(250,Y2+6),,1
40
+ 130 GOTO 60
41
+ ```
42
+
43
+ ## Related to
44
+
45
+ `INKEY$`, `PAD()`, `STICK()`, `STRIG()`
46
+
47
+ ## Compatibility
48
+
49
+ MSX-BASIC 1.0 or higher
50
+
51
+ ## Source
52
+
53
+ Retrieved from "https://www.msx.org/wiki/PDL()"
@@ -0,0 +1,44 @@
1
+ # PEEK()
2
+
3
+ ## Effect
4
+
5
+ Returns the value read from a byte of the memory (RAM).
6
+
7
+ ## Syntax
8
+
9
+ `PEEK(<Address>)`
10
+
11
+ ## Parameter
12
+
13
+ `<Address>` must be in the range -32768 to 65535. It's a decimal number in single precision, but you can also specify an address in hexadecimal form.
14
+
15
+ If `<Address>` is negative the binary complement is used. This means `PEEK(-1)`=`PEEK(65536-1)`=`PEEK(65535)`.
16
+
17
+ ## Examples
18
+
19
+ ```basic
20
+ 10 POKE 60000!, 11
21
+ 20 PRINT PEEK(60000!)
22
+  
23
+ RUN
24
+ 11
25
+ ```
26
+ ```basic
27
+ 10 POKE &HEA60, 11
28
+ 20 PRINT PEEK(&HEA60)
29
+  
30
+ RUN
31
+ 11
32
+ ```
33
+
34
+ ## Related to
35
+
36
+ `BLOAD`, `BSAVE`, `POKE`, `VARPTR()`, `VPEEK()`, `VPOKE`
37
+
38
+ ## Compatibility
39
+
40
+ MSX-BASIC 1.0 or higher
41
+
42
+ ## Source
43
+
44
+ Retrieved from "https://www.msx.org/wiki/PEEK()"
@@ -0,0 +1,58 @@
1
+ # PLAY()
2
+
3
+ ## Effect
4
+
5
+ Checks if music is being played via PSG channels.
6
+
7
+ The function returns -1 (true) if the selected channel is playing. If playing has ended the function returns 0 (false) again.
8
+
9
+ If the function is called immediately after the `PLAY` statement the value -1 is persistent.
10
+
11
+ ## Syntax
12
+
13
+ `PLAY(<Channel>)`
14
+
15
+ ## Parameter
16
+
17
+ `<Channel>` allows to specify the PSG channel(s) to check:
18
+ - 0 = all channels
19
+ - 1 = channel 1
20
+ - 2 = channel 2
21
+ - 3 = channel 3
22
+
23
+ ## Examples
24
+
25
+ ```basic
26
+ 10 PLAY "CDE"
27
+ 20 IF PLAY(0) THEN 20 ' Wait for playing to end on all channels
28
+ ```
29
+ ```basic
30
+ 10 A$="":BEEP
31
+ 20 FOR I=1 TO 6
32
+ 30 READ AA$:A$=A$+AA$
33
+ 40 NEXT I
34
+ 50 PLAY "XA$;"
35
+ 60 SCREEN 0:CLS
36
+ 70 IF PLAY(0)=-1 THEN PRINT "The music is playing":GOTO 70
37
+ 80 PRINT "The music has ended"
38
+ 90 END
39
+ 100 DATA CCGGAAGR
40
+ 110 DATA FFEEDDCR
41
+ 120 DATA GGFFEEDR
42
+ 130 DATA GGFFEEDR
43
+ 140 DATA CCGGAAGR
44
+ 150 DATA FFEEDDCR
45
+ ```
46
+
47
+ ## Related to
48
+
49
+ `BEEP`, `CALL PLAY`, `PLAY`
50
+
51
+ ## Compatibility
52
+
53
+ MSX-BASIC 1.0 or higher
54
+
55
+
56
+ ## Source
57
+
58
+ Retrieved from "https://www.msx.org/wiki/PLAY()"
@@ -0,0 +1,196 @@
1
+ # PLAY
2
+
3
+ ## Effect
4
+
5
+ Executes the instructions of a Music Macro Language (MML) allowing to play notes on one or several PSG channels (and optionally on MSX-AUDIO/PCM, MSX-MUSIC or MSX-MIDI).
6
+
7
+ _Note: If you use `BEEP` all values of the MML instructions will be reset to their default values._
8
+
9
+ ## Syntax
10
+
11
+ `PLAY #<Device>,"<MmlStringChannel1>","<MmlStringChannel2>",...,"<MmlStringChannel13>"`
12
+
13
+ _Note: Do not put a comma if no MML string is behind. If no parameter is required for one channel between two others, put only the two quotation marks._
14
+
15
+ ## Parameters
16
+
17
+ `<Device>` is a number that defines the used sound chip. This parameter is available only after `CALL AUDIO` or `CALL MUSIC` has been executed:
18
+ - 0 = PSG (default value - can be omitted)
19
+ - 1 = MSX-MIDI (optional - requires MSX-MUSIC Basic and a MSX-MIDI hardware)
20
+ - 2 or 3 = MSX-AUDIO or MSX-MUSIC depending on the chip activated by `CALL AUDIO` or `CALL MUSIC`, optionally with PCM and PSG.
21
+
22
+ There is no any difference between modes 2 and 3.
23
+
24
+ `<MmlStringChannel>` for each music channel is a string of macro language instructions that describe the notes to play. Maximum length is 255 characters per string.
25
+
26
+ When using only PSG, the simplified syntax is therefore:
27
+
28
+ `PLAY ["<MML string - PSG Channel 1>"], ["<MML string - PSG Channel 2>"], ["<MML string - PSG Channel 3>"]`
29
+
30
+ When using MSX-MUSIC or MSX-MIDI, the maximum of FM or MIDI melody strings can't exceed the number of FM or MIDI melody channels enabled with `CALL MUSIC`. However, there's a special rule for the 7th and 8th strings when mode 1 is specified with `CALL MUSIC` on MSX turbo R with MSX-MIDI.
31
+
32
+ The first strings are for the FM or MIDI melody channels, the next one is for the FM or MIDI rhythm, the next 3 strings can be used for the PSG channels. If the selected mode does not have a FM or MIDI rhythm, you have to omit the corresponding string with a comma.
33
+
34
+ When using MSX-AUDIO, the maximum of FM melody strings can't exceed the number of FM melody channels enabled with `CALL AUDIO`.
35
+
36
+ The first strings are for the FM melody channels, the next one is for PCM, the next one is for the FM rhythm, the next 3 strings can be used for the PSG channels. If the selected mode does not have PCM and/or FM rhythm, you have to omit the corresponding strings with a comma.
37
+
38
+ ## MML instructions
39
+
40
+ MML has the following instructions:
41
+
42
+ ### Commin
43
+
44
+ |Instruction|Effect|Values / Remarks|
45
+ |:-:|---|---|
46
+ |A to G [\<halftone>][\<octave>][\<period>]|Specifies a note from the scale, optionally with a specific increasing / decreasing halftone and/or octave and/or period|<li>\<halftone> = + or # for increasing halftone (sharp), - for decreasing halftone (flat)<li>\<octave>=1 to 8 (default value: 4)<li>\<period>=one or several . (dots), each . lengthens note by 1.5|
47
+ |L\<length>|Specifies the length of the notes after this instruction|<li>\<length>=1 to 64 (MIDI: 1 to 96)<li>(FM) 1=full note 2=half note 3=third note 4=quarter note (default value) etc...<li>(MIDI) 96=full note 48=half note 32=third note 24=quarter note (default value) etc...<li>If no length is specifed the length of the last played note is used|
48
+ |N\<number>[\<period>]|Specifies the note corresponding to the number (or pitch) - Beware! It's not a MIDI note number, but a number on a conventional scale.|<li>\<number>=0 to 96<li>If \<number>= 0 no sound is generated. In this case a short pause is played before the remaining part<li>\<period>=one or several . (dots), each . lengthens note by 1.5|
49
+ |O\<octave>|Specifies the octave of the notes after this instruction|\<octave>=1 to 8 (default value: 4)|
50
+ |R\<pause>[\<period>]|Specifies a pause (or rest)|<li>\<pause>=1 to 64 (MIDI: 1 to 96)<li>(FM) 1=full pause 2=half pause 3=third pause 4=quarter pause (default value) etc...<li>(MIDI) 96=full pause 48=half pause 32=third pause 24=quarter pause (default value) etc...<li>If no pause is specified the length specified by the last L instruction will be applied<li>\<period>=one or several . (dots), each . lengthens pause by 1.5|
51
+ |T\<tempo>|Specifies the tempo of the notes after this instruction|<li>\<tempo>=32 to 255 (default value: 120)<li>it indicates the number of quarter notes per minute<li>If no tempo is set the tempo of the last played note will be used|
52
+ |V\<volume>|Specifies the volume of the notes or the MIDI velocity after this instruction (when applied to FM rhythm, it's only for the non-accented voices)|<li>\<volume>=0 to 15 (default value: 8)<li>If no volume is set the volume of the last played note will be used<li>For MIDI instruments, the value is multiplied by 8 to modify the velocity of the note output|
53
+ |X\<string>;|Executes a sub-string A$ of instructions|<li>String-variables can be used within PLAY MML instructions<li>A X needs to be prefixed and all variables must be closed by a ';'<li>Adding other MML instructions after the last ';' will result in error|
54
+ |=\<variable>;|Puts a parameter in a integer-variable after one of several sub-strings of instructions (see X instruction)|<li>Variables can be used within PLAY MML instructions<li>The value range is determined by the preceding MML but it cannot exceed the value 32767<li>Adding other MML instructions after the last ';' will result in error|
55
+ |\<|Decreases one octave|Can be used after `CALL AUDIO` or `CALL MUSIC`, also with PSG|
56
+ |\>|Increases one octave|Can be used after `CALL AUDIO` or `CALL MUSIC`, also with PSG|
57
+ |\&|Connects two notes (Tie)|<li>Can be used after `CALL AUDIO` or `CALL MUSIC`, also with PSG<li>When placed between two notes with the same pitch, it extends the length of the notes to the equivalent of two notes<li>When the notes on both sides of this instruction have a different pitch, only the note in front will be played for 100% of its value.|
58
+
59
+ ### Only for PSG
60
+
61
+ |Instruction|Effect|Values / Remarks|
62
+ |:-:|---|---|
63
+ |M\<frequency>|Specifies the sound modulation (envelope frequency)|<li>\<frequency>=1 to 65536 (default value: 255)<li>If no frequency is specified the last set value will be used<li>See also `SOUND`, registers 11 and 12|
64
+ |S\<pattern>|Specifies an envelope pattern|<li>\<pattern>=0 to 15 (default value: 0)<li>If no envelope pattern is specified the last set value will be used<li>See also `SOUND`, register 13|
65
+
66
+ ### Only for MSX-AUDIO/PCM and MSX-MUSIC
67
+
68
+ |Instruction|Effect|Values / Remarks|
69
+ |:-:|---|---|
70
+ |Y\<register>,\<value>|Writes value directly in a register of the sound generator|<li>\<value>=0 to 255<li>Useful for example to change the pitch of the FM rhythm sound<li>See also `CALL AUDREG`|
71
+
72
+ ### Only for MSX-AUDIO/PCM and MSX-MUSIC/MIDI
73
+
74
+ |Instruction|Effect|Values / Remarks|
75
+ |:-:|---|---|
76
+ |Q\<division>|Divides the length of the sound|\<division>=1 to 8 (default value: 8)|
77
+ |{\<string>}\<tuplet length>|Defines a tuplet (duplet, triplet, quadruplet, quintuplet, etc..)|<li>\<tuplet length>=1 to 64 (FM) or 1 to 96 (MIDI) (default value= length value set with L<length>)<li>Generates even notes<li>Quantity of notes is equal to the quantity of pitches enclosed between { }<li>Each length is equal to the length of a nth note divided by the quantity of the pitches|
78
+ |@\<voice>|Changes used FM voice or tone color of MIDI equipment|<li>\<voice>=0 to 63 for FM, 0 to 127 for MIDI<li>See `CALL MK VOICE`, `CALL VOICE` or `CALL VOICE COPY` for FM table<li>Can also be used for the MIDI rhythm, it will be ignored by the built-in FM sound source|
79
+ |@V\<tuning>|Makes a fine tuning of the FM volume or the MIDI Control Change # 7 output|\<tuning>=0 to 127|
80
+ |@W\<state length>|Continues the state for a specified length|<li>\<state length>=1 to 64 (MIDI: 1 to 96)<li>default value= length value set with L\<length>|
81
+
82
+ ### Only for MIDI
83
+
84
+ |Instruction|Effect|Values / Remarks|
85
+ |:-:|---|---|
86
+ |Z\<data>|Sends 1 byte data to MSX-MIDI|\<data>=0 to 255|
87
+ |@C\<control>,\<value>|Changes the value of a MIDI control|<li>\<control>=0 to 127<li>\<value>=0 to 127|
88
+ |@H\<channel>|Specifies the MIDI channel to be used|\<channel>=0 to 16|
89
+ |@S\<clock mode>|Specifies the mode of the MIDI real-time clock|<li>\<clock mode>=0 to 2<li>0=FCH (STOP) - stop the clock<li>1=FAH (START) - start the clock<li>2=FBH (CONTINUE) - start the clock with the tempo specified in the first PLAY string|
90
+
91
+ ### Only for FM or MIDI rhythm
92
+
93
+ |Instruction|Effect|Values / Remarks|
94
+ |:-:|---|---|
95
+ |B|Generates bass drum|For MIDI, first specify note number with `CALL MDR`|
96
+ |C|Generates cymbals|For MIDI, first specify note number with `CALL MDR`|
97
+ |H|Generates hi-hat|For MIDI, first specify note number with `CALL MDR`|
98
+ |M|Generates tom-tom|For MIDI, first specify note number with `CALL MDR`|
99
+ |S|Generates snare drum|For MIDI, first specify note number with `CALL MDR`|
100
+ |\<number>|Generates the musical sounds written up to here, then waits for the length of a n<sup>th</sup> note|\<number>=1 to 64|
101
+ |!|Accents preceeding note||
102
+ |@A\<volume>|Sets the volume for FM accented voices or the MIDI velocity|<li>\<volume>=0 to 15<li>For MIDI instruments, the value is multiplied by 8 to modify the velocity of the note output|
103
+
104
+
105
+ _Notes:_
106
+ - Default Value: Initial value set when `CALL MUSIC` or `CALL AUDIO` is used.
107
+ - FM Rhythm: There are 5 different voices that are available for the rhythm (percussion) MML and up to 3 voices may be played simultaneously. For this reason the rhythm MML first lines up the instruments that are to be played simultaneously.
108
+
109
+ ## Examples
110
+
111
+ ```basic
112
+ 10 PLAY "CDE","EFG"
113
+ ```
114
+
115
+ ---
116
+ ```basic
117
+ PLAY#2,"","","","BSH8H8H8S!H!8H8"
118
+ ```
119
+
120
+ Plays: Bass, snare, hi-hat and wait an 8th note, hi-hat and wait an 8th note, snare, hi-hat plays accented and waits an 8th note, hi-hat and wait an 8th note.
121
+
122
+ ---
123
+ ```basic
124
+ 1 '----->IDENTIFICATION DIVISION
125
+ 2 'BIZET:Carmen(Habanera)
126
+ 3 'by JL2TBB for MSX-MUSIC on HB-F1XD
127
+ 100 '----->ENVIRONMENT DIVISION
128
+ 110 CALLMUSIC(1,0,1,1,1,1,1,1):CALLPITCH(440):CALLTRANSPOSE(0):POKE-1460,20:SOUND6,0:SOUND7,49
129
+ 120 CLEAR3000:DEFSTRA-K:DEFINTL-Z:DIMA(12),B(12),C(12),D(12),E(12),F(12),G(12),H(12),I(12)
130
+ 130 '----->RHYTHM PATTERN
131
+ 140 J="M500C12M200C24":K="M4000C8"
132
+ 150 H(0)="T100SL24"+J+J+K+J+J+J+K+"V10CV9CVDS"+J+J+K+J+J+J+K+J:I(0)="T100R2.R8L24O8VEV7EV6E"
133
+ 160 G(0)="T100V15@A2Y40,5Y24,153BM!24M!24M!24M!12M!24S8R12B8B24B8S4B4S8R12B8B24B8S8Y24,15C8"
134
+ 170 H(1)=LEFT$(H(0),151)+"M5000R12C8R24C4":I(1)=I(0)
135
+ 180 G(1)=LEFT$(G(0),66)+"SCB8R24SCB4"
136
+ 190 G(11)="BCS24BCS4"
137
+ 200 H(10)="RS0M500R4L32CCCCM1000CCCCM1500CCCCM2000CCCC":H(11)="M3000C24C4"
138
+ 210 '----->BASS PATTERN
139
+ 220 A(0)="T100@13V13O3D1.":B(0)="T100@13V14O2D1."
140
+ 230 B(1)="D2.>>@31L24C12DF12DF12GC12DFGA>C<A>CR12V15DR8D<V14"
141
+ 240 B(2)="Q4D8RR12FG8G8A8>QD8Q4<D8RR12FG8G8A8>QE8Q4<":B(3)="D8RR12FG8A8>E8<QA8E8R12GAGA>C+12<AR12>DR8D<"
142
+ 250 B(4)="Q4D8RR12F+G8G8A8>QD8Q4<D8RR12F+G8G8A8>QE8Q4<":B(5)="E8RR12F+G8A8>E8<QA8E8R12GAGA>C+12<AR12>DR8D<"
143
+ 260 B(6)="Y19,0V5L2T150OD.<A.>DE-4E."
144
+ 270 B(7)="<B.>D.C+.<A>C+4":B(8)="E.T130D.T120C+<A":B(10)="T150>V4D"
145
+ 280 '----->MELODY
146
+ 290 A(1)="R1R8OL24@6DCDFGA>C<A>CR@0V13O6Q4L8DD-"
147
+ 300 J="Q6C12C12C12Q4<BB-AR12A24":A(2)=J+"A-GF24G24F24E12F24GF12QG48F48Q4E4>DD-"
148
+ 310 A(3)=J+"GFQL24EFED12EQ4L8FED&D>DD-"
149
+ 320 A(4)="R48"+J+"A-GF+24G24F+24E12F+24GF+12QG48F+48Q4E4>DD-16"
150
+ 330 A(5)="R48"+J+"GF+E24F+24E24D12E24F+E12<A24>D12..R12@21VY0,40Y1,36Y2,26Y4,244<A24>DE"
151
+ 340 C(4)="@0O5VQ4L8A12A12A12A-GF+R12F+24FED24E24D24C+12D24ED12E48D48C+4BB-"
152
+ 350 C(5)="A12A12A12A-GF+R12F+24EDC+24D24C+24<B12>C+24D<A12G24F+12Y50,5R8A24>DE"
153
+ 360 A(6)="V5T150L8F+4.AF+ED4.EF+GAAAABAG4.<B>EF+":A(7)="G4.BGF+E4.F+GABBBB>C+<BA4.<A>DE"
154
+ 370 A(8)="T140G4.BGF+T130E4.F+GAT120>C+<BG+AL32>EF+L28EF+L24EF+L20EF+L16EF+L12EF+L8EF+L7EF+L6EF+L5EF+L4EF+L3EF+E"
155
+ 380 A(10)="T150R8.D"
156
+ 390 '----->OTHERS
157
+ 400 J="@10D8R12A24>@16F8<@6A8":C(0)="T100Q2O4"+J+J+J+J:C(1)=J+J
158
+ 410 D(0)="@14V13T100R1.RR12O5C24R12D24"
159
+ 420 E(0)="@14V13T100R1.RR12OG24R12A24"
160
+ 430 F(0)="@6V14T100L24O3"
161
+ 440 J="R1RL24@6>FGA>C<A>CR12":D(1)=J+"V15DR8D8V10L64V9C<BVAGV7FEV6DC"
162
+ 450 E(1)=J+"V15AR8A8V10L64V9GFVEDV7C<BV6AG":F(1)=J+">GR8G8V10L64V9FEVDC<V7BAGF"
163
+ 460 F(1)=J+">GR8G8V10L64V9FEVDC<V7BAGF"
164
+ 470 D(2)="@2L24V10O5D&Y19,120&Y19,130&Y19,140&D&Y19,150&D&Y19,160&D&Y19,170&D&Y19,178&D1&D4F2"
165
+ 480 E(2)="@2L24V9OG&G&Y20,5&G&Y20,10&G&Y20,15&GY20,50&G&Y20,225Y20,30&G1&G4B-2"
166
+ 490 F(2)="@2L24V9OE&Y21,160&E&Y21,170&E&Y21,180&E&Y21,190&E&Y21,200&E&E1&E4G2"
167
+ 500 D(3)=LEFT$(D(2),77)+"2.R24C+2@6R12V13>DR8D"
168
+ 510 E(3)="A&Y20,0&A&Y20,10&A&Y20,20&A&Y20,30&A&Y20,40&A&Y20,50&A2.A2V13@6>>>R12DR8D"
169
+ 520 F(3)="E&E&Y21,215&E&Y21,225&E&Y21,235&E&Y21,245&E&Y21,255&E2.G2@6>>R12AR8A"
170
+ 530 D(4)="@16LRVO5F+A2R>D<B2":E(4)="@16LRVO5DF+2RAG2":F(4)="@16LRVOA>D2RF+E2"
171
+ 540 D(5)="RE>E2R<A>DY51,90":E(5)="R<B>B2RGF+":F(5)="R<G>G2RED"
172
+ 550 D(6)="T150L8Q4OR64D4A>F+<A4DA>F+4<A4D4A>F+D+4E<EF+GAB16."
173
+ 560 D(7)="E4B>G<B4EB>G4<B4A4>C+AG4F+<<AB>C+DE":D(8)="T140E4B>G<B4T130EB>G4D4E"
174
+ 570 IJ="SM100T100O8L64CCCL48CCCL32CCCL24CCCR":I(9)=IJ+IJ+IJ
175
+ 580 D(10)="Y51,5R16O5F+":E(10)="Y52,5R8O5A"
176
+ 590 J="T100Q8L24V15A>D":A(11)="@6O5"+J:B(11)="@31O4"+J:C(11)="@6O6"+J:D(11)="@2O5"+J:E(11)="@2O3"+J:F(11)="@6O3"+J
177
+ 600 E(6)="T150@3O6V5Q4L8RDEF+GL24QABABABABABABABABABA4"
178
+ 610 '----->PROCEDURE DIVISION
179
+ 620 FORX=0TO5:IFX=4ANDY=0THENX=2:Y=1
180
+ 630 Z=XMOD2:PLAY#2,A(X),B(X),C(X),D(X),E(X),F(X),G(Z),H(Z),I(Z):NEXT
181
+ 640 FORX=6TO11:IFX=8ANDY=1THENX=6:Y=0
182
+ 650 X=X+(X=7)*(Y=0):PLAY#2,A(X),B(X),C(X),D(X),E(X),F(X),G(X),H(X),I(X):NEXT
183
+ 660 END
184
+ ```
185
+
186
+ ## Related to
187
+
188
+ `BEEP`, `CALL AUDIO`, `CALL AUDREG`, `CALL MDR`, `CALL MUSIC`, `CALL PLAY`, `CALL MK VOICE`, `CALL VOICE`, `CALL VOICE COPY`, `PLAY()`, `SOUND`
189
+
190
+ ## Compatibility
191
+
192
+ MSX-BASIC 1.0 or higher, MSX-AUDIO BASIC, MSX-MIDI BASIC, MSX-MUSIC BASIC
193
+
194
+ ## Source
195
+
196
+ Retrieved from "https://www.msx.org/wiki/PLAY"
@@ -0,0 +1,52 @@
1
+ # POINT
2
+
3
+ ## Effect
4
+
5
+ Returns the color number of the specified point in graphic screen.
6
+
7
+ ## Syntax
8
+
9
+ `POINT STEP(<X>,<Y>)`
10
+
11
+ ## Parameters
12
+
13
+ `<X>` is coordinate X (0-255/511) of the point whose the color will be checked. It cannot be omitted.
14
+
15
+ `<Y>` is coordinate Y (0-191/211) of the point whose the color will be checked. It cannot be omitted.
16
+
17
+ If `STEP` is used before these starting coordinates, they are interpreted relative to the current cursor position. In this case the values can also be negative.
18
+
19
+ ## Example
20
+
21
+ ```basic
22
+ 10 SCREEN 2:COLOR 15,1,7
23
+ 20 OPEN "GRP:" FOR OUTPUT AS #1
24
+ 30 FOR I=1 TO 10
25
+ 40 PRESET(I*16,8)
26
+ 50 C=INT(RND(1)*13)+2
27
+ 60 COLOR C
28
+ 70 PRINT #1,CHR$(1)+CHR$(66)
29
+ 80 NEXT I
30
+ 90 COLOR 15
31
+ 100 PRESET (40,24)
32
+ 110 PRINT #1,"Color numbers"
33
+ 120 FOR I=1 TO 20
34
+ 130 C=POINT(I*16+4,12)
35
+ 140 PRESET(I*16,I*8+56),4
36
+ 150 PRINT#1,USING "##";C
37
+ 160 NEXT I
38
+ 170 FOR I=1 TO 2000:NEXT I
39
+ 180 COLOR 15,4,7
40
+ ```
41
+
42
+ ## Related to
43
+
44
+ `CIRCLE`, `COLOR`, `DRAW`, `LINE`, `PAINT`, `PRESET`, `PSET`, `SCREEN`
45
+
46
+ ## Compatibility
47
+
48
+ MSX-BASIC 1.0 or higher
49
+
50
+ ## Source
51
+
52
+ Retrieved from "https://www.msx.org/wiki/POINT"
@@ -0,0 +1,51 @@
1
+ # POKE
2
+
3
+ ## Effect
4
+
5
+ Writes a value to a byte of the memory (RAM).
6
+
7
+ ## Syntax
8
+
9
+ `POKE <Address>,<Value>`
10
+
11
+ ## Parameters
12
+
13
+ `<Address>` must be in the range -32768 to 65535. It's a decimal number in single precision, but you can also specify an address in hexadecimal form.
14
+
15
+ If `<Address>` is negative the binary complement is used. This means `POKE-1,0`=`POKE(65536-1),0`.
16
+
17
+ `<Value>` is a decimal number between 0 and 255. It can also be a numeric expression.
18
+
19
+ ## Examples
20
+
21
+ ```basic
22
+ 10 POKE 60000!, 11
23
+ 20 PRINT PEEK(60000!)
24
+  
25
+ RUN
26
+ 11
27
+ ```
28
+
29
+ ```basic
30
+ 10 POKE &HEA60, 11
31
+ 20 PRINT PEEK(&HEA60)
32
+  
33
+ RUN
34
+ 11
35
+ ```
36
+
37
+ ```basic
38
+ A=VDP(10)\8AND1:POKE&H430A,A*255
39
+ ```
40
+
41
+ ## Related to
42
+
43
+ `BLOAD`, `BSAVE`, `PEEK()`, `VARPTR()`, `VPEEK()`, `VPOKE`
44
+
45
+ ## Compatibility
46
+
47
+ MSX-BASIC 1.0 or higher
48
+
49
+ ## Source
50
+
51
+ Retrieved from "https://www.msx.org/wiki/POKE"
@@ -0,0 +1,36 @@
1
+ # POS()
2
+
3
+ ## Effect
4
+
5
+ Returns the horizontal coordinate of the cursor.
6
+
7
+ ## Syntax
8
+
9
+ `POS(<Value>)`
10
+
11
+ ## Parameter
12
+
13
+ `<Value>` is a dummy value or variable but cannot be omitted.
14
+
15
+ ## Example
16
+
17
+ ```basic
18
+ 10 CLS
19
+ 20 LOCATE 14,1:PRINT "Example of POS";
20
+ 30 PRINT POS(0)
21
+  
22
+ RUN
23
+ Example of POS 14
24
+ ```
25
+
26
+ ## Related to
27
+
28
+ `CSRLIN`
29
+
30
+ ## Compatibility
31
+
32
+ MSX-BASIC 1.0 or higher
33
+
34
+ ## Source
35
+
36
+ Retrieved from "https://www.msx.org/wiki/POS()"