Random game
Random game
Random demo
  • Entry name:
     Query Console Keys 
  • Category:
    Programming utilities
  • Publisher/Developer:
    AtariWiki
  • Year:
    1986
  • Code:
    Paul B. Loux
  • Media format:
    Diskette
  • Controllers:
    Joystick
  • Programming language:
    Action!
source: Query Console Keys Query Console Keys Query Console Keys Query Console Keys Query Console Keys Query Console Keys
Listing 1
;************************************
;*											 *
;*(C)Copyright 1986 by Paul B. Loux *
;*											 *
;* These routines are in the public *
;* domain,  and  are not to be sold *
;* for a profit. They may be freely *
;* distributed, provided  that this *
;* header remains in place. Use and *
;* enjoy! PBL, CIS 72337,2073.		*
;*											 *
;************************************
;*											 *
;*  File CONSOL.LIB					  *
;*											 *
;*  Description: three functions	 *
;*	 are provided which test if	 *
;*	 the user is pressing one of	*
;*	 the START, SELECT or OPTION	*
;*	 console buttons.  Returns a	*
;*	 one if pressed, zero if not.  *
;*											 *
;************************************

MODULE

BYTE CONSOL=$D01F

BYTE FUNC Start()
  IF CONSOL&1 THEN RETURN(0) FI
RETURN(1)

BYTE FUNC Select()
  IF CONSOL&2 THEN RETURN(0) FI
RETURN(1)
 
BYTE FUNC Option()
  IF CONSOL&4 THEN RETURN(0) FI
RETURN(1)

;************************************
;
; Example of usage: 

PROC Test6()

BYTE value

DO

IF Start() THEN PRINTE("Start") FI
IF Option() THEN PRINTE("Option") FI
IF Select() THEN PRINTE("Select") FI

OD

RETURN	

This is non-commercial site, its content is based on Atari 8-bit home computer contents and references.
If you feel your rights are violated by showing/using any part of contents of your product represented on this page, please contact me immediatelly so I can remove it!