TABLE OF CONTENTS
- 1. ksi/cons
- 1.1. cons/print_char, print_string, print_line, new_line
- 1.2. cons/print_hex_byte, print_hex_word, print_integer
- 1.3. cons/read_hex, read_integer
- 1.4. cons/read_key, read_line
ksi/cons [ Modules ]
NAME
ksi - console I/O module
DESCRIPTION
This module contains functions that perform console Input and Output.
cons/print_char, print_string,
print_line, new_line [ Functions ]
[ Top ] [ cons ] [ Functions ]
NAME
print_char, print_string, print_line, new_line - functions to print strings and characters
SYNOPSIS
print_char: procedure (char) print_string: procedure (pstr) print_line: procedure (pstr) new_line: procedure
DESCRIPTION
These functions print characters or strings and do not return anything. * print_char prints a single character * print_string prints a 0h terminated string * print_line prints a 0h terminated string and goes to the new line * new_line simply goes to the new line without actually printing any visible character
RETURN VALUE
These functions do not return any value.
cons/print_hex_byte, print_hex_word,
print_integer [ Functions ]
[ Top ] [ cons ] [ Functions ]
NAME
print_hex_byte, print_hex_word, print_integer - print a number
SYNOPSIS
print_hex_byte: procedure (b) print_hex_word: procedure (w) print_integer: procedure (num)
DESCRIPTION
These functions print the number given as argument to the console. The _hex_ functions print an unsigned number as hexadecimal with leading zeros if needed. The width of the number printed by print_hex_byte is 2 characters, and print_hex_word prints the number using 4 characters. The function print_integer prints a signed decimal number, prefixed with a minus sign if it's negative, and it does not print leading zeros.
RETURN VALUE
These functions do not return any value.
cons/read_hex, read_integer [ Functions ]
[ Top ] [ cons ] [ Functions ]
NAME
read_hex, read_integer - read a number from the console
SYNOPSIS
read_hex: procedure (pnum) read_integer: procedure (pnum)
DESCRIPTION
These two function read a hexadecimal or a decimal number from the console respectively and store it in the location pointed by the pnum parameter.
RETURN VALUE
These function do not return any value.
cons/read_key, read_line [ Functions ]
[ Top ] [ cons ] [ Functions ]
NAME
read_key, read_line - functions to read from the console
SYNOPSIS
read_key: procedure byte read_line: procedure (length, pbuf) integer
DESCRIPTION
* read_key reads one character from standard input without needing new line to be entered. * read_line reads a line from standard input of maximum length and returns the length read. The string is always null- terminated.
RETURN VALUE
The return value of read_key is the character entered. If shift or Control keys were pressed when entered the character, the value is modified accordingly. The return value of the read_line function is the length of the line entered. It cannot be greater than length - 1 and is terminated by a zero byte.