Classic Computer Magazine Archive COMPUTE! ISSUE 95 / APRIL 1988 / PAGE 43

Catching Bits In BASIC

I own an Atari 1040ST. I would like to know how to accept data bits through the parallel bus using GFA BASIC or assembly language. Are there certain POKEs that I can do for this?

Gregory A. Macey

It's quite easy to do this in GFA BASIC. Here's a short program that reads a byte from the keyboard and displays it on the screen. Any other input device can be read in the same way; just change the device number as indicated.

device = 2
' device = 0 Printer Port
' device = 1 Serial Port (RS-232)
' device = 2 Keyboard
' device = 3 Midi
  IF INP?(device) THEN
    a = INP (device)
    PRINT CHR$(a);