23 Console I O
David Schmenk edited this page 2018-05-15 15:07:13 -07:00

A basic library for interacting with the console. Beyond the put* and get* functions from the System Library, there are routines to clear the screen, position the cursor, even draw LoRes Graphics on II and /// machines.

Compatibility: 1*, II, ///

* Apple 1 doesn't support cursor addressing or lo-res graphics

Usage: include "inc/conio.plh"

Values:

const NORMAL   = $FF
const INVERSE  = $3F
const FLASH    = $7F
const ECHO_ON  = $80
const ECHO_OFF = $00

API:

conio:keypressed()
conio:getkey()
conio:echo(state)
conio:home()
conio:gotoxy(x, y)
conio:viewport(left, top, width, height)
conio:texttype(type)
conio:textmode(columns)
conio:grmode(mix)
conio:grcolor(color)
conio:grplot(x, y)
conio:tone(duration, freq)
conio:rnd()

Source Code: conio.pla

Sample Source: rpncalc.pla