Purpose: Get a character
Call address: $FFE4 (hex) 65508 (decimal)
Communication registers:A
Preparatory routines: CHKIN, OPEN
Error returns: See READST
Stack requirements: 7+
Registers affected: A (X, Y)
Description: If the channel is the keyboard, this subroutine removes one character from the keyboard queue and returns it as an ASCII value in the accumulator. If the queue is empty, the value returned in the accumulator will be zero. Characters are put into the queue automatically by an interrupt driven keyboard scan routine which calls the SCNKEY routine. The keyboard buffer can hold up to ten characters. After the buffer is filled, additional characters are ignored until at least one character has been removed from the queue. If the channel is RS-232, then only the A register is used and a single character is returned. See READST to check validity. If the channel is serial, cassette, or screen, call BASIN routine.
How to Use:
EXAMPLE:
;WAIT FOR A CHARACTER WAIT JSR GETIN CMP #0 BEQ WAIT
This page has been created by Sami Rautiainen. | |
Read the small print. | Last updated December 09, 2002. |