Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:41 07 Sep 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : A MMbasic editor, compiler and runtime for Windows and Linux

Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11818
Posted: 03:25pm 06 Sep 2026
Copy link to clipboard 
Print this post

# pc3host 0.8.0 - the Pico Computer 3's BASIC, on a PC

https://github.com/UKTailwind/pc3host/releases/tag/v0.8.0

Two packages, one for Linux and one for Windows. Both carry the same thing: Based on the the Pico Computer 3's own Fuzix toolchain, built from the machine's own sources, running on a PC.

You write MMBasic using the standard MMBasic editor `mmbedit`, `cc` compiles it, and it runs in a window that is the PC3's screen - the kernel's display code, its keyboard decoder and its sound engine, compiled into a small server that plays the part the kernel plays on the board. A program that runs here runs on the board, and it draws the same pixels: the graphics tests are compared against
images captured from the machine itself.

| `pc3host_0.8.0_amd64.deb` | Debian, Ubuntu, Mint and their kin |
| `pc3host-0.8.0-win64.zip` | Windows 10 or later, 64-bit |

## Linux

```
sudo dpkg -i pc3host_0.8.0_amd64.deb
```

Everything but the display server is statically linked, so it installs on any distribution of that age or newer; the server needs the X11 libraries, which a desktop already has. It puts itself under `/opt/pc3` and links the names a PC has no other use for into `/usr/bin`.

The compiler is called `cc`, as it is on the board, and that name is deliberately not taken from your system. Use `pc3` to get a shell with the PC3's tools first on the PATH, or `pc3cc` to call the compiler directly:

```
pc3                                   # a shell with the tools first
cc -r /opt/pc3/share/examples/gfx1.bas
```

## Windows

Unpack the zip anywhere - your Documents folder is fine - and run **`install.cmd`** inside it. It puts the tools on your account's PATH and tells Windows that a `.bc` file is a program. No administrator rights are needed, nothing is copied into Windows itself, and `uninstall.cmd` beside it undoes both. **Open a new command prompt afterwards**: the one you have still holds the old environment.

To try it without changing anything, run `pc3.cmd` instead, which opens a prompt with the tools on its PATH for as long as that window is open.

Windows will not know the programs and will say so the first time: they carry no signature. Right-click the zip, tick **Unblock** in its Properties before extracting, and you will be asked less. A machine running Smart App Control, or under a Device Guard policy, refuses unsigned programs outright and there is nothing in the package that can change that.

## The first five minutes, on either

```
cc -r hello.bas          build it and run it
cc hello.bas             build it: hello.bc
bcrun hello.bc           run what you built
mmbedit hello.bas        the editor; F2 saves, builds and runs
```

On Windows a built program is also `.\hello.bc` in a command prompt, or a double click in Explorer. It will not run as a bare `hello`: a `.bc` is not a Windows  executable, it is a file that `bcrun` runs, the way the `#!` line has the board run it.

The editor is `mmbedit`, not `mmedit`: MMEdit is Jim Hiley's Windows IDE for MMBasic and this is not it.

