DEF SELECT_Y_N()
VAR B,V,Y
COLOR ,0
FOR Y=23 TO 28
LOCATE 41,Y:?CHR$(0)*2;
NEXT
COLOR #TBLACK,#TWHITE
LOCATE 45,24:?"はい"
LOCATE 45,CSRY:?"いいえ"
REPEAT
VSYNC
B=BUTTON(2)
IF B AND 3 THEN LOCATE 44,24+V?CHR$(0):V=!V
LOCATE 44,24+V?CHR$(57867*(1AND MAINCNT/24))
UNTIL B AND 48
V=!V*(B<32)
COLOR #TGRAY
LOCATE 44,24+V:?CHR$(0)
LOCATE 44,25-V:?"→"
BEEP 4-V
RETURN V
END
これは「RPGではい・いいえ」を選ぶプログラムの例