msx_get_trigger.asm
bitfixer_bitfixer/dg/z88dk/libsrc/msx/msx_get_trigger.asm
;
;	MSX specific routines
;
;	GFX - a small graphics library 
;	Copyright (C) 2004  Rafael de Oliveira Jannone
;
;	extern bool __FASTCALL__ msx_get_trigger(unsigned char id);
;
;	get state of joystick button (trigger) number \a id, true = pressed
;
;	$Id: msx_get_trigger.asm,v 1.6 2015/01/19 01:32:57 pauloscustodio Exp $
;


	PUBLIC	msx_get_trigger

	EXTERN	msxbios

IF FORmsx
        INCLUDE "msxbios.def"
ELSE
        INCLUDE "svibios.def"
ENDIF


msx_get_trigger:

	; __FASTCALL__ : stick id is already in L
	ld	a,l
	ld	ix,GTTRIG
	call	msxbios
	
	ld	h,0
	ld	l,a
	
	ret

