Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

7 Module io

Luiz Felipe edited this page May 29, 2020 · 1 revision

This module declares procedures to do input and output.

Requires

  • $/lia
  • $/var

putn

proc putn

Prints the number at register rc to output in signed decimal format.

readn

proc readn

Reads an line from input and converts to number, using signed decimal format. The procedure returns the converted number at ss and rd registers.

Example

[import "$/lia", "$/var", "io"]

say "Inserts your age: "
call readn
mov rc, ss

set re, 255
iadd re, 110
mul rc, re

say "Your have approximately "
call putn
say " days of life.\n"

Clone this wiki locally