The EsoAPI is designed to extend the functionality of esoteric languages through use of special output escape sequences. These allow the use of previously unsupported hardware and devices, such as disk I/O.
EsoAPI 1.0 calls replace the normal output functions. To perform an EsoAPI operation, write the necessary NUL escape character and function call bytes to the output stream. Some function calls may return a status value in the current memory cell. Any other data will start in the cell following the current memory cell. This should be implemented in a way consistent with the language.
EsoAPI has been included as part of the PESOIX specification, which is able to accomodate multiple API specifications.
API Call | Description |
01h - FFh | OUTPUT character. Prints the character to the screen. |
00h 00h | OUTPUT 00h. Prints the NUL character to the screen. |
00h 01h | NEXT SECTOR. Selects the next disk sector for I/O operations. |
00h 02h | PREVIOUS SECTOR. Selects the preceeding disk sector for I/O operations. |
00h 03h | READ SECTOR. Reads the currently selected disk sector into memory. The sector data starts after the current cell. |
00h 04h | WRITE SECTOR. Writes the currently selected disk sector from memory. The sector data starts after the current cell. |
00h 05h | RESET SECTOR POSITION. Selects the first disk sector for I/O operations. |
00h 08h | INSTALLATION CHECK. Returns a result code of 0. |