CPCBasicApps

CPCBasic Rosetta Code Collection

CPCBasicApps is a collection of CPC BASIC apps. They can be run on a Amstrad CPC 464/664/6128, in an emulator or with CPCBasic or CPCBasicTS.

Links: Source code, HTML Readme,

Some Rosetta Code Highlights

Rosetta Code is a programming chrestomathy site. It has coding examples for many programming languages including Locomotive_Basic. The examples from Rosetta Code are are available under the GNU Free Documentation License, version 1.2: GNU FDL 1.2, see also Rosetta_Code: Copyrights.

24game - The 24 Game

The 24 Game

Taken from Rosetta Code: The 24 Game.

abelian - Abelian sandpile model

Abelian sandpile model

Taken from Rosetta Code: Abelian sandpile model.

animate - Animate a pendulum

Animate a pendulum

Taken from Rosetta Code: Animate a pendulum.

archimed - Archimedean spiral

Archimedean spiral

Taken from Rosetta Code: Archimedean spiral.

audiofre - Audio frequency generator

Audio frequency generator

Taken from Rosetta Code: Audio frequency generator.

barnsley - Barnsley fern

Barnsley fern

Taken from Rosetta Code: Barnsley fern.

binary - Binary digits

Binary digits

Taken from Rosetta Code: Binary digits.

biorhyth - Biorhythms

Biorhythms

Taken from Rosetta Code: Biorhythms.

brownian - Brownian tree

Brownian tree

Taken from Rosetta Code: Brownian tree.

callfor - Call a foreign-language function

Call a foreign-language function

Taken from Rosetta Code: Call a foreign-language function.

chaos - Chaos game

Chaos game

Taken from Rosetta Code: Chaos game.

colorbar - Colour bars/Display

Colour bars/Display

Taken from Rosetta Code: Colour bars/Display.

colorscr - Color of a screen pixel

Color of a screen pixel

Taken from Rosetta Code: Color of a screen pixel.

constrpo - Constrained random points on a circle

Constrained random points on a circle

Taken from Rosetta Code: Constrained random points on a circle.

deletefi - Delete a file

Delete a file

Taken from Rosetta Code: Delete a file.

detectdi - Detect division by zero

Detect division by zero

Taken from Rosetta Code: Detect division by zero.

drawclk - Draw a clock

Draw a clock

Taken from Rosetta Code: Draw a clock.

drawcub - Draw a cuboid

Draw a cuboid

Taken from Rosetta Code: Draw a cuboid.

drawsp - Draw a sphere (ASCII)

Draw a sphere (ASCII)

Taken from Rosetta Code: Draw a sphere.

drawsp2 - Draw a sphere

Draw a sphere

Taken from Rosetta Code: Draw a sphere.

ethiopia - Ethiopian multiplication

Ethiopian multiplication

Taken from Rosetta Code: Ethiopian multiplication.

execute - Execute a system command

Execute a system command

Taken from Rosetta Code: Execute a system command.

forest - Forest fire

Forest fire

Taken from Rosetta Code: Forest fire.

function - Function definition

Function definition

Taken from Rosetta Code: Function definition.

gofish - Go Fish

Go Fish

Taken from Rosetta Code: Go Fish.

guessnfb - Guess the number with feedback

Guess the number with feedback

Taken from Rosetta Code: Guess the number with feedback.

guessnum - Guess the number

Guess the number

Taken from Rosetta Code: Guess the number.

happynum - Happy numbers

Happy numbers

Taken from Rosetta Code: Happy numbers.

hellolp - Hello world (Line printer)

Hello world (Line printer)

Taken from Rosetta Code: Hello world (Line printer).

hellonb - Hello world (Newbie)

Hello world (Newbie)

Taken from Rosetta Code: Hello world (Newbie).

introspe - Introspection

Introspection

Taken from Rosetta Code: Introspection.

joystick - Joystick position

Joystick position

Taken from Rosetta Code: Joystick position.

juliaset - Julia set

Julia set

Taken from Rosetta Code: Julia set.

keybofl - Keyboard input: Flush the keyboard buffer

Keyboard input: Flush the keyboard buffer

Taken from Rosetta Code: Keyboard input: Flush the keyboard buffer.

keyboyn - Keyboard input: Obtain a Y or N response

Keyboard input: Obtain a Y or N response

Taken from Rosetta Code: Keyboard input: Obtain a Y or N response.

knights - Knight’s tour

Knight's tour

Taken from Rosetta Code: Knight’s tour.

langtons - Langton’s ant

Langton's ant

