Skip to content

Releases: kobby-pentangeli/lc3box

Auditable programs

Choose a tag to compare

@kobby-pentangeli kobby-pentangeli released this 01 Jul 02:38
2c33c3c

lc3box-v0.7.1

lc3box run now works when its input is not an interactive terminal, and the toolbox grows a set of small, self-contained example programs that each print their result to the console.

Added

  • A collection of short example programs under examples/, each self-contained and printing its result: reversing a string, counting the set bits of a word, computing the XOR of two registers, folding a vector with bitwise AND, counting a character's occurrences in a string, multiplying by ten, and three signed-comparison variants. Numeric results are shown by a small in-program decimal or hexadecimal print routine, since the LC-3 has no numeric-output trap.

Changed

  • The bundled example programs are now provided as readable, re-assemblable .asm source---disassembled from the pre-assembled objects where only an object existed---so every example can be read, edited, and re-assembled.

Fixed

  • lc3box run no longer aborts when standard input is not a terminal. Placing the terminal in raw mode is now best-effort, so a program run from a pipe, a redirect, or a non-interactive environment executes and prints its output instead of failing with a device error; an interactive terminal still gets raw-mode keyboard input as before.

New LC3 Debugger

Choose a tag to compare

@kobby-pentangeli kobby-pentangeli released this 22 Jun 23:31
bcb0695

What's new

Adds lc3debug, an interactive debugger for the toolbox: load a program and drive it one instruction at a time---single-step, set breakpoints, inspect and edit registers and memory, and disassemble the code around the program counter---so what a program does between assembly and output is no longer a black box.

Added

  • lc3debug, a new interactive debugger that drives the lc3vm virtual machine one instruction at a time. It single-steps (step [n]), runs to a breakpoint or HALT (continue), sets and clears breakpoints (break/delete) and lists them (breaks), shows and edits the register file (registers/set) and memory (write), disassembles a window around the program counter (disassemble), and reloads the program to its entry point (reset). The engine is a pure state machine with no terminal of its own, so it embeds cleanly in other programs.
  • An lc3box dbg subcommand that opens a debugging session on a program: lc3box dbg program.asm assembles it in memory first, lc3box dbg program.obj loads the object directly, then reads commands from a prompt. An executing program drives the terminal in raw mode for the span of the run, while the prompt stays line-edited.
  • lc3box::dbg in the umbrella library, re-exporting lc3debug alongside the existing kernel/vm/asm/dsm modules, each behind a like-named feature---full now enables all five.
  • The library primitives the debugger is built on: a public single-step entry point on the virtual machine (lc3vm) and single-instruction rendering in the disassembler (lc3dsm).

lc3box-v0.6.0-stable

Choose a tag to compare

@kobby-pentangeli kobby-pentangeli released this 21 Jun 16:28
8ff8cb5

First stable release

Features

  • lc3core, a shared library crate that defines the LC-3 instruction set: the opcode set, the register and condition-code model, the trap vectors, the memory-map constants, the big-endian .obj object-file format, and the assembler pseudo-ops.
  • lc3as, a two-pass assembler that translates LC-3 assembly source (.asm) into the big-endian .obj object files lc3vm runs.
  • lc3dsm, a disassembler that decodes a big-endian .obj object file back into a readable, re-assemblable LC-3 assembly listing.
  • lc3vm, LC-3 virtual machine that loads and executes a pre-assembled object file (.obj), interpreting it against a full 16-bit address space.
  • lc3box, a unified command-line driver with one subcommand per tool: run executes a program, asm assembles source into object files, and disasm disassembles an object back into a re-assemblable listing.