1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-29 16:51:10 +00:00
C02/test/paddles.c02
2018-09-17 11:34:26 -04:00

38 lines
704 B
Plaintext

/************************************
* PADDLES - Test paddle() function *
************************************/
//use -h option on command line
#include <screen.h02>
#include <paddle.h02>
char i,b,p;
main:
clrscr();
if (!#PADDLS|#BUTTNS) goto exit;
for (i=0;i<#PADDLS;i++) {
setpos(1,i);
putchr('P'); prhex(i); putchr(':');
}
for (i=0;i<#BUTTNS;i++) {
setpos(7,i);
putchr('B'); prhex(i); putchr(':');
}
loop:
if (getkey() == #ESCKEY) goto exit;
for (i=0;i<#PADDLS;i++) {
p = paddle(i);
setpos(4,i);
prbyte(p);
}
for (i=0;i<#BUTTNS;i++) {
b = button(i);
setpos(10,i);
prbyte(b);
}
goto loop;