You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
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"