#mailstation

2025-10-20

Procedurally generated space game is picking back up on the #TI92 because, unlike the #MailStation, it's possible to save my work on here.

TI-BASIC is, ehm, slow. Eventually I'll snap and port a TinyBasic or Forth over here.

#ticalc

TI-92+ displaying:

(1, 8) octau system
Class K biosphere
2025-10-02

More portable #retrocomputing philosophizing: Whether a machine has "Instant-On" makes a huge difference in the tasks it's useful for. By this, I mean whether the machine returns to the same program and screen where you left it, when powered back on from inactivity.

Without "Instant-On", the machine demands to be used for long sessions, (else the boot time is too inconvenient) and demands your constant attention (else the power draw of leaving it sitting around powered on is wasted). Using the machine involves clearing your schedule and devoting yourself to it, like reading a book.

Examples of machines without "Instant-On": DOS-era laptops, #Book8088, #GameBoy, #MailStation.

With "Instant-On", the machine is useful for PDA-style quick jottings, grocery lists, etc. It is also useful for fun activities even in circumstances where you are likely to be interrupted.

Examples of machines with "Instant-On": #HP200LX, #HpOmniBook, #PalmPilot, #PocketPC, #TI92 (and other TI calculators), and, of course, smartphones.

While machines in the first category may offer a more immersive experience, they are far less useful to me than machines in the second category. It's like the difference between a luggable and a true mobile computer.

2025-10-01

Am I suddenly working on a procedurally generated game? Maybe!
Anyway, here are some names. For people, planets, or whatever.
#MailStation #TinyBasic

Mailstation displaying:
OK
CLOHEE
OK
RIEBY
OK
RBUU
OK
2025-09-29

#MailStation #TinyBasic program of the day: Hangman!

I wanted something that would exercise my hacked-in "strings" support. Seems to work well enough for a word game!

Source listing (21 lines): gitlab.cs.washington.edu/fidel

#basic #retrocomputing

WRONGS: 0, WORD: _____
WRONGS: 0, WORD: _A___
WRONGS: 0, WORD: _A__E
WRONGS: 1, WORD: _A__E
WRONGS: 2, WORD: _A__E
WRONGS: 2, WORD: _AU_E
2025-09-28

Okay, now I have EMIT(n) to turn an ascii code back to a printed character. #MailStation #basic

10 FOR I = 32 TO 128
20 EMIT(I)
30 NEXT I
OK
!"#$%&`()*+,-./0123456789:; (...etc...)
2025-09-26

Here is the source code for my recent #TinyBasic and #MailStation work

