Skip navigation

One thing that makes MSX great is BASIC, the programming language that is accessible for all. To promote MSX-BASIC we are going to post some minis. Small parts of basic code that can be handy for making games or tools.

Most can be found in the many books written about MSX-BASIC, but sometimes it is easier to see a example.

 

The first will be about how to use mouse input.

 

10 SCREEN 7: DEFINT A-Z

20 X=255: Y=107: PSET (X,Y),0

30 IF PAD(12)=0 THEN GOTO 30

40 X=X+PAD(13)

50 Y=Y+PAD(14)

60 IF STRIG(1) THEN P=8 ELSE IF STRIG(3) THEN P=12 ELSE P=14

70 LINE -(X,Y),P,B

80 GOTO 30