mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-19 12:32:08 +00:00
35377b5807
commit ed00e1d1b5a9783a72dade3f3676b161a9cfe287 Author: Curtis F Kaylor <revcurtis@gmail.com> Date: Sun Sep 9 22:20:49 2018 -0400 Documented joystk, paddle, and lgtpen modules commit ec0a5ede8d1b043fcf0094ea653255a808dbf8d3 Author: Curtis F Kaylor <revcurtis@gmail.com> Date: Sun Sep 9 20:31:11 2018 -0400 Added joystick, paddle, and lightpen test programs commit 7b787f432e2f4f7ae5d7f0053ade1d3586a4fad1 Author: Curtis F Kaylor <revcurtis@gmail.com> Date: Sun Sep 9 20:30:03 2018 -0400 Updated Apple II and VIC-20 Batch Files commit 50568294349d7e3c6b7d0d364aeaece73c9e4ab6 Author: Curtis F Kaylor <revcurtis@gmail.com> Date: Sun Sep 9 20:28:09 2018 -0400 Separated light pen code into separate files commit d45e59f73d55eef1d30c591d19a043ad79cfd81a Author: Curtis F Kaylor <revcurtis@gmail.com> Date: Sun Sep 9 19:28:56 2018 -0400 Moved code for paddles into separate include files commit fc5c5472d758c960332ea14105d5ec4a7c8cbbfb Author: Curtis F Kaylor <revcurtis@gmail.com> Date: Sun Sep 9 16:15:32 2018 -0400 Added system specific module 'joystk'
38 lines
681 B
Plaintext
38 lines
681 B
Plaintext
/************************************
|
|
* PADDLES - Test paddle() function *
|
|
************************************/
|
|
|
|
//use -h option on command line
|
|
#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;
|