WikiPendium

(beta)

Bcostat()

WikiPendium :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ec2-3-145-60-29.us-east-2.compute.amazonaws.com

Bcostat()

(Bios Console Output STATus)

LONG Bcostat( dev )

WORD dev;

Bcostat() queries a device to know if it is ready to receive a character.

Opcode

8 (0x08)

Availability

All TOS versions.

Parameters

dev is the device to read a character from:

Name dev Device
DEV_PRINTER 0 Parallel port
DEV_AUX 1 Serial port (or the one mapped with Bconmap?())
DEV_CONSOLE 2 Keyboard
DEV_IKBD_BCOSTAT 3 IKBD controller (not usable as input device)
DEV_MIDI_BCOSTAT 4 MIDI port
DEV_RAW 5 Raw keyboard
Other devices 6 and higher Extra character devices (mostly provided through Bconmap?())

Binding

	move.w	#dev,-(sp)
	move.w	#$08,-(sp)
	trap	#13
	addq.l	#4,sp


Return Value

The LONG value contains 0 if the device is ready to receive a character, and -1 otherwise.

Caveats

There is a bug in this function since TOS 1.0, so the bug has been kept for compatibily. Devices IKBD (4) and MIDI (3) have their number swapped for this function. So for this function only, IKBD device is number 3, and MIDI device is number 4.

See Also

Bconout(), Cauxos(), Cconos(), Cprnos()

Il n'y a pas de commentaire sur cette page. [Afficher commentaires/formulaire]