Taken from Rosetta Code: Langton’s ant.

magic8 - Magic 8-ball

Magic 8-ball

Taken from Rosetta Code: Magic 8-ball.

makeback - Make a backup file

Make a backup file

Taken from Rosetta Code: Make a backup file.

mandelbr - Mandelbrot set

Mandelbrot set

Taken from Rosetta Code: Mandelbrot set.

matrixra - Matrix digital rain

Matrix digital rain

Taken from Rosetta Code: Matrix digital rain.

mcnugget - McNuggets problem

McNuggets problem

Taken from Rosetta Code: McNuggets problem.

metronom - Metronome

Metronome

Taken from Rosetta Code: Metronome.

mineswee - Minesweeper game

Minesweeper game

Taken from Rosetta Code: Minesweeper game.

montecar - Monte Carlo methods

Monte Carlo methods

Taken from Rosetta Code: Monte Carlo methods.

musscale - Musical scale

Musical scale

Taken from Rosetta Code: Musical scale.

nqueens - N-queens problem

N-queens problem

Taken from Rosetta Code: N-queens problem.

nondecra - Non-decimal radices

Non-decimal radices

Taken from Rosetta Code: Non-decimal radices.

onedimca - One-dimensional cellular automata

One-dimensional cellular automata

Taken from Rosetta Code: One-dimensional cellular automata.

pascaltr - Pascal’s triangle

Pascal's triangle

Taken from Rosetta Code: Pascal’s triangle.

pinstrip - Pinstripe: Display

Pinstripe: Display

Taken from Rosetta Code: Pinstripe: Display.

progterm - Program termination

Program termination

Taken from Rosetta Code: Program termination.

rainbow - Rainbow

Rainbow

Taken from Rosetta Code: Rainbow.

random - Random number generator (included)

No code.

See: Rosetta Code: Random number generator (included).

readfile - Read a file line by line

Read a file line by line

Taken from Rosetta Code: Read a file line by line.

renfile - Rename a file

Rename a file

Taken from Rosetta Code: Rename a file.

rockpap - Rock-paper-scissors

Rock-paper-scissors

Taken from Rosetta Code: Rock-paper-scissors.

rot13 - Rot-13

Rot-13

Taken from Rosetta Code: Rot-13.

showasc - Show ASCII table

Show ASCII table

Taken from Rosetta Code: Show ASCII table.

sieveera - Sieve of Eratosthenes

Sieve of Eratosthenes

Taken from Rosetta Code: Sieve of Eratosthenes.

snake - Snake

Snake

Taken from Rosetta Code: Snake.

speech - Speech synthesis

Speech

Taken from Rosetta Code: Speech synthesis.

substr - Substring: Top and tail

Substring: Top and tail

Taken from Rosetta Code: Substring: Top and tail.

systime - System time

System time

Taken from Rosetta Code: System time.

termct1 - Terminal control: Coloured text

Terminal control: Coloured text

Taken from Rosetta Code: Terminal control: Coloured text.

termct2 - Terminal control: Cursor positioning

Terminal control: Cursor positioning

Taken from Rosetta Code: Terminal control: Cursor positioning.

termct3 - Terminal control: Dimensions

Terminal control: Dimensions

Taken from Rosetta Code: Terminal control: Dimensions.

termct4 - Terminal control: Display an extended character

Terminal control: Display an extended character

Taken from Rosetta Code: Terminal control: Display an extended character.

termct5 - Terminal control: Hiding the cursor

Terminal control: Hiding the cursor

Taken from Rosetta Code: Terminal control: Hiding the cursor.

termct6 - Terminal control: Inverse video

Terminal control: Inverse video

Taken from Rosetta Code: Terminal control: Inverse video.

termct7 - Terminal control: Positional read

Terminal control: Positional read

Taken from Rosetta Code: Terminal control: Positional read.

termct8 - Terminal control: Ringing the terminal bell

Terminal control: Ringing the terminal bell

Taken from Rosetta Code: Terminal control: Ringing the terminal bell.

unicode - Unicode strings

Unicode strings

Taken from Rosetta Code: Unicode strings.

videomod - Video display modes

Video display modes

Taken from Rosetta Code: Video display modes.

write3d - Write language name in 3D ASCII

Write language name in 3D ASCII

Taken from Rosetta Code: Write language name in 3D ASCII.

yinyang - Yin and yang

Yin and yang

Taken from Rosetta Code: Yin and yang.

zeropow - Zero to the zero power

Zero to the zero power

Taken from Rosetta Code: Zero to the zero power.

mv, 03/2025