Skip to content

Examples

Examples show where the labs lead: small focused programs, project seeds, and larger ports.

Focused Examples

ProgramDemonstrates
helloinitialization, runtime console, process boundary
timer_intIRQ0 subscription and event waits
rtc_dateCMOS ports, UIP, BCD conversion, fixed RTC
keyboard_scanIRQ1 and make/break scancodes
mouse_packetIRQ12, PS/2 enable/ACK, signed packet deltas
vbe_rectangleVBE mode, framebuffer map, pitch, present
audio_tonePCM mapping, synthesis, AC97-lite playback
uart_loopbackUART loopback and RX interrupt
uart_peer_sender + receivertwo hosted machines bridged by serial

Project Seeds

ProgramDemonstrates
word_processoreditor loop, cursor state, text wrapping, framebuffer UI
music_makertracker grid, tempo, playhead, generated PCM
breakout_demotimer physics, keyboard state, collision, HUD
flappy_birdcompact game loop, audio, replay, capture
Ninjixlarger port with input, graphics, audio, profiling, UART multiplayer

Showcase Studios

Explore the seven Showcase Studios for complete project-scale tools and demonstrations: sprite and level editors, paired UART collaboration and transfer, a Pomodoro clock, an interrupt monitor, and an RTC-aware aquarium.

Each studio includes a polished 800×600 interface, exact controls, a canonical command, deterministic evidence, and reusable final-project infrastructure.

Screenshots

These are real captured frames from the included examples. They are meant to show the range of final-project directions: tools, trackers, arcade games, and larger ports.

Word processor example showing a document canvas with typed text and editor status bars
word_processor: text editing, cursor state, wrapping, and framebuffer UI.
Music maker tracker example showing tracks, note grid, play button, and mixer meters
music_maker: tracker grid, playhead, tempo, instruments, and PCM output.
Breakout demo showing paddle, ball, bricks, score, and lives
breakout_demo: timer physics, keyboard state, collision, and HUD.
Flappy Bird style demo showing side-scrolling pipes and player character
flappy_bird: compact game loop, replay capture, and audio hooks.
Ninjix menu showing play, multiplayer, instructions, credits, and exit options
Ninjix: larger port with menus, input, graphics, audio hooks, and UART multiplayer.

Canonical Commands

sh
machinelab run --headless --script scripts/write_note.mlabscript \
  --dump-frame build/write.ppm -- build/examples/word_processor

machinelab run --headless --script scripts/music_maker_demo.mlabscript \
  --audio-wav build/music.wav --dump-frame build/music.ppm -- build/examples/music_maker

machinelab run-pair --headless build/examples/uart_peer_sender \
  --right build/examples/uart_peer_receiver --max-ticks 800

Course/docs licensed CC BY 4.0. Code licensed MIT.