Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <oscalls.h>
- #include <stdlib.h>
- #include <intrz80.h>
- unsigned char iovalue = 0;
- unsigned char scrredraw(void){
- puts("\r\nTest AY IO ports");
- printf("Current values 0x%02X",iovalue);
- return 0;
- }
- void initMCU(void){
- YIELD();
- OS_SETGFX(6);
- puts("\r\nTest AY IO ports");
- }
- #define wr_ay_reg(r, v) output(0xfffd,(r));\
- output(0xbffd,(v))
- void main (int argc, char *argv[])
- {
- wr_ay_reg(7, 0xc0);
- while(1){
- wr_ay_reg(16, iovalue);
- wr_ay_reg(17, iovalue);
- printf("\rCurrent values 0x%02X",iovalue);
- getchar();
- iovalue ^= 0xff;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment