@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.
- package/README.md +25 -14
- package/dist/server.js +73 -24
- package/dist/utils.js +10 -2
- package/dist/vectordb.js +60 -0
- package/package.json +8 -3
- package/resources/audio/msx-midi.md +872 -0
- package/resources/audio/psg_registers.md +281 -0
- package/resources/audio/sound_cartridge_scc.md +123 -0
- package/resources/audio/sound_cartridge_scci.md +250 -0
- package/resources/audio/toc.json +8 -4
- package/resources/book--msx2-technical-handbook/toc.json +1 -1
- package/resources/msx-unapi/toc.json +2 -2
- package/resources/programming/basic_wiki/ABS().md +36 -0
- package/resources/programming/basic_wiki/AND.md +71 -0
- package/resources/programming/basic_wiki/ASC().md +38 -0
- package/resources/programming/basic_wiki/ATN().md +36 -0
- package/resources/programming/basic_wiki/AUTO.md +39 -0
- package/resources/programming/basic_wiki/BASE().md +147 -0
- package/resources/programming/basic_wiki/BEEP.md +27 -0
- package/resources/programming/basic_wiki/BIN$().md +36 -0
- package/resources/programming/basic_wiki/BLOAD.md +63 -0
- package/resources/programming/basic_wiki/BSAVE.md +61 -0
- package/resources/programming/basic_wiki/CALL.md +391 -0
- package/resources/programming/basic_wiki/CALL_ADJUST.md +40 -0
- package/resources/programming/basic_wiki/CALL_IMPOSE.md +28 -0
- package/resources/programming/basic_wiki/CALL_OPTIONS.md +26 -0
- package/resources/programming/basic_wiki/CALL_PAUSE.md +119 -0
- package/resources/programming/basic_wiki/CALL_PCMPLAY.md +60 -0
- package/resources/programming/basic_wiki/CALL_PCMREC.md +70 -0
- package/resources/programming/basic_wiki/CDBL().md +36 -0
- package/resources/programming/basic_wiki/CHR$().md +51 -0
- package/resources/programming/basic_wiki/CINT().md +36 -0
- package/resources/programming/basic_wiki/CIRCLE.md +51 -0
- package/resources/programming/basic_wiki/CLEAR.md +39 -0
- package/resources/programming/basic_wiki/CLOAD.md +27 -0
- package/resources/programming/basic_wiki/CLOAD?.md +31 -0
- package/resources/programming/basic_wiki/CLOSE.md +44 -0
- package/resources/programming/basic_wiki/CLS.md +51 -0
- package/resources/programming/basic_wiki/COLOR.md +143 -0
- package/resources/programming/basic_wiki/COLOR=.md +93 -0
- package/resources/programming/basic_wiki/COLOR_SPRITE$().md +83 -0
- package/resources/programming/basic_wiki/COLOR_SPRITE().md +85 -0
- package/resources/programming/basic_wiki/CONT.md +23 -0
- package/resources/programming/basic_wiki/COPY.md +215 -0
- package/resources/programming/basic_wiki/COPY_SCREEN.md +61 -0
- package/resources/programming/basic_wiki/COS().md +37 -0
- package/resources/programming/basic_wiki/CSAVE.md +35 -0
- package/resources/programming/basic_wiki/CSNG().md +36 -0
- package/resources/programming/basic_wiki/CSRLIN.md +33 -0
- package/resources/programming/basic_wiki/DATA.md +47 -0
- package/resources/programming/basic_wiki/DEFDBL.md +40 -0
- package/resources/programming/basic_wiki/DEFINT.md +40 -0
- package/resources/programming/basic_wiki/DEFSNG.md +40 -0
- package/resources/programming/basic_wiki/DEFSTR.md +40 -0
- package/resources/programming/basic_wiki/DEF_FN.md +49 -0
- package/resources/programming/basic_wiki/DEF_USR.md +33 -0
- package/resources/programming/basic_wiki/DELETE.md +49 -0
- package/resources/programming/basic_wiki/DIM.md +59 -0
- package/resources/programming/basic_wiki/DRAW.md +77 -0
- package/resources/programming/basic_wiki/ELSE.md +45 -0
- package/resources/programming/basic_wiki/END.md +32 -0
- package/resources/programming/basic_wiki/EOF().md +36 -0
- package/resources/programming/basic_wiki/EQV.md +76 -0
- package/resources/programming/basic_wiki/ERASE.md +35 -0
- package/resources/programming/basic_wiki/ERL.md +34 -0
- package/resources/programming/basic_wiki/ERR.md +143 -0
- package/resources/programming/basic_wiki/ERROR.md +145 -0
- package/resources/programming/basic_wiki/EXP().md +38 -0
- package/resources/programming/basic_wiki/FIELD.md +48 -0
- package/resources/programming/basic_wiki/FIX().md +44 -0
- package/resources/programming/basic_wiki/FN.md +61 -0
- package/resources/programming/basic_wiki/FOR...NEXT.md +80 -0
- package/resources/programming/basic_wiki/FRE().md +66 -0
- package/resources/programming/basic_wiki/GET_DATE.md +60 -0
- package/resources/programming/basic_wiki/GET_TIME.md +34 -0
- package/resources/programming/basic_wiki/GOSUB.md +41 -0
- package/resources/programming/basic_wiki/GOTO.md +41 -0
- package/resources/programming/basic_wiki/HEX$().md +36 -0
- package/resources/programming/basic_wiki/IF...GOTO...ELSE.md +55 -0
- package/resources/programming/basic_wiki/IF...THEN...ELSE.md +50 -0
- package/resources/programming/basic_wiki/IMP.md +83 -0
- package/resources/programming/basic_wiki/INKEY$.md +65 -0
- package/resources/programming/basic_wiki/INP().md +33 -0
- package/resources/programming/basic_wiki/INPUT$().md +51 -0
- package/resources/programming/basic_wiki/INPUT.md +93 -0
- package/resources/programming/basic_wiki/INSTR().md +44 -0
- package/resources/programming/basic_wiki/INT().md +44 -0
- package/resources/programming/basic_wiki/INTERVAL.md +57 -0
- package/resources/programming/basic_wiki/KEY().md +51 -0
- package/resources/programming/basic_wiki/KEY.md +254 -0
- package/resources/programming/basic_wiki/LEFT$().md +39 -0
- package/resources/programming/basic_wiki/LEN().md +36 -0
- package/resources/programming/basic_wiki/LET.md +68 -0
- package/resources/programming/basic_wiki/LINE.md +74 -0
- package/resources/programming/basic_wiki/LINE_INPUT.md +79 -0
- package/resources/programming/basic_wiki/LIST.md +58 -0
- package/resources/programming/basic_wiki/LLIST.md +43 -0
- package/resources/programming/basic_wiki/LOAD.md +56 -0
- package/resources/programming/basic_wiki/LOCATE.md +67 -0
- package/resources/programming/basic_wiki/LOG().md +36 -0
- package/resources/programming/basic_wiki/LPOS().md +31 -0
- package/resources/programming/basic_wiki/LPRINT.md +46 -0
- package/resources/programming/basic_wiki/MAXFILES.md +39 -0
- package/resources/programming/basic_wiki/MERGE.md +54 -0
- package/resources/programming/basic_wiki/MID$().md +72 -0
- package/resources/programming/basic_wiki/MOD.md +39 -0
- package/resources/programming/basic_wiki/MOTOR.md +46 -0
- package/resources/programming/basic_wiki/NEW.md +27 -0
- package/resources/programming/basic_wiki/NOT.md +61 -0
- package/resources/programming/basic_wiki/OCT$().md +36 -0
- package/resources/programming/basic_wiki/ON...GOSUB.md +45 -0
- package/resources/programming/basic_wiki/ON...GOTO.md +42 -0
- package/resources/programming/basic_wiki/ON_ERROR_GOTO.md +61 -0
- package/resources/programming/basic_wiki/ON_INTERVAL_GOSUB.md +54 -0
- package/resources/programming/basic_wiki/ON_KEY_GOSUB.md +56 -0
- package/resources/programming/basic_wiki/ON_SPRITE_GOSUB.md +41 -0
- package/resources/programming/basic_wiki/ON_STOP_GOSUB.md +56 -0
- package/resources/programming/basic_wiki/ON_STRIG_GOSUB.md +70 -0
- package/resources/programming/basic_wiki/OPEN.md +103 -0
- package/resources/programming/basic_wiki/OR.md +75 -0
- package/resources/programming/basic_wiki/OUT.md +35 -0
- package/resources/programming/basic_wiki/PAD().md +110 -0
- package/resources/programming/basic_wiki/PAINT.md +66 -0
- package/resources/programming/basic_wiki/PDL().md +53 -0
- package/resources/programming/basic_wiki/PEEK().md +44 -0
- package/resources/programming/basic_wiki/PLAY().md +58 -0
- package/resources/programming/basic_wiki/PLAY.md +196 -0
- package/resources/programming/basic_wiki/POINT.md +52 -0
- package/resources/programming/basic_wiki/POKE.md +51 -0
- package/resources/programming/basic_wiki/POS().md +36 -0
- package/resources/programming/basic_wiki/PRESET.md +61 -0
- package/resources/programming/basic_wiki/PRINT.md +179 -0
- package/resources/programming/basic_wiki/PSET.md +82 -0
- package/resources/programming/basic_wiki/PUT_KANJI.md +93 -0
- package/resources/programming/basic_wiki/PUT_SPRITE.md +143 -0
- package/resources/programming/basic_wiki/READ.md +45 -0
- package/resources/programming/basic_wiki/REM.md +42 -0
- package/resources/programming/basic_wiki/RENUM.md +78 -0
- package/resources/programming/basic_wiki/RESTORE.md +52 -0
- package/resources/programming/basic_wiki/RESUME.md +45 -0
- package/resources/programming/basic_wiki/RETURN.md +47 -0
- package/resources/programming/basic_wiki/RIGHT$().md +39 -0
- package/resources/programming/basic_wiki/RND().md +51 -0
- package/resources/programming/basic_wiki/RUN.md +56 -0
- package/resources/programming/basic_wiki/SAVE.md +65 -0
- package/resources/programming/basic_wiki/SCREEN.md +164 -0
- package/resources/programming/basic_wiki/SET_ADJUST.md +66 -0
- package/resources/programming/basic_wiki/SET_BEEP.md +76 -0
- package/resources/programming/basic_wiki/SET_DATE.md +103 -0
- package/resources/programming/basic_wiki/SET_PAGE.md +52 -0
- package/resources/programming/basic_wiki/SET_PASSWORD.md +75 -0
- package/resources/programming/basic_wiki/SET_PROMPT.md +61 -0
- package/resources/programming/basic_wiki/SET_SCREEN.md +100 -0
- package/resources/programming/basic_wiki/SET_SCROLL.md +55 -0
- package/resources/programming/basic_wiki/SET_TIME.md +83 -0
- package/resources/programming/basic_wiki/SET_TITLE.md +87 -0
- package/resources/programming/basic_wiki/SET_VIDEO.md +49 -0
- package/resources/programming/basic_wiki/SGN().md +38 -0
- package/resources/programming/basic_wiki/SIN().md +36 -0
- package/resources/programming/basic_wiki/SOUND.md +188 -0
- package/resources/programming/basic_wiki/SPACE$().md +38 -0
- package/resources/programming/basic_wiki/SPC().md +34 -0
- package/resources/programming/basic_wiki/SPRITE$().md +50 -0
- package/resources/programming/basic_wiki/SPRITE.md +31 -0
- package/resources/programming/basic_wiki/SQR().md +32 -0
- package/resources/programming/basic_wiki/STICK().md +70 -0
- package/resources/programming/basic_wiki/STOP.md +70 -0
- package/resources/programming/basic_wiki/STR$().md +37 -0
- package/resources/programming/basic_wiki/STRIG().md +82 -0
- package/resources/programming/basic_wiki/STRING$().md +42 -0
- package/resources/programming/basic_wiki/SWAP.md +62 -0
- package/resources/programming/basic_wiki/TAB().md +38 -0
- package/resources/programming/basic_wiki/TAN().md +36 -0
- package/resources/programming/basic_wiki/TIME.md +59 -0
- package/resources/programming/basic_wiki/TROFF.md +21 -0
- package/resources/programming/basic_wiki/TRON.md +39 -0
- package/resources/programming/basic_wiki/USR().md +66 -0
- package/resources/programming/basic_wiki/VAL().md +36 -0
- package/resources/programming/basic_wiki/VARPTR().md +50 -0
- package/resources/programming/basic_wiki/VDP().md +103 -0
- package/resources/programming/basic_wiki/VPEEK().md +46 -0
- package/resources/programming/basic_wiki/VPOKE.md +48 -0
- package/resources/programming/basic_wiki/WAIT.md +38 -0
- package/resources/programming/basic_wiki/WIDTH.md +76 -0
- package/resources/programming/basic_wiki/XOR.md +72 -0
- package/resources/programming/basic_wiki/_toc.json +871 -0
- package/resources/sdcc/toc.json +1 -1
- package/vector-db/index.json +1 -0
- /package/resources/msx-unapi/{Ethernet_UNAPI_specification_1.1.md → Ethernet_UNAPI_specification_1_1.md} +0 -0
- /package/resources/msx-unapi/{MSX_UNAPI_specification_1.1.md → MSX_UNAPI_specification_1_1.md} +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# COLOR SPRITE$()
|
|
2
|
+
|
|
3
|
+
## Effect
|
|
4
|
+
|
|
5
|
+
Changes the color for an horizontal line of a sprite on screens 4 to 8 and 10 to 12 and optionally changes collision rules for this line + applies a shift effect to this line. Several lines can also be modified.
|
|
6
|
+
|
|
7
|
+
This handling line per line allows to create multi-colored sprites. In screen 6, it allows to have sprites with one color for the even lines and another color for the odd lines. The shift effect allows to create "mini-sprites".
|
|
8
|
+
|
|
9
|
+
_Note: In screen 8, the colors for the sprites are different from the 'standard' colors._
|
|
10
|
+
|
|
11
|
+
## Syntax
|
|
12
|
+
|
|
13
|
+
`COLOR SPRITE$(<SpriteNumber>)=<String>`
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
`<SpriteNumber>` is a number between 0 and 31 that specifies the sprite number.
|
|
18
|
+
|
|
19
|
+
`<String>` is a string of 8 or 16 characters according the sprites size (8x8 or 16x16). Each character number is the color value for the corresponding horizontal line of the sprite including extra bits functions described below.
|
|
20
|
+
|
|
21
|
+
Characters can be specified by the function `CHR$()` that converts a value to a MSX character (see the example for CHR$() use). Remember the bit 4 is unused.
|
|
22
|
+
|
|
23
|
+
Table below is the detail for the color value format in the 8-bit VDP Sprite Color Register, used only for the sprites type 2:
|
|
24
|
+
|
|
25
|
+
|Bits|Effect|
|
|
26
|
+
|:-:|---|
|
|
27
|
+
|7|1 to enable moving of the horizontal line of the sprite to left by 32 dots|
|
|
28
|
+
|6|1 to enable OR operation with bits pattern of linked sprites for the horizontal line of the sprite. The linked sprites are sprites displayed below with the bit 6 at 0. Four sprites can be linked.<br>Each bit at 1 in sprite patterns corresponds to the specified color of sprite. The OR operation is performed with the sprite colors on each bit superposed when displayed. The colors are taken into account for operation only when the bit is at 1. Thus the color of each pixel of the sprite at the top (with bit 6 to 1) will take the color resulting from each operation. (See `OR color` for more info).|
|
|
29
|
+
|5|1 to ignore collision of the horizontal line of the sprite with another sprite. (`ON SPRITE GOSUB` will have no effect).|
|
|
30
|
+
|4|Unused.|
|
|
31
|
+
|3-0|Color is used for the horizontal line of the sprite (0~15 in decimal). The used colors are different in screen 8.|
|
|
32
|
+
|
|
33
|
+
To get the value in decimal, you can input one of the following instructions:
|
|
34
|
+
|
|
35
|
+
|Bits|Instruction|
|
|
36
|
+
|5 set|`PRINT C+&B00100000`|
|
|
37
|
+
|5 and 6 set|`PRINT C+&B01100000`|
|
|
38
|
+
|6 set|`PRINT C+&B01000000`|
|
|
39
|
+
|5 and 7 set|`PRINT C+&B01100000`|
|
|
40
|
+
|7 set|`PRINT C+&B10000000`|
|
|
41
|
+
|6 and 7 set|`PRINT C+&B11000000`|
|
|
42
|
+
|5, 6 and 7 set|`PRINT C+&B11100000`|
|
|
43
|
+
|
|
44
|
+
`C` is the color number (0~15) that you want to use.
|
|
45
|
+
|
|
46
|
+
Here is the detail with the decimal values and the different effects:
|
|
47
|
+
|
|
48
|
+
|Line color|Effects|
|
|
49
|
+
|:-:|---|
|
|
50
|
+
|0-15|The corresponding color is used for the concerned horizontal line of the sprite.|
|
|
51
|
+
|32-47|- The color corresponding to (number - 32) is used for the concerned horizontal line of the sprite.<br>- Collision of this part of the sprite with another sprite is ignored (`ON SPRITE GOSUB` will have no effect).|
|
|
52
|
+
|64-79|- The color corresponding to (number - 64) is used for the concerned horizontal line of the sprite.<br>- The logical operator `OR` is applied for this horizontal line between colors of previous sprite pattern and new sprite pattern.|
|
|
53
|
+
|96-111|- The color corresponding to (number - 96) is used for the concerned horizontal line of the sprite.<br>- Collision of this part of the sprite with another sprite is ignored (`ON SPRITE GOSUB` will have no effect).<br>- The logical operator `OR` is applied for this horizontal line between colors of previous sprite pattern and new sprite pattern.|
|
|
54
|
+
|128-143|- The color corresponding to (number - 128) is used for the concerned horizontal line of the sprite.<br>- This part of the sprite is moved to left by 32 dots.|
|
|
55
|
+
|160-175|- The color corresponding to (number - 160) is used for the concerned horizontal line of the sprite.<br>- This part of the sprite is moved to left by 32 dots.<br>- Collision of this part of the sprite with another sprite is ignored (`ON SPRITE GOSUB` will have no effect).|
|
|
56
|
+
|192-207|- The color corresponding to (number - 192) is used for the concerned horizontal line of the sprite.<br>- This part of the sprite is moved to left by 32 dots.<br>- The logical operator `OR` is applied for this horizontal line between colors of previous sprite pattern and new sprite pattern.|
|
|
57
|
+
|224-239|- The palette color corresponding to (number - 224) is used for the concerned horizontal line of the sprite.<br>- This part of the sprite is moved to left by 32 dots.<br>- Collision of this part of the sprite with another sprite is ignored (`ON SPRITE GOSUB` will have no effect).<br>- The logical operator `OR` is applied for this horizontal line between colors of previous sprite pattern and new sprite pattern.|
|
|
58
|
+
|
|
59
|
+
## Example
|
|
60
|
+
|
|
61
|
+
```basic
|
|
62
|
+
10 COLOR 15,1,7: SCREEN 5,0
|
|
63
|
+
20 B$=""
|
|
64
|
+
30 FOR I=0 TO 7: READ A: B$=B$+CHR$(A): NEXT
|
|
65
|
+
40 SPRITE$(0)=B$
|
|
66
|
+
50 PUT SPRITE 0, (100,100),15,0
|
|
67
|
+
60 FOR I=0 TO 2000: NEXT
|
|
68
|
+
70 COLOR SPRITE$(0)=CHR$(12)+CHR$(1)+CHR$(130)
|
|
69
|
+
80 FOR I=0 TO 2000: NEXT
|
|
70
|
+
90 DATA 24,60,126,255,36,36,66,129
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Related to
|
|
74
|
+
|
|
75
|
+
`COLOR SPRITE()`, `ON SPRITE GOSUB`, `PUT SPRITE`, `SPRITE`, `SPRITE$()`
|
|
76
|
+
|
|
77
|
+
## Compatibility
|
|
78
|
+
|
|
79
|
+
MSX-BASIC 2.0 or higher
|
|
80
|
+
|
|
81
|
+
## Source
|
|
82
|
+
|
|
83
|
+
Retrieved from "https://www.msx.org/wiki/COLOR_SPRITE$()"
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# COLOR SPRITE()
|
|
2
|
+
|
|
3
|
+
## Effect
|
|
4
|
+
|
|
5
|
+
Changes entirely the color of a sprite on screens 4 to 8 and 10 to 12 and optionally changes collision rules.
|
|
6
|
+
|
|
7
|
+
_Notes:_
|
|
8
|
+
- In screen 8, the colors for the sprites are different from the 'standard' colors.
|
|
9
|
+
- When you use this instruction, don't specify the sprite color with PUT SPRITE.
|
|
10
|
+
|
|
11
|
+
## Syntax
|
|
12
|
+
|
|
13
|
+
`COLOR SPRITE(<SpriteDisplayNumber>)=<Color>`
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
`<SpriteDisplayNumber>` is a number between 0 and 31 that specifies the display priority number of sprite. When the number is bigger, the sprite is displayed over the others.
|
|
18
|
+
|
|
19
|
+
`<Color>` is a number between 0 and 127 that specifies the color number + possibly some modifications. It is the result of values 0 or 1 in the 8-bit VDP Sprite Color Register, used only for the sprites type 2. As bit 4 is not used, some values are useless.
|
|
20
|
+
|
|
21
|
+
Table below is the detail for the color value format:
|
|
22
|
+
|
|
23
|
+
|Bits|Effect|
|
|
24
|
+
|:-:|---|
|
|
25
|
+
|7|Remember to set this bit to 0 otherwise an error _"Illegal function call"_ occurs.|
|
|
26
|
+
|6|1 to enable OR operation with bits pattern of linked sprites. The linked sprites are sprites displayed below with the bit 6 at 0. Four sprites can be linked.<br>Each bit at 1 in sprite patterns corresponds to the specified color of sprite. The OR operation is performed with the sprite colors on each bit superposed when displayed. The colors are taken into account for operation only when the bit is at 1. Thus the color of each pixel of the sprite at the top (with bit 6 to 1) will take the color resulting from each operation. (See "OR Color" for more info).|
|
|
27
|
+
|5|1 to ignore the sprite collision with another sprite. (ON SPRITE GOSUB## will have no effect).|
|
|
28
|
+
|4|Unused.|
|
|
29
|
+
|3-0|Color is used for the sprite (0~15 in decimal). The used colors are different in screen 8.|
|
|
30
|
+
|
|
31
|
+
To get the decimal value, you can input one of the following instructions:
|
|
32
|
+
|
|
33
|
+
|Bit|Instruction|
|
|
34
|
+
|:-:|---|
|
|
35
|
+
|5 set|`PRINT C+&B0100000`|
|
|
36
|
+
|5 and 6 set|`PRINT C+&B1100000`|
|
|
37
|
+
|6 set|`PRINT C+&B1000000`|
|
|
38
|
+
|
|
39
|
+
`C` is the color number (0~15) that you want to use.
|
|
40
|
+
|
|
41
|
+
Here is the detail with the decimal values and the different effects:
|
|
42
|
+
|
|
43
|
+
|Color|Effects|
|
|
44
|
+
|---|---|
|
|
45
|
+
|0-15|The corresponding color is used for the sprite.|
|
|
46
|
+
|32-47|- The color corresponding to (number - 32) is used for the sprite.<br>- Collision with another sprite is ignored (`ON SPRITE GOSUB` will have no effect).|
|
|
47
|
+
|64-79|- The color corresponding to (number - 64) is used for the sprite.<br>- The logical operator `OR` is applied between colors of previous sprite pattern and new sprite pattern.|
|
|
48
|
+
|96-111|- The color corresponding to (number - 96) is used for the sprite.<br>- Collision with another sprite is ignored (`ON SPRITE GOSUB` will have no effect).<br>- The logical operator `OR` is applied between colors of previous sprite pattern and new sprite pattern.|
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
|
|
52
|
+
```basic
|
|
53
|
+
10 COLOR 15,1,7: SCREEN 5,0
|
|
54
|
+
20 B$=""
|
|
55
|
+
30 FOR I=0 TO 7: READ A: B$=B$+CHR$(A): NEXT
|
|
56
|
+
40 SPRITE$(0)=B$
|
|
57
|
+
50 COLOR SPRITE(0)=12
|
|
58
|
+
60 FOR I=0 TO 212: PUT SPRITE 0,(I,I),,0:NEXT
|
|
59
|
+
70 DATA 24,60,126,255,36,36,66,129
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```basic
|
|
63
|
+
10 SCREEN5
|
|
64
|
+
15 ON SPRITE GOSUB 90: SPRITE ON 'Enable collision for all sprites
|
|
65
|
+
20 SPRITE$(0)=STRING$(8,255)
|
|
66
|
+
30 COLOR SPRITE(1)=38 'is color 6 + &B0100000 to disable collision for sprite 1
|
|
67
|
+
40 PUTSPRITE 0,(50,50),10,0
|
|
68
|
+
50 PUTSPRITE 1,(54,54),,0 ' The color parameter must be omitted
|
|
69
|
+
60 IF NOT STRIG(0) GOTO 60 'Press Space to enable OR operator
|
|
70
|
+
70 COLOR SPRITE(1)=79 'color 15 + &B1000000 to enable OR operation
|
|
71
|
+
80 GOTO 80
|
|
72
|
+
90 SCREEN 0: PRINT"Sprite collision OK": BEEP: END
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Related to
|
|
76
|
+
|
|
77
|
+
`COLOR SPRITE$()`, `ON SPRITE GOSUB`, `PUT SPRITE`, `SPRITE`, `SPRITE$()`
|
|
78
|
+
|
|
79
|
+
## Compatibility
|
|
80
|
+
|
|
81
|
+
MSX-BASIC 2.0 or higher
|
|
82
|
+
|
|
83
|
+
## Source
|
|
84
|
+
|
|
85
|
+
Retrieved from "https://www.msx.org/wiki/COLOR_SPRITE()"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# CONT
|
|
2
|
+
|
|
3
|
+
## Effect
|
|
4
|
+
|
|
5
|
+
Attempts to continue an MSX-BASIC program from where it was interrupted by either a `CTRL`+`BREAK` or a `STOP` instruction or by pressing on `CTRL`+`STOP` keys.
|
|
6
|
+
|
|
7
|
+
Please note that this instruction does not restore things like screen mode or sound output, and can't be used inside a program otherwise the error _"Can't continue"_ occurs.
|
|
8
|
+
|
|
9
|
+
## Syntax
|
|
10
|
+
|
|
11
|
+
`CONT`
|
|
12
|
+
|
|
13
|
+
## Related to
|
|
14
|
+
|
|
15
|
+
`END`, `STOP`
|
|
16
|
+
|
|
17
|
+
## Compatibility
|
|
18
|
+
|
|
19
|
+
MSX-BASIC 1.0 or higher
|
|
20
|
+
|
|
21
|
+
## Source
|
|
22
|
+
|
|
23
|
+
Retrieved from "https://www.msx.org/wiki/CONT"
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# COPY
|
|
2
|
+
|
|
3
|
+
## Effect
|
|
4
|
+
|
|
5
|
+
Copies data between RAM, VRAM and disk.
|
|
6
|
+
|
|
7
|
+
## Syntaxes
|
|
8
|
+
|
|
9
|
+
`COPY (<XS>,<YS>)-STEP(<XS2>,<YS2>),<SourcePage> TO (<XD>,<YD>),<DestinationPage>,<Operator>`
|
|
10
|
+
|
|
11
|
+
`COPY (<XS>,<YS>)-STEP(<XS2>,<YS2>),<SourcePage> TO <Array>`
|
|
12
|
+
|
|
13
|
+
`COPY <Array>,<Direction> TO (<XD>,<YD>),<DestinationPage>,<Operator>`
|
|
14
|
+
|
|
15
|
+
`COPY (<XS>,<YS>)-STEP(<XS2>,<YS2>),<SourcePage> TO "<Device>:\<Path>\<Filename>"`
|
|
16
|
+
|
|
17
|
+
`COPY <Array> TO "<Device>:\<Path>\<Filename>"`
|
|
18
|
+
|
|
19
|
+
`COPY "<Device>:\<Path>\<Filename>",<Direction> TO (<XD>,<YD>),<DestinationPage>,<Operator>`
|
|
20
|
+
|
|
21
|
+
`COPY "<Device>:\<Path>\<Filename>",<Direction> TO "<Device>:\<Path>\<Filename>"`
|
|
22
|
+
|
|
23
|
+
`COPY "<Device>:\<Path>\<Filename>",<Direction> TO <Array>`
|
|
24
|
+
|
|
25
|
+
_Notes:_
|
|
26
|
+
- 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.
|
|
27
|
+
- Character backslash is replaced by the character yen `¥` on Japanese MSX or the character won `₩` on Korean MSX.
|
|
28
|
+
- Parameters can not end with a comma alone.
|
|
29
|
+
|
|
30
|
+
## Parameters
|
|
31
|
+
|
|
32
|
+
_Note: Coordinates, pages, operators, arrays and directions can be used only in screen modes 5 to 8 and 10 to 12. (MSX-BASIC 2.0 or newer)_
|
|
33
|
+
|
|
34
|
+
### Coordinates and pages
|
|
35
|
+
|
|
36
|
+
`<XS>` and `<YS>` are upper-left coordinates of transfer source (`X`=0-255/511, `Y`=0-211). If it is omited the current coordinates of cursor will be chosen.
|
|
37
|
+
|
|
38
|
+
`<XS2>` and `<YS2>` are lower-right coordinates of transfer source (`X2`=0-255/511, `Y2`=0-211).
|
|
39
|
+
|
|
40
|
+
`STEP` parameter changes `X2` and `Y2` coordinates to relative coordinates (and therefore allows the use of negative values) when specified.
|
|
41
|
+
|
|
42
|
+
`<SourcePage>` is the page number in VRAM of transfer source. The number can be 0/1 or 0~3 depending used screen mode (current page by default).
|
|
43
|
+
|
|
44
|
+
`<XD>` and `<YD>` are upper-left coordinates of transfer destination (`X`=0-255/511, `Y`=0-211).
|
|
45
|
+
|
|
46
|
+
`<DestinationPage>` is the page number in VRAM of transfer destination. The number can be 0/1 or 0~3 depending used screen mode (current page by default).
|
|
47
|
+
|
|
48
|
+
### Operators
|
|
49
|
+
|
|
50
|
+
`<Operator>` defines the logical operations to operate, how copied picture data is mixed with existing picture data. If logical operation is not defined, `PSET` (do not mix) is expected.
|
|
51
|
+
|
|
52
|
+
The available operators are `AND`, `OR`, `PRESET`, `PSET` (default), `TAND`, `TOR`, `TPRESET`, `TPSET`, `TXOR`, `XOR`. Specifying a logical operation preceded by "T" causes nothing to be done when copied color is transparent (color 0).
|
|
53
|
+
|
|
54
|
+
The effect of the operators is done on each corresponding bit as shown in the following table.
|
|
55
|
+
|
|
56
|
+
|Current bit|Copied color bit|AND|OR|PRESET|PSET|XOR|
|
|
57
|
+
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|
|
58
|
+
|0|0|0|0|1|0|0|
|
|
59
|
+
|0|1|0|1|0|1|1|
|
|
60
|
+
|1|0|0|1|1|0|1|
|
|
61
|
+
|1|1|1|1|0|1|0|
|
|
62
|
+
|
|
63
|
+
### Arrays
|
|
64
|
+
|
|
65
|
+
`<Array>` must be an array variable with one or two parameters (to transfer line X and Y pixel data) (Parameter available since MSX-BASIC 2.0).
|
|
66
|
+
|
|
67
|
+
Array variables must be large enough to hold all the image data to be copied. The size can be determined using the following formula:
|
|
68
|
+
`INT (((((ABS(XS2-XS) + 1)*(ABS(YS2-YS) + 1)*pixel_size +7)/8)+4)/data_size)+1`
|
|
69
|
+
|
|
70
|
+
The `pixel_size` (the number of bits in VRAM corresponding to a point on the screen) varies depending on the `SCREEN` mode:
|
|
71
|
+
|
|
72
|
+
|SCREEN|Pixel size|
|
|
73
|
+
|:-:|:-:|
|
|
74
|
+
|5|4|
|
|
75
|
+
|6|2|
|
|
76
|
+
|7|4|
|
|
77
|
+
|8|8|
|
|
78
|
+
|10-12|8|
|
|
79
|
+
|
|
80
|
+
The `data_size` is determined by the type of the array variable:
|
|
81
|
+
|
|
82
|
+
|Array type|Data size|
|
|
83
|
+
|:-:|:-:|
|
|
84
|
+
|Integer|2|
|
|
85
|
+
|Single precision|4|
|
|
86
|
+
|Double precision|8|
|
|
87
|
+
|
|
88
|
+
### Directions
|
|
89
|
+
|
|
90
|
+
`<Direction>` determines the rotation of the picture and must be an integer. This parameter can be used only if destination is graphics coordinate.
|
|
91
|
+
|
|
92
|
+
- Bit 0: Invert X-direction
|
|
93
|
+
- Bit 1: Invert Y-direction
|
|
94
|
+
|
|
95
|
+
|Direction|Picture rotation|
|
|
96
|
+
|:-:|:--|
|
|
97
|
+
|0|No rotation|
|
|
98
|
+
|1|Left - Right|
|
|
99
|
+
|2|Up - Down|
|
|
100
|
+
|3|Left - Right + Up - Down|
|
|
101
|
+
|
|
102
|
+
### Devices and files
|
|
103
|
+
|
|
104
|
+
`<Device>` is the name for used device. It can only be a disk drive.
|
|
105
|
+
|
|
106
|
+
If you don't specify the drive, the computer will copy file(s) from or to the currently active drive (by default, it's drive `A:`).
|
|
107
|
+
|
|
108
|
+
|Device type|Device name|Remark|
|
|
109
|
+
|:-:|:-:|:-:|
|
|
110
|
+
|Disk drive|A, B, C, D, E, F, G, H|A floppy disk interface can control until 2 drives.|
|
|
111
|
+
|
|
112
|
+
_Note: the destination device can be the text screen with `CON` (without :) instead of CRT (followed by :)._
|
|
113
|
+
|
|
114
|
+
`<Path>` is used to specify the location in folders where you want display files. Each folder name in path are separate by a backslash `\` (parameter available with the Disk BASIC 2.0 or newer).
|
|
115
|
+
|
|
116
|
+
`<Filename>` is the file name in the format 8 characters followed by a point and an extension with 3 characters.
|
|
117
|
+
|
|
118
|
+
When copying from one diskdrive to another diskdrive:
|
|
119
|
+
- the source name will be used as destination name if you don't specify the destination name.
|
|
120
|
+
- several files can be handled together by COPY in a similar way as for other Disk BASIC commands.
|
|
121
|
+
|
|
122
|
+
Wildcards can replace some characters in source filename to copy several files. The asterisk `*` and question mark `?` are used as wildcard characters. The asterisk matches any sequence of characters, whereas the question mark matches any single character.
|
|
123
|
+
|
|
124
|
+
## Examples
|
|
125
|
+
|
|
126
|
+
```basic
|
|
127
|
+
COPY "README.TXT" TO "CON" ' Display file on text screen
|
|
128
|
+
```
|
|
129
|
+
```basic
|
|
130
|
+
COPY "M*.*" TO "B:" 'Copy all files with M as 1st character in the name from drive A to drive B
|
|
131
|
+
|
|
132
|
+
COPY "*.BAS" TO "B:" 'Copy all files with the extension ".BAS" from drive A to drive B
|
|
133
|
+
|
|
134
|
+
COPY "TEST.BAS" TO "B:GAME.BAS" 'Copy one file from drive A to drive B and rename it
|
|
135
|
+
|
|
136
|
+
COPY "*.*" TO "B:" 'Copy all the files from drive A to drive B
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Next examples are made by: NYYRIKKI - Please contact him in case of questions:
|
|
140
|
+
|
|
141
|
+
```basic
|
|
142
|
+
' Endless lives to Xyzolog
|
|
143
|
+
DEFINT D:DIM D(8191):COPY "XYZOLOG.ROM" TO D:D(3342)=2072:COPY D TO "XYZOLOGC.ROM"
|
|
144
|
+
```
|
|
145
|
+
```basic
|
|
146
|
+
10 ' Create 3 little programs to change display Hz rate under DOS
|
|
147
|
+
20 DEFINT A-Z:DIM D(7):FOR I=0 TO 7:READ D(I):NEXT
|
|
148
|
+
30 FOR I=0 TO 2:IF I THEN N$=OCT$(32+I*8):READ D(2)
|
|
149
|
+
40 COPY D TO N$+"Hz.COM":NEXT
|
|
150
|
+
50 DATA -6111,32511,750,-3209,-26157,-30402,-26157,201,758,-538
|
|
151
|
+
```
|
|
152
|
+
```basic
|
|
153
|
+
10 ' Fill screen with cute pattern
|
|
154
|
+
20 SCREEN 5
|
|
155
|
+
30 PSET (0,0):PSET(4,4):CIRCLE(4,4),3
|
|
156
|
+
40 COPY (0,0)-(247,7) TO (8,0)
|
|
157
|
+
50 COPY (0,0)-(255,199) TO (0,8)
|
|
158
|
+
60 A$=INPUT$(1)
|
|
159
|
+
```
|
|
160
|
+
```basic
|
|
161
|
+
10 ' Creating outline of an object using COPY-command
|
|
162
|
+
20 ' ------------------------------------------------
|
|
163
|
+
30 'Example object
|
|
164
|
+
40 COLOR 15,0,0:SCREEN 5
|
|
165
|
+
50 CIRCLE (32,32),28,8,,,.2:PAINT(32,32),8
|
|
166
|
+
60 CIRCLE (32,32),28,2,,,5:PAINT(32,32),2
|
|
167
|
+
70 CIRCLE (32,32),12,4:PAINT(32,32),4
|
|
168
|
+
80 CIRCLE (32,32),5,0:PAINT(32,32),0
|
|
169
|
+
90 'Example of object outline outside
|
|
170
|
+
100 FOR I=0 TO 3:COPY(-(I=0),-(I=1))-(63,63)TO(64-(I=2),-(I=3)),,TPSET:NEXT
|
|
171
|
+
110 COPY(64,0)-STEP(63,63) TO (128,0),,TPRESET
|
|
172
|
+
120 COPY(64,0)-STEP(63,63) TO (128,0),,TOR
|
|
173
|
+
130 COPY(0,0)-STEP(63,63) TO (128,0),,TPSET
|
|
174
|
+
140 COPY(0,0)-STEP(63,63) TO (128,0),,XOR
|
|
175
|
+
150 'Example of object outline inside
|
|
176
|
+
160 COPY(0,0)-STEP(63,63) TO (64,64),,TPRESET
|
|
177
|
+
170 COPY(0,0)-STEP(63,63) TO (64,64),,OR
|
|
178
|
+
180 COPY(64,64)-STEP(63,63) TO (128,64)
|
|
179
|
+
190 FOR I=0 TO 3:COPY(64-(I=0),64-(I=1))-(127,127)TO(128-(I=2),64-(I=3)),,AND:NEXT
|
|
180
|
+
200 COPY(64,64)-STEP(63,63) TO (128,64),,XOR
|
|
181
|
+
210 'Both together
|
|
182
|
+
220 COPY(128,0)-STEP(63,63) TO (128,128)
|
|
183
|
+
230 COPY(128,64)-STEP(63,63) TO (128,128),,OR
|
|
184
|
+
240 A$=INPUT$(1)
|
|
185
|
+
```
|
|
186
|
+
```basic
|
|
187
|
+
10 DIM D(16)
|
|
188
|
+
20 SCREEN 5
|
|
189
|
+
30 PSET (0,0):OPEN"GRP:" FOR OUTPUT AS #1:PRINT#1,"Copy":CLOSE
|
|
190
|
+
40 COPY (0,0)-(31,7) TO D ' Copy to array
|
|
191
|
+
50 COPY D,3 TO (255,211) ' Copy back to screen but upside down
|
|
192
|
+
60 A$=INPUT$(1)
|
|
193
|
+
10 ' Some Sierpinski-triangles
|
|
194
|
+
20 COLOR 15,0,0:SCREEN 5
|
|
195
|
+
30 FOR I=RND(-5048) TO 6:PSET(RND(1)*255,RND(1)*211),RND(1)*13+2:NEXT I
|
|
196
|
+
40 FOR I=0 TO 211:H=IAND254:L=(IAND1)*2
|
|
197
|
+
50 COPY (1,H)-STEP(253,0) TO (L,H+2),,XOR
|
|
198
|
+
60 COPY (1,211-H)-STEP(253,0) TO (L,209-H),,XOR
|
|
199
|
+
70 NEXT I
|
|
200
|
+
80 A$=INPUT$(1)
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Related to
|
|
204
|
+
|
|
205
|
+
`AND`, `DIM`, `KILL`, `NAME`, `OR`, `SET PAGE`, `SCREEN`, `XOR`
|
|
206
|
+
|
|
207
|
+
## Compatibility
|
|
208
|
+
|
|
209
|
+
Disk BASIC 1.0 or higher / both modes of Nextor OS
|
|
210
|
+
|
|
211
|
+
Array variable, graphical coordinates and logical operations require MSX-BASIC 2.0 or higher.
|
|
212
|
+
|
|
213
|
+
## Source
|
|
214
|
+
|
|
215
|
+
Retrieved from "https://www.msx.org/wiki/COPY"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# COPY SCREEN
|
|
2
|
+
|
|
3
|
+
## Effect
|
|
4
|
+
|
|
5
|
+
Digitizes picture from video input and copies it to VRAM. It can be used in screens 5 to 8 and 10 to 12 and requires to first set the computer in digitize mode with `SET VIDEO`.
|
|
6
|
+
|
|
7
|
+
## Syntax
|
|
8
|
+
|
|
9
|
+
`COPY SCREEN <Mode>,<InputColor>`
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
`<Mode>` is a value to set or not interlaced mode:
|
|
14
|
+
- If the value equals 0 (default value), the digitized picture is stored in the current page.
|
|
15
|
+
- If the value equals 1, two images are stored: one in the active page -1, and the second in the active page. These two images then create one (interlaced) image.
|
|
16
|
+
|
|
17
|
+
`<InputColor>` is optional to specify the RGB color of the input to the computer, in binary or decimal format. This color will be used as mask to alter the digitized picture.
|
|
18
|
+
|
|
19
|
+
The binary format is &B11111111 where:
|
|
20
|
+
- the highest three bits are for R (red)
|
|
21
|
+
- the next three bits are for G (green)
|
|
22
|
+
- the lowest two bits are for B (blue)
|
|
23
|
+
|
|
24
|
+
This format is actually the one used for the fixed colors of Screen 8. Use this formula for the color code in decimal format:
|
|
25
|
+
```
|
|
26
|
+
Color code = 32 x (Green intensity) + 4 x (Red intensity) + (Blue intensity)
|
|
27
|
+
```
|
|
28
|
+
with:
|
|
29
|
+
- Green intensity: an integer from 0 to 7
|
|
30
|
+
- Red intensity: an integer from 0 to 7
|
|
31
|
+
- Blue intensity: an integer from 0 to 3
|
|
32
|
+
|
|
33
|
+
## Example
|
|
34
|
+
|
|
35
|
+
```basic
|
|
36
|
+
110 ON STOP GOSUB 210
|
|
37
|
+
120 STOP ON
|
|
38
|
+
130 SCREEN 8
|
|
39
|
+
140 COLOR,,255
|
|
40
|
+
150 SET VIDEO 1
|
|
41
|
+
160 COPY SCREEN
|
|
42
|
+
170 TIME=0
|
|
43
|
+
180 IF INKEY$="" GOTO 180
|
|
44
|
+
190 IF TIME<4 GOTO 190
|
|
45
|
+
200 IF INKEY$="" GOTO 200 ELSE 140
|
|
46
|
+
210 'REM STOP
|
|
47
|
+
220 SET VIDEO 0,0
|
|
48
|
+
230 END
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Related to
|
|
52
|
+
|
|
53
|
+
`SCREEN`, `SET PAGE`, `SET VIDEO`
|
|
54
|
+
|
|
55
|
+
## Compatibility
|
|
56
|
+
|
|
57
|
+
MSX-BASIC 2.0 or higher - Requires a computer with digitizing/superimposing unit
|
|
58
|
+
|
|
59
|
+
## Source
|
|
60
|
+
|
|
61
|
+
Retrieved from "https://www.msx.org/wiki/COPY_SCREEN"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# COS()
|
|
2
|
+
|
|
3
|
+
## Effect
|
|
4
|
+
|
|
5
|
+
Returns the cosine of a variable in radians.
|
|
6
|
+
|
|
7
|
+
## Syntax
|
|
8
|
+
|
|
9
|
+
`COS(<Number>)`
|
|
10
|
+
|
|
11
|
+
## Parameter
|
|
12
|
+
|
|
13
|
+
`<Number>` can be a value, a numeric variable or an expression.
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```basic
|
|
18
|
+
10 D1 = ATN(1)*8/360
|
|
19
|
+
20 PRINT "The cosine of a 45 degree angle is ";COS(45*D1)
|
|
20
|
+
30 PRINT "The cosine of a 0 degree angle is ";COS(0)
|
|
21
|
+
|
|
22
|
+
RUN
|
|
23
|
+
The cosine of a 45 degree angle is .70710678118655
|
|
24
|
+
The cosine of a 0 degree angle is 1
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Related to
|
|
28
|
+
|
|
29
|
+
`ATN()`, `SIN()`, `TAN()`
|
|
30
|
+
|
|
31
|
+
## Compatibility
|
|
32
|
+
|
|
33
|
+
MSX-BASIC 1.0 or higher
|
|
34
|
+
|
|
35
|
+
## Source
|
|
36
|
+
|
|
37
|
+
Retrieved from "https://www.msx.org/wiki/COS()"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# CSAVE
|
|
2
|
+
|
|
3
|
+
## Effect
|
|
4
|
+
|
|
5
|
+
Saves a BASIC program to cassette in tokenized mode.
|
|
6
|
+
|
|
7
|
+
## Syntax
|
|
8
|
+
|
|
9
|
+
`CSAVE "<Filename>",<BaudRate>`
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
`<Filename>` is the specific name of the BASIC program to be saved in tokenized mode.
|
|
14
|
+
|
|
15
|
+
The format of file name is case sensitive and limited to 6 characters without extension. "`<Filename>`" can be replaced by a alphanumeric variable containing the name.
|
|
16
|
+
|
|
17
|
+
`<BaudRate>` specifies the baud rate at which the program should be saved, which can be either 1 (1200 baud) or 2 (2400 baud). Default value is 1. Do not put the comma if this parameter is omitted.
|
|
18
|
+
|
|
19
|
+
## ASCII text and Tokenized format
|
|
20
|
+
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
|
|
25
|
+
## Related to
|
|
26
|
+
|
|
27
|
+
`CLOAD`, `CLOAD?`, `LOAD`, `RUN`, `SAVE`
|
|
28
|
+
|
|
29
|
+
## Compatibility
|
|
30
|
+
|
|
31
|
+
MSX-BASIC versions before 4.0
|
|
32
|
+
|
|
33
|
+
## Source
|
|
34
|
+
|
|
35
|
+
Retrieved from "https://www.msx.org/wiki/CSAVE"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# CSNG()
|
|
2
|
+
|
|
3
|
+
## Effect
|
|
4
|
+
|
|
5
|
+
Converts a variable to a single precision number. Single precision numbers have an accuracy of 6 digits.
|
|
6
|
+
|
|
7
|
+
## Syntax
|
|
8
|
+
|
|
9
|
+
`CSNG (<Expression>)`
|
|
10
|
+
|
|
11
|
+
## Parameter
|
|
12
|
+
|
|
13
|
+
`<Expression>` can be a value, a numeric variable or an mathematical expression.
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```basic
|
|
18
|
+
10 PRINT "7 divided by 6 is ";CSNG(7/6)
|
|
19
|
+
20 PRINT "10 divided by 11 ";CSNG(10/11)
|
|
20
|
+
|
|
21
|
+
RUN
|
|
22
|
+
7 divided by 6 is 1.16667
|
|
23
|
+
10 divided by 11 is .909091
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Related to
|
|
27
|
+
|
|
28
|
+
`CDBL`, `CINT`
|
|
29
|
+
|
|
30
|
+
## Compatibility
|
|
31
|
+
|
|
32
|
+
MSX-BASIC 1.0 or higher
|
|
33
|
+
|
|
34
|
+
## Source
|
|
35
|
+
|
|
36
|
+
Retrieved from "https://www.msx.org/wiki/CSNG()"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# CSRLIN
|
|
2
|
+
|
|
3
|
+
## Effect
|
|
4
|
+
|
|
5
|
+
Returns the vertical coordinate of the cursor.
|
|
6
|
+
|
|
7
|
+
## Syntax
|
|
8
|
+
|
|
9
|
+
`CSRLIN`
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```basic
|
|
14
|
+
10 CLS
|
|
15
|
+
20 PRINT "Example of CSRLIN"
|
|
16
|
+
30 PRINT CSRLIN
|
|
17
|
+
|
|
18
|
+
RUN
|
|
19
|
+
Example of CSRLIN
|
|
20
|
+
1
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Related to
|
|
24
|
+
|
|
25
|
+
`LOCATE`, `POS`
|
|
26
|
+
|
|
27
|
+
## Compatibility
|
|
28
|
+
|
|
29
|
+
MSX-BASIC 1.0 or higher
|
|
30
|
+
|
|
31
|
+
## Source
|
|
32
|
+
|
|
33
|
+
Retrieved from "https://www.msx.org/wiki/CSRLIN"
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# DATA
|
|
2
|
+
|
|
3
|
+
## Effect
|
|
4
|
+
|
|
5
|
+
Stores data in a program (e.g. graphics), to be read with the `READ` instruction.
|
|
6
|
+
|
|
7
|
+
_Note: Unlike the other BASIC instructions, `DATA` doesn't need to be executed by the interpreter. Data is stored at the same time as the program is entered. You can therefore group the `DATA` at the end of the program._
|
|
8
|
+
|
|
9
|
+
## Syntax
|
|
10
|
+
|
|
11
|
+
`DATA <Data>,<Data>...`
|
|
12
|
+
|
|
13
|
+
_Note: Parameters can not end with a comma alone._
|
|
14
|
+
|
|
15
|
+
## Parameter
|
|
16
|
+
|
|
17
|
+
`<Data>` is a value or a character string. We can put several `<Data>` separated by a comma.
|
|
18
|
+
|
|
19
|
+
All data types are allowed. Strings only have to be enclosed in double quotes `"` if they contain commas, colons or leading or trailing spaces.
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```basic
|
|
24
|
+
10 READ A$
|
|
25
|
+
20 PRINT A$
|
|
26
|
+
30 READ A,B
|
|
27
|
+
40 PRINT A
|
|
28
|
+
50 PRINT B
|
|
29
|
+
60 DATA "TEST",10,20
|
|
30
|
+
|
|
31
|
+
RUN
|
|
32
|
+
TEST
|
|
33
|
+
10
|
|
34
|
+
20
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Related to
|
|
38
|
+
|
|
39
|
+
`READ`, `RESTORE`
|
|
40
|
+
|
|
41
|
+
## Compatibility
|
|
42
|
+
|
|
43
|
+
MSX-BASIC 1.0 or higher
|
|
44
|
+
|
|
45
|
+
## Source
|
|
46
|
+
|
|
47
|
+
Retrieved from "https://www.msx.org/wiki/DATA"
|