The Mouse Language, Running On Arduino

Although plenty of us have our preferred language for coding, whether it’s C for its hardware access, Python for its usability, or Fortran for its mathematic prowess, not every language is specifically built for problem solving of a particular nature. Some are built as thought experiments or challenges, like Whitespace or Chicken but aren’t used for serious programming. There are a few languages that fit in the gray area between these regions, and one example of this is MOUSE, which can now be run on an Arduino.

Although MOUSE was originally meant to be a minimalist language for computers of the late 70s and early 80s with limited memory (even for the era), its syntax looks more like a more modern esoteric language, and indeed it arguably would take a Python developer a bit of time to get used to it in a similar way. It’s stack-based, for a start, and also uses Reverse Polish Notation for performing operations. The major difference though is that programs process single letters at a time, with each letter corresponding to a specific instruction. There have been some changes in the computing world since the 80s, though, so [Ivan]’s version of MOUSE includes a few changes that make it slightly different than the original language, but in the end he fits an interpreter, a line editor, graphics primitives, and peripheral drivers into just 2 KB of SRAM and 32 KB Flash so it can run on an ATmega328P.

There are some other features here as well, including support for PS/2 devices, video output, and the ability to save programs to the internal EEPROM. It’s an impressive setup for a language that doesn’t get much attention at all, but certainly one that threads the needle between usefulness and interesting in its own right. Of course if a language where “Hello world” is human-readable is not esoteric enough, there are others that may offer more of a challenge.


Image Credit: Maxbrothers2020

21 thoughts on “The Mouse Language, Running On Arduino

    1. That was my first thought too, but many news sites these days just use “generic picture of code being edited” stock photography (The Register, I’m looking at YOU) and, no offense to Hackaday, that’s my assumption here. Not as bad as the “all hackers wear hoodies and sit in front of Matrix-style scrolling green text” trope, though!

  1. FIGNtion was able to fit an entire version of Forth, video driver, keypad controller, full-screen editor, 512kB of Flash storage with a Flash translation layer for true block editing; 8 to 32kB of SPI SRAM for loaded programs and their data; audio; bitmapped and programmable character graphics modes with a blitter and floating point arithmetic into 16kB of AVR firmware. Forth ran at up to 0.4MIPs, 20x faster than a Jupiter Ace.

    https://sites.google.com/site/libby8dev/fignition

    1. Yes, Fignition got me re-ignited with enthusiasm for Forth.

      Will there ever be a follow-up? (Perhaps for an Agon Light 2 – hint, hint).

      Didn’t you also do a Forth for the PDP-8 ?

    2. Maybe I misunderstood, but the assembly site clearly states this. These are already significant resources, incomparable ATmega328P

      3 chips: An AtMega168, a Microchip 23K640 8Kb SRAM and an AMIC A25L040-F 4Mbit Flash Chip

    1. JAL (Just Another Language) cannot be used directly to program AVR microcontrollers.

      Here’s why:

      Different architectures: PIC (Microchip) and AVR (Microchip, formerly Atmel) microcontrollers have completely different internal architectures, instruction sets, and peripherals.
      JAL specialization: JAL was designed specifically for the PIC architecture. Its compiler generates machine code that only PIC processors can understand.
      No AVR support: The JAL toolchain does not include support for compiling code for the AVR architecture.

  2. Ah, Dr. Peter Grogono’s MOUSE. About ten years ago I remembered Mouse from an old Byte article. I tracked down the article and started to write a mouse interpreter in UNIVAC 1219 assembly language to run on my 1219 simulator. I had it running up to macros and never finished. I was planning to implement subroutines instead of macros but never finished. There is more information in the WIKIPEDIA article:
    https://en.wikipedia.org/wiki/Mouse_(programming_language)

  3. MOUSE was quite revolutionary 45 years ago when you just didn’t have the memory resources.

    I read the BYTE article and bought a 2nd hand copy of the book, which I translated into Z80 mnemonics (it was written in intel mnemonics).

    Some might say that MOUSE is like a Tiny Forth, in the same way that Tiny BASICs were popular in the late 1970s.

    If you have never written an interpreted bytecode language, reading the C-source will be a worthwhile educational experience.

    Other tiny interpreted languages exist – such as STABLE by Sandor Schneider. It’s very similar to MOUSE, but with a few changes. Remarkably the STABLE interpreter fits into about 50 lines of very compact C code.

    https://w3group.de/stable.html

  4. MOUSE is derived from Peter Grogono’s MUSYS.

    MUSYS was a language to simplify the composition of music and playing of some of the first electronic synthesisers.

    Peter Grogono wrote it around 1969 and it ran on a PDP-8 (in Putney, London, UK) for a small independent studio EMS.

    In 1969 a PDP-8 cost as much as a London house, and to finance it, the owner of EMS convinced his wife to sell an inherited tiara.

    EMS had not 1 but 2 of the first privately owned minicomputers in the world.

    https://120years.net/musys-and-mouse-audio-synthesis-language-peter-grogono-untied-kingdom-1965/

  5. I’ve had the thought, more than once, that it might be interesting to set up a microcontroller to emulate (or even just operate in the spirit of) an early computer, especially something that used a terminal to interface with the user. But I’ve never had a strong drive to actually do it. So it’s neat to see that someone has.

Leave a Reply to PinheadBECancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.