Skip to content

Instantly share code, notes, and snippets.

@terakun
Last active August 29, 2015 13:57
Show Gist options
  • Save terakun/9529180 to your computer and use it in GitHub Desktop.
Save terakun/9529180 to your computer and use it in GitHub Desktop.
#define LEFT 1
#define RIGHT 2
main(){
FILE *pio;
int input=0,x=72,y=26;
pio=fopen("pio","a+");
if(pio==NULL) abort();
pioset(LEFT&RIGHT);
line(0,27,143,47,0,0xffff,2);
for(;;){
input=pioget();
gcursor(x,y);
gprint(0);
if(input&LEFT){
x--;
}
if(input&RIGHT){
x++;
}
gcursor(x,y);
gprint("0010D63939D61000");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment