Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit dff8087

Browse files
committed
Document trap 0x02
1 parent 653725e commit dff8087

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ on behalf of a program. Only two traps are defined right now:
168168
* `int 0x01`
169169
* Set the contents of the register `#0` with a string entered by the user.
170170
* See [examples/trap.stdin.in](examples/trap.stdin.in).
171+
* `int 0x02`
172+
* Update the (string) contents of register `#0` to remove any trailing newline.
173+
* See [examples/trap.box.in](examples/trap.box.in).
171174

172175
Adding your own trap-functions should be as simple as editing [cpu/traps.go](cpu/traps.go).
173176

0 commit comments

Comments
 (0)
⌂ 换网址