mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-24 15:31:17 +00:00
38 lines
704 B
Plaintext
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;
|