Skip to content

Examples ​

Examples show where the labs lead. Each guide covers running the program, its controls, and captured states. Build all examples once with devenv shell -- lcom-ng-build.

Focused examples ​

ProgramDemonstrates
helloinitialization, console output, clean exit
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 + uart_peer_receivertwo hosted machines bridged by serial

Project seeds ​

ProgramGuideDemonstrates
word_processorNoteseditor loop, cursor state, text wrapping
music_makerPocket Composertracker grid, tempo, playhead, PCM
breakout_demoBreakouttimer physics, keyboard state, collision
flappy_birdFlappy Birdcompact game loop, replay, capture
ninjixNinjixlarger port with input, graphics, UART multiplayer

Showcase studios ​

Seven Showcase Studios are project-scale tools: a sprite editor, a level editor, paired UART collaboration and transfer, a focus clock, an interrupt monitor, and an RTC-aware aquarium. Each has an 800×600 interface, a canonical command, captured evidence, and a full control table.

Screenshots ​

Real captured frames from the included examples:

Word processor example showing a document canvas with typed text and editor status bars
word_processor: text editing, file saving, cursor state, and wrapping.
Music maker tracker example showing tracks, note grid, play button, and mixer meters
music_maker: note grid, Space transport, instruments, and PCM output.
Breakout demo showing paddle, ball, bricks, score, and pause controls
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: menus, input, graphics, and UART multiplayer.

Regenerate these overview images with devenv shell -- sh scripts/capture_marketing_examples.sh. Per-app galleries come from the screenshot workflow.

Canonical commands ​

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

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

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

Explore each example ​

Creative toolsDevices in actionGames
NotesFocus ClockBreakout
Pocket ComposerInterrupt ScopeFlappy Bird
Pixel StudioShared WhiteboardNinjix
Tile ForgeSerial TransferPlants vs. Zombies
Ambient Aquarium

On macOS use Cmd where a shortcut says Cmd/Ctrl; use Ctrl on other hosts. Esc closes help before leaving an app. Cmd/Ctrl+W closes an app. Save, undo and export shortcuts are listed on each guide.

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