2018-07-12 16:30:35 +00:00
|
|
|
[< back to index](../index.md)
|
|
|
|
|
2018-12-17 16:18:29 +00:00
|
|
|
## stdio
|
2018-07-12 16:30:35 +00:00
|
|
|
|
2018-12-19 18:01:53 +00:00
|
|
|
The `stdio` module automatically imports the `string` and `err` modules.
|
2018-07-12 16:30:35 +00:00
|
|
|
It requires an implementation of `void putchar(byte a)` and therefore works only on targets with console output.
|
|
|
|
|
|
|
|
#### `void putstr(pointer str, byte len)`
|
|
|
|
|
|
|
|
Prints a string of length `len` located at address `str`.
|
|
|
|
|
|
|
|
#### `void putstrz(pointer str)`
|
|
|
|
|
|
|
|
Prints a null-terminated string located at address `str`.
|
|
|
|
If the string is longer than 255 bytes, then the behaviour is undefined (might even crash).
|
|
|
|
|
|
|
|
|
2018-12-19 18:01:53 +00:00
|
|
|
## err
|
2018-07-12 16:30:35 +00:00
|
|
|
|
2018-12-19 18:01:53 +00:00
|
|
|
#### `enum error_number`
|
|
|
|
|
|
|
|
Standard error codes. All codes other than `err_ok` suggest that the last operation failed.
|
|
|
|
|
|
|
|
#### `error_number errno`
|
|
|
|
|
|
|
|
The result of the last operation.
|