Skip to content

BASIC IN Function

Mike Hogsett edited this page Aug 24, 2024 · 6 revisions

IN

TYPE: USB BASIC system function


FORMAT: IN ( port )

Action: Reads a byte from the I/O port specified by port.

  • port is an expression that reduces to an integer value in the range 0 to 255.

Examples of IN:

PRINT IN(252)

Prints cassette port input status

S=IN(254)

Sets variable S to Printer Ready status


FORMAT: IN ( address )

Action: Reads a byte from the I/O port specified by the least significant byte of address.

  • address is an expression that reduces to an integer value in the range -32768 to 32767.
  • Advanced: During the read, address is put on the Z80 address bus.

plusBASIC enhancement

  • address can be an integer value in the range -65535 and 65535 ($0000 to $FFFF).
Clone this wiki locally