scene.org File Archive

File download

<root>­/­parties­/­2023­/­vccc23­/­christmas-diamonds/tabemann_rp2040_zeptoforth_vc3-2023.zip

File size:
307 409 bytes (300.20K)
File date:
2024-01-03 14:15:18
Download count:
all-time: 1

Preview

  • tabemann_rp2040_zeptoforth_vc3-2023/ dir
  • tabemann_rp2040_zeptoforth_vc3-2023/file_id.diz 1.86K
  • tabemann_rp2040_zeptoforth_vc3-2023/vccc2023.fs 225B
  • tabemann_rp2040_zeptoforth_vc3-2023/vccc2023.png 69.99K
  • tabemann_rp2040_zeptoforth_vc3-2023/vccc2023.uf2 1.12M

file_id.diz

VCCC 2023 for zeptoforth on the RP2040

Author: Travis Bemann
Category: Christmas Challenge
System:   RP2040, specifically Waveshare RP2040-LCD-0.96 in this case (any RP2040-based board will do)
Language: Forth, specifically zeptoforth
Len source code: 225 bytes
Len exe file:    1173504 bytes (binary size with UF2 overhead)
Len code only:   586256 bytes (binary size without UF2 overhead)
Instructions:
Note: to my knowledge there are no existing emulators which will run this code.
To execute it, do the following:
Obtain a board which will run zeptoforth, any RP2040-based board will do.
Use the bootloader mass storage device mechanism to flash the board with the included UF2 file. This is done by holding down the BOOTSEL button on the board while applying power to the board, mounting the filesystem that appears on one's system, and copying the UF2 file to that filesystem (which will then prompty disappear).
Connect a terminal emulator to the RP2040-based board's USB CDC console virtual COM port (under Windows) or TTY device (under a Unix-like OS); select a baud of 115200 (but this should not really matter because one is using USB).
Observe the output of the terminal emulator.
Description:
The code is designed to pack displaying the Christmas challenge output into a minimal amount of source code.
Comments:
The binary is very large considering the size of the Christmas challenge code because it includes a complete executable zeptoforth system; there is no way to separate code compiled with zeptoforth from zeptoforth system. (Also, the file format used by the UF2 file is very inefficient in its use of space, making it even larger.) Indeed, if one boots an RP2040-based board that has had this, and then enters a character to break out of the loop at the end of the turnkey, a zeptoforth welcome message followed by a prompt will be displayed, giving one full access to the system.