INP¶
Implementation Note¶
⚠️ Not Implemented: This feature requires direct hardware I/O port access and is not implemented in this Python-based interpreter.
Behavior: Always returns 0
Why: Cannot access hardware I/O ports from a Python interpreter. This function is specific to systems with memory-mapped I/O or port-based hardware interfaces.
Alternative: There is no modern equivalent for hardware port I/O. For memory access, use PEEK, though note it also returns emulated values.
Historical Reference: The documentation below is preserved from the original MBASIC 5.21 manual for historical reference.
Syntax¶
Description¶
Returns the byte read from port I. I must be in the range 0 to 255. INP is the complementary function to the OUT statement.
Example¶
See Also¶
- FRE - Arguments to FRE are dummy arguments
- HELP SET - Display help for a specific setting
- INKEY$ - Returns either a one-character string containing a character read from the terminal or a null string if no character is pending at the terminal
- LIMITS - Display resource usage and interpreter limits
- NULL - To set the number of nulls to be printed at the end of each line
- PEEK - Returns the byte (decimal integer in the range 0 to 255) read from memory location I
- RANDOMIZE - To reseed the random number generator
- REM - To allow explanatory remarks to be inserted in a program
- SET (setting) - Configure interpreter settings at runtime
- SHOW SETTINGS - Display current interpreter settings
- TRON/TROFF - To trace the execution of program statements
- USR - Calls the user's assembly language subroutine with the argument X
- VARPTR - Returns the memory address of a variable
- WIDTH - To set the printed line width in number of characters for the terminal or line printer