WikiPendium

(beta)

Cnecin()

WikiPendium :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ec2-3-144-41-22.us-east-2.compute.amazonaws.com
Ceci est une version archivée de Cnecin() à 2006-02-16 01:07:41.

Cnecin()


LONG Cnecin( VOID )


Cnecin() is exactly the same as Cconin() except that the character fetched from the input stream is not echoed.

Special system keys like Control-C are processed (see Cconrs() for a full list of special keys); this means that when Cnecin() receives a Control-C key, it terminates the calling process with Pterm()StabyloRmv: is it Pterm() or Pterm0() that is called? This should be investigated.
If this behaviour is not what you expect, which is the case in most programs, then we strongly recommend that you use Crawcin() instead.

Opcode

8 (0x08)

Availability

All GEMDOS versions.

Binding

	move.w	#8,-(sp)
	trap	#1
	addq.l	#2,sp


Return Value

The LONG value returned is a bit array arranged as follows:

Bits 31-24 Bits 23-16 Bits 15-8 Bits 7-0
Shift key status(see below) Keyboard scancode Unused (0) ASCII code of character

The ASCII code of the character will be 0 if a non-ascii keyboard key is struck.

When using this function while its handle is redirected, MiNT returns MINT_EOF (0xFF1A) when the end-of-file is reached.

Caveats

When using this function while its handle is redirected, an end-of-file condition will hang the system. GEMDOS version 0.30 and all MiNT versions correct this bug.

When Cnecin() receives a Control-C key, it terminates the calling process. This most of the time is not something you want to happen, especially if your program has to fix some hardware settings (like video or audio) before exiting.

Comments

The shift key status will only be returned when bit 3 of the system variable conterm (char *(0x484)) is set. This is normally not enabled.

If the handle has been redirected, the inputted character will appear in the lower 8 bits of the return value.

See Also

Crawcin(), Cconin(), Bconin(), Cconrs()

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