1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-26 10:20:51 +00:00

Standard library improvements

This commit is contained in:
Karol Stasiak
2018-12-19 19:01:53 +01:00
parent 30d18fba01
commit 05884f2c7b
17 changed files with 236 additions and 68 deletions
+9 -5
View File
@@ -2,7 +2,7 @@
## stdio
The `stdio` module automatically imports the `string` module.
The `stdio` module automatically imports the `string` and `err` modules.
It requires an implementation of `void putchar(byte a)` and therefore works only on targets with console output.
#### `void putstr(pointer str, byte len)`
@@ -14,9 +14,13 @@ Prints a string of length `len` located at address `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).
## string
#### `byte strzlen(pointer str)`
## err
Calculates the length of a null-terminated string.
If the string is longer than 255 bytes, then the behaviour is undefined (might even crash).
#### `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.