![]() |
c128lib Base
Base macros for C128
|
Io module. More...
Functions | |
macro | c128lib_OpenIOChannel (filenumber, devicenumber, secondary) |
Opens an I/O channel. | |
macro | c128lib_SetIOName (length, address) |
Sets the name for I/O operations. | |
macro | c128lib_SetInputChannel (filenumber) |
Sets the input channel. | |
macro | c128lib_SetOutputChannel (filenumber) |
Sets the output channel. | |
macro | c128lib_OpenFile (length, address, filenumber, devicenumber, secondary) |
Opens a file for I/O operations. | |
Io module.
Simple macros for Io.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
macro c128lib_OpenIOChannel | ( | filenumber | , |
devicenumber | , | ||
secondary | ) |
Opens an I/O channel.
This macro opens an I/O channel with the specified file number, device number, and secondary address. It loads the parameters into the appropriate registers and then calls the SETLFS routine in the C128 Kernal.
[in] | filenumber | The file number for the I/O channel. |
[in] | devicenumber | The device number for the I/O channel. |
[in] | secondary | The secondary address for the I/O channel. |
macro c128lib_SetIOName | ( | length | , |
address | ) |
Sets the name for I/O operations.
This macro sets the name for I/O operations. It loads the length of the name and the address of the name into the appropriate registers, then calls the Kernal.JSETNAM routine.
[in] | length | The length of the name. |
[in] | address | The address where the name is stored. |
macro c128lib_SetInputChannel | ( | filenumber | ) |
Sets the input channel.
This macro sets the input channel for subsequent I/O operations. It loads the file number into the X register and then calls the CHKIN routine in the C128 Kernal.
[in] | filenumber | The file number for the input channel. |
macro c128lib_SetOutputChannel | ( | filenumber | ) |
Sets the output channel.
This macro sets the output channel for subsequent I/O operations. It loads the file number into the X register and then calls the Kernal.JCHKOUT routine.
[in] | filenumber | The file number for the output channel. |
macro c128lib_OpenFile | ( | length | , |
address | , | ||
filenumber | , | ||
devicenumber | , | ||
secondary | ) |
Opens a file for I/O operations.
This macro opens a file for I/O operations. It sets the name for I/O operations, opens an I/O channel with the specified file number, device number, and secondary address, calls the OPEN routine in the C128 Kernal, and sets the input channel for subsequent I/O operations.
[in] | length | The length of the name. |
[in] | address | The address where the name is stored. |
[in] | filenumber | The file number for the I/O channel. |
[in] | devicenumber | The device number for the I/O channel. |
[in] | secondary | The secondary address for the I/O channel. |