There are different variables for buttons. Up-1 Down-2 Left-4 Right-8 A-16 B-32 X-64 Y-128 L-256 R-512. For example,
@BUTTON
IF BUTTON()==16 THEN GOTO @A
GOTO @BUTTON
@A
PRINT "YOU PRESSED A!"
the BUTTON() function returns the status of the hardware buttons
There are also contants set for this, so you can od it like Mike posted above
#UP &H0001
#DOWN &H0002
#LEFT &H0004
#RIGHT &H0008
#A &H0010
#B &H0020
#X &H0040
#Y &H0080
#L &H0100
#R &H0200
#ZL &H0800
#ZR &H1000