-
-
Save plainspooky/5f36156a3fc27b455fef343d59d1e77f to your computer and use it in GitHub Desktop.
Example of MSX-BASIC program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'' Kaleidoscope (MSX2 256 colors) | |
' define WIDTH 255 | |
' define HEIGHT 211 | |
' define MAXCOLORS 256 | |
COLOR 15,0,0 | |
SCREEN 8 | |
I%=RND(-TIME) | |
main_loop: | |
FOR I%=0 TO {{WIDTH}} STEP 2 | |
' pick up a color | |
K%={{MAXCOLORS}}*RND(1) | |
' left side | |
LINE (0,0)-STEP(I%,{{HEIGHT}}),K% | |
LINE (0,{{HEIGHT}})-STEP(I%,-{{HEIGHT}}),K% | |
' right side | |
LINE ({{WIDTH}},0)-STEP(-I%,{{HEIGHT}}),K% | |
LINE ({{WIDTH}},{{HEIGHT}})-STEP(-I%,-{{HEIGHT}}),K% | |
NEXT I% | |
GOTO {{main_loop}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment