Merge branch 'master' of ssh://svjatoslav.eu:10006/home/n0/git/qbasicapps
[qbasicapps.git] / misc / lightpen.bas
diff --git a/misc/lightpen.bas b/misc/lightpen.bas
new file mode 100644 (file)
index 0000000..8575f9f
--- /dev/null
@@ -0,0 +1,23 @@
+' Svjatoslav Agejenko 2003.03\r
+' light pen test\r
+\r
+\r
+DEFINT A-Z\r
+CLS\r
+SCREEN 13\r
+\r
+prt = &H378\r
+prt2 = &H379\r
+\r
+OUT prt, 255\r
+\r
+\r
+1\r
+a = INP(prt2)\r
+IF a = 135 THEN\r
+  LINE (180, 0)-(200, 199), 1, BF\r
+ELSE\r
+  LINE (180, 0)-(200, 199), 15, BF\r
+END IF\r
+GOTO 1\r
+\r