gitlab.cs.washington.edu/fidel

  • Machine code monitor and TinyBasic for Cidco MailStation (#z80 Internet Appliance)
  • The programs are small enough that a determined person can key them into the MailStation's built-in hex editor in 1 hour or less.   They run as loadable MailStation "channels".   They make it pretty fun as a self-contained mobile development platform, though you can't easily save your work. Carry pencil and paper!

gitlab.cs.washington.edu/fidel

Cidco MailStation displaying a BASIC listing that calculates Fibonacci numbers.
The program is then run and results displayed: 1 1 2 3 5 8 13 21 34 ...
2025-09-24

Yup, TinyBasic is working on real #MailStation hardware too. #retrocomputing
It took about an hour to key the 2 KB program into dataflash, but it was well worth it. Now I have a #basic on the go!

Cidco Mailstation (boxy black device with keyboard and built in angled lcd screen).  The screen reads,
OK
16325 BYTES FREE
HELLO THERE!
OK
2025-09-24

A couple bugs squashed, #TinyBasic seems stable now on the #MailStation! How fun!

Program listing being displayed by the Mailstation emulator
10 PRINT #1, SIZE, " BYTES FREE"
20 FOR I = 1 TO 5
30 PRINT "HELLO MASTODON!"
40 NEXT I
OKProgram output being displayed by the Mailstation emulator
16294 BYTES FREE
HELLO MASTODON!
HELLO MASTODON!
HELLO MASTODON!
HELLO MASTODON!
HELLO MASTODON!
OK
2025-09-23

Inching toward another interesting program running on the #MailStation. That's right, it's Palo Alto Tiny #Basic v3! And, as can be seen from this screenshot, it's still feeling a bit woozy.

An emulator screenshot displaying,

TINY BASIC V3.0
OK
HELLO WORLD

WHAT?
TINY BASIC V3.0
OK
2025-09-17

#MailStation #Forth has peculiar execution flow because of the event-driven environment it runs in. Forth's entry points are COLD (expected!) and ACCEPT (rather less expected). Forth so far has only one exit/yield point, also in ACCEPT, to await input provided from the gui textentry field.

Execution smoothly falls through from cold -> abort -> quit -> accept, with no "ret" along the way. (Even the "ret"-to-caller on line 42, the exit point, is tailcall optimized away by jumping to the final function rather than calling it.) It still feels transgressive to embrace unstructured-programming, even though it works great for "telescoping" routines that share an end.

When user input is received, execution picks back up on line 43. Finally, quit2 slams us unceremoniously into high-level threaded code, because by now we have set up enough interpreter state to run it.

A lot going on in this screenful of code. It's absolutely wild to implement an interpreter core without needing any conditional-branch instructions yet.

Assembly language listing

usr_init:
	jp		entry_cold
usr_cmd:
	jr		entry_accept
entry_cold:
	ld		(sp_c), sp			; save machine sp
cold:
	ld		ix, (out_buf)		; reset output pointer
	ld		(ix+0), 0			; null terminate
abort:
	ld		hl, 0xc000			; clear d-stack
	ld		sp, hl
quit:
	ld		iy, 0xbefe			; clear r-stack
	ld		de, quit2
accept:
	push	bc					; save tos onto d-stack
	push	de					; save ip
	push	ix					; save output pointer
	push	iy					; save r-stack
	ld		(sp_d), sp			; save d-stack sp
	ld		sp, (sp_c)			; restore machine sp
	xor		a
	ld		hl, (in_buf)
	ld		(hl), a				; clear input buffer
	call	frombuf
	jp		draw				; implicit ret, accept user input
entry_accept:
	ld		(sp_c), sp			; save machine sp
	ld		sp, (sp_d)			; restore d-stack sp
	pop		iy					; restore r-stack
	pop		ix					; restore output pointer
	pop		de					; restore ip
	pop		bc					; restore tos from d-stack
	jp		next
quit2:
	dw		interpret
	dw		quit
2025-09-16

Inevitably, I've been writing a #Forth for the #MailStation. Right now all it does is display the name of the world's greatest band (okay, that's really a test of the inner interpreter).

Cidco MailStation emulator displaying the word "ABBA"
2025-09-09

PsfMon, my #z80 machine code monitor, is now running on my real #MailStation!

I optimized it from its original size of 332 bytes to 255 bytes, snugly fitting in one 256 byte page of dataflash. The gui "terminal emulator" takes another 256 byte page. This provides a self contained 512 byte development tool.

Command set - similar to #WozMon:

8000 - View byte at address 8000
8010,801f - View 16 bytes at address 8010
,803f - View from next address (8020) to 803f
8040>de ad - Place bytes de ad starting at 8040
>be ef - Place bytes be ef next (at 8042)
8000r - Execute code at address 8000

Anyway, here it is displaying 128 bytes of its own code.

Chunky black device with MailStation label.  It houses a screen and horizontal qwerty keyboard and is about the size of a hardback textbook.  It is displaying a screenful of dumped hex.  The command 4100,417e is visible at bottom of screen.MailStation displaying three apps in its app launcher.  Hex Editor (blank icon); Top Stories (newspaper icon); PsfMon (blank icon displaying as a black square because the app is selected.)  Pressing Enter at this point would launch PsfMon.
2025-09-07

I have now written a #z80 machine code monitor for the #MailStation. The command set is very influenced by WozMon, but unlike #Woz I haven't managed to fit it in 256 bytes (yet...)

So now, in the strictest sense of the word, I have a #repl on this thing!

(While there was already a built-in hex editor, it was not suited to interactive use. A reboot was necessary to test changes, and it was restricted to writing dataflash, which has a limited number of write cycles.)

Hex editor displaying ranges of memory at 8000 and 8010-8017.
8000>c9
8010>00 00 00 00 00 00 00

At the bottom of the screen is a textbox containing the command
8000r
which when executed would call the code starting at address 8000
2025-09-06

After lots of invisible optimization work, I've saved enough space that my new #MailStation app can display its name and icon in the app launcher.

Cidco Mailstation displaying two labeled icons.

A newspaper labeled Top Stories

A black square labeled ShellApp

Guess which one was a built in app and which one is mine?
2025-09-04

Incongruously for a #z80 powered device, the #MailStation is heavily GUI based. There isn't a putc function, or even a fixed-width font, in the firmware. Instead, a windowing toolkit and a selection of widgets are provided, and loadable apps are expected to be event-driven. Each app supplies a main event handler function responding to incoming signals such as init, draw, and keydown. Apps don't take over the whole system as typical on single tasking retrocomputers. While the Mailstation doesn't do true multitasking, (or even #HP200LX-like switching between paused apps!), the event-driven software architecture is helpful for battery life, as the CPU can spend most of its time halted waiting for interrupts.

2025-09-04

Most of my development so far has used the community-created JsMailStation emulator, but it's a good idea to test on real hardware occasionally. For me, that means keying the program into the #MailStation's built-in hex editor. It still fits in less than 256 bytes, so the data entry isn't as time consuming as it might seem... yet.

Cidco Mailstation with the built in hex editor displaying a screenful of machine code.
2025-09-04

Current state of the #MailStation homebrew software: a singleline text field for user input, and a much larger multiline text field for program output. So we now have a terminal-like interface we can use as a basis for writing command-line software.

Cidco MailStation (black keyboard with built-in grayscale LCD screen).  The top of the screen reads "Programs can display output...".  A rectangular field near the bottom of the screen reads "...and also accept input", with a vertical bar cursor.
2025-09-03

Sweet jesus #MailStation that's not honey! You're eating uninitialized memory!

Emulator displaying a row of garbage non-ascii characters
2025-08-27

Okay, that's hello world on the #MailStation.

Screenshot of Mailstation emulator displaying "Hello", not quite centered, in a medium font.
2025-08-17

box2->x0 = (box1->x1 - 30)*foo / (fbuf[0] + fbuf[1])

Sometime soon, hopefully, I will understand the significance of this value that #MailStation widget #4 has calculated.

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst