27 lines
369 B
Plaintext
27 lines
369 B
Plaintext
/**
|
|
* Plexes
|
|
*/
|
|
plex Terminal {
|
|
nat handle;
|
|
}
|
|
|
|
|
|
/**
|
|
* Main function
|
|
*/
|
|
function main() {
|
|
Terminal term = open("/dev/term/0", 0);
|
|
pln("Enter a string: ");
|
|
pln(term.read(32) as str);
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* Print with a newline
|
|
*/
|
|
function pln(str message) {
|
|
Terminal term = open("/dev/term/0", 0);
|
|
term.write(message);
|
|
term.write("\n");
|
|
}
|