mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-30 23:50:04 +00:00
96 lines
1.3 KiB
Plaintext
96 lines
1.3 KiB
Plaintext
/***********************************************
|
|
* TESTIOX - Test Library stdiox.h for py65mon *
|
|
***********************************************/
|
|
|
|
#include <py65.h02>
|
|
#include <stddef.h02>
|
|
#include <stdlib.h02>
|
|
#include <stdio.h02>
|
|
#include <stdiox.h02>
|
|
|
|
char c, i, j;
|
|
const char s = "string";
|
|
|
|
main:
|
|
|
|
getcpr("Press any key to begin...");
|
|
|
|
i = 0;
|
|
|
|
putln("prtdec()");
|
|
do {
|
|
putdec(i);
|
|
putc(':');
|
|
i++;
|
|
if (!i&15) newlin();
|
|
} while (i);
|
|
anykey();
|
|
|
|
putln("prtdel()");
|
|
do {
|
|
putdel(i);
|
|
putc(':');
|
|
i++;
|
|
if (!i&15) newlin();
|
|
} while (i);
|
|
anykey();
|
|
|
|
putln("prtder()");
|
|
do {
|
|
putder(i);
|
|
putc(':');
|
|
i++;
|
|
if (!i&15) newlin();
|
|
} while (i);
|
|
anykey();
|
|
|
|
putln("prthex()");
|
|
do {
|
|
puthex(i);
|
|
putc(':');
|
|
i++;
|
|
if (!i&15) newlin();
|
|
} while (i);
|
|
anykey();
|
|
|
|
putln("prtbin()");
|
|
do {
|
|
putbin(i);
|
|
putc(':');
|
|
i++;
|
|
if (!i&7) newlin();
|
|
} while (i);
|
|
anykey();
|
|
|
|
putln("prtwrd()");
|
|
do {
|
|
j = i ^ $FF;
|
|
putwrd(*,i,j);
|
|
putc(':');
|
|
i++;
|
|
if (!i&15) newlin();
|
|
} while (i);
|
|
anykey();
|
|
|
|
do {
|
|
pfchar(i); putc($09); pfchar(i+16); newlin();
|
|
i++; if (!i&15) {i = i + 16; anykey(); }
|
|
} while (i<128);
|
|
|
|
setdst(&s);
|
|
printf("S=\"%s\"");
|
|
newlin();
|
|
|
|
setdst(&$1234);
|
|
printf("&$1234=%w");
|
|
newlin();
|
|
|
|
done:
|
|
goto exit;
|
|
|
|
void pfchar(c) {
|
|
if (c<32) printf(c," B='%b' H='%h' R='%r' L='%l' D='%d'");
|
|
else printf(c,"C='%c' B= '%b' H='%h' R='%r' L='%l' D='%d'");
|
|
}
|
|
|