Things to try, wherever the package put its examples (`/opt/pc3/share` or `share\` in the folder you unpacked):

```
cc -r share/examples/gfx1.bas        a picture
cc -r share/examples/keydemo.bas     the keyboard
cc -r share/examples/pc3bench.bas    what each kind of thing costs here
cc -r share/examples/samples/breakout.bas    breakout game using tilemap
cc -r share/examples/samples/bubble.bas      bubble universe
```

The Windows package also has **`selftest.cmd`**: it compiles the eclipse
predictor - 3,213 lines of real astronomy - with the shipped compiler,
checks its output to the last digit, and then opens the window.

## What is in box

The compiler and its passes, the BASIC translator, the bytecode runtime,
the editor, the image loaders, the four audio players and the display
server. Beside them: 83 sample programs, the 112 test programs with the
output each must produce, the whole translator source, the manuals, and
the test scripts.

## What is not

The board's hardware. There are no pins on a PC, so `SETPIN`, `PIN`,
`I2C`, `SPI`, `PWM`, the counting inputs and the real-time clock
registers answer "not available" rather than pretending. Everything
else - graphics, sound, the keyboard, files, and the `WEB` family over
your machine's own network - is real.

Timing is the other difference worth knowing. Frame pacing is a timer
rather than a monitor's vertical blanking, and a graphics statement here
is a message to the display server where on the board it is a register
write, so a program that races the frame will feel slightly different.
`pc3bench.bas` measures it on the machine in front of you.
 
tgerbic
Senior Member

Joined: 25/07/2019
Location: United States
Posts: 122
Posted: 05:49pm 06 Sep 2026
Copy link to clipboard 
Print this post

Just get a 404 on that link.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11818
Posted: 06:00pm 06 Sep 2026
Copy link to clipboard 
Print this post

works for me and I've checked it is definitely public
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 684
Posted: 06:29pm 06 Sep 2026
Copy link to clipboard 
Print this post

Hello Peter,

I’ve tried this on win11: ...\pc3host>pc3.cmd
")" kann syntaktisch an dieser Stelle nicht verarbeitet werden.

Translated:
")" cannot be processed syntactically at this point.

The selftest.cmd file worked perfectly.

Matthias
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3875
Posted: 06:31pm 06 Sep 2026
Copy link to clipboard 
Print this post

Works for me in Canada:

  Quote  C:\dl2\pc3host>cc -r share\examples\gfx1.bas
wrote gfx1.mb.c
...................................................................................................................................................................................................................................................................

C:\dl2\pc3host>cc -r share\examples\keydemo.bas
wrote keydemo.mb.c
..............................................................................................................................................................................................................................................................

C:\dl2\pc3host>cc -r share\examples\pc3bench.bas
wrote pc3bench.mb.c
..................................................................................................................................................................................................................................................................
pc3bench
                                   this machine     reference
round trip (GETPIXEL)              92.5 us      27 us
interpreter, 2M adds              828 ms       (about 130 ms)
FRAMEBUFFER COPY F, N              74.5 us      51 us
FRAMEBUFFER COPY F, N, B           17.26 ms   16.80 ms (one frame)
INKEY$ with nothing pressed        65.2 us      10 us (from a terminal)
BOX 90x50 filled                  727.1 us     246 us
TEXT (one crossing each)          261.0 us      72 us
CLS                               182.1 us      74 us
done - paste this with the last line pc3d --verbose prints on exit

C:\dl2\pc3host>cc -r myprog.bas
wrote myprog.mb.c
....................................................................................................................................................................................................................................................
Hello, MMBasic World

C:\dl2\pc3host>cat myprog.bas
print "Hello, MMBasic World"


What a world we live in. (MMBasic World)

~
Edited 2026-09-07 04:33 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on FOTS
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 603
Posted: 07:09pm 06 Sep 2026
Copy link to clipboard 
Print this post

  lizby said  What a world we live in. (MMBasic World)

I wish it were possible to program the world of TIC-80 in MMBasic.
https://tic80.com/
It understands a variety of scripting languages, but so far it's only unknown about MMBasic.
DISPLAY   240x136 pixels, 16 colors palette.
INPUT     4 gamepads with 8 buttons / mouse / keyboard.
SPRITES   256 8x8 tiles and 256 8x8 sprites.
MAP       240x136 cells, 1920x1088 pixels.
SOUND     4 channels with configurable waveforms.
CODE      64KB of lua, ruby, js, moon, fennel, scheme, squirrel, wren, wasm, janet or python.

https://github.com/nesbox/TIC-80
The TIC-80 community says that with enough determination and skill, you can add support for your favorite programming language to this fantasy computer project.
I like MMBasic and would like to make a couple of demos for the TIC-80 using it too.
Edited 2026-09-07 05:14 by javavi
 
tgerbic
Senior Member

Joined: 25/07/2019
Location: United States
Posts: 122
Posted: 09:19pm 06 Sep 2026
Copy link to clipboard 
Print this post

Can reach it now. Charter/Spectrum is in the middle of a network upgrade in my area. Maybe a DNS problem.
 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 236
Posted: 10:45pm 06 Sep 2026
Copy link to clipboard 
Print this post

I have tried it on a few programs and games. It works on picovaders but chokes on frogger and gnr. Has problem with redefined character sets and defining "Break".
Pretty cool so far.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026