scene.org File Archive

File download

<root>­/­parties­/­2022­/­vccc22­/­christmas_star_challenge/monsonite_rc2014_mint_vc3-2022.zip

File size:
44 023 bytes (42.99K)
File date:
2022-12-30 11:32:13
Download count:
all-time: 3

Preview

  • star_entry.jpg 64.20K
  • xmas_star_124.txt 124B
  • xmas_star_entry.txt 1.90K

file_id.diz

:S(` `);:X(`*`);:M10S;:RX\NM;:I4S;:T10+R;:AI1X7S1R;:BI2X5S2R;:CI3X3S3R;:DI4X1S4R;:FMABCD7T1S5T2S3T3S1TI9R3S1T2S3T1S5T7TDCBA;xmas_star_128.txt

Author: Ken Boak
Category: Christmas Challenge
System:   RC2014 "Micro" using Z80 and serial terminal
Language: MINT Interpreter  https://github.com/monsonite/MINT
Len source code: 124 bytes
Len exe file:    N/A
Len code only:   N/A
Instructions:
Use the Small Computer Monitor (SCM) supplied with the RC2014 to load the Intel Hex file containing the MINT interpreter
At the Ready prompt - type G8000 to start the MINT interpreter
At the MINT prompt - paste the source file into the serial terminal - I use Teraterm  115000,8,N,1
Hit the F key to run the Star program with the MINT interpreter.
Description:
MINT is a tiny "forthlike" interpreter for microprocessors and MCUs with limited resources.
Each command consists of a single ascii character. There is no dictionary look-up like in Forth.
Each command is interpreted.
The user has 26 functions available designated by A-Z
There are also 26 user variables a-z.


Comments:

MINT is a very terse language - here is the sourcecode in 128 bytes on 3 lines. 
The code may be concatenated onto one line of text - shortening it by 4 more charaters. See below.

The interpreter is <1700 bytes of Z80 machine code.

There are 11 functions defined:

S 	Print a number of spaces defined by a number on the top of the stack
X 	Print a number of asterisks
M 	Print 10 spaces
R 	Print a row of stars followed by a newline
I 	Print an indent of 4 spaces.
T 	Print a row of 10+n stars followed by a newline. This centres the graphic on the screen
A,B,C,D Print various combinations of stars and spaces
F 	A top level function that prints the whole star graphic.



Source Code.

:S(` `);:X(`*`);:M10S;:RX\NM;:I4S;:T10+R;
:AI1X7S1R;:BI2X5S2R;:CI3X3S3R;:DI4X1S4R;
:FMABCD7T1S5T2S3T3S1TI9R3S1T2S3T1S5T7TDCBA;


:S(` `);:X(`*`);:M10S;:RX\NM;:I4S;:T10+R;:AI1X7S1R;:BI2X5S2R;:CI3X3S3R;:DI4X1S4R;:FMABCD7T1S5T2S3T3S1TI9R3S1T2S3T1S5T7TDCBA;