2018-02-02 23:37:19 +00:00
|
|
|
/***********************************************
|
|
|
|
* TESTIOX - Test Library stdiox.h for py65mon *
|
|
|
|
***********************************************/
|
|
|
|
|
|
|
|
#include <py65.h02>
|
2018-07-27 18:11:39 +00:00
|
|
|
#include <stddef.h02>
|
2018-02-02 23:37:19 +00:00
|
|
|
#include <stdlib.h02>
|
|
|
|
#include <stdio.h02>
|
|
|
|
#include <stdiox.h02>
|
|
|
|
|
2018-07-30 00:40:31 +00:00
|
|
|
char c, i, j;
|
2018-07-19 04:27:50 +00:00
|
|
|
char s = "string";
|
2018-02-02 23:37:19 +00:00
|
|
|
|
|
|
|
main:
|
|
|
|
|
2018-07-27 18:11:39 +00:00
|
|
|
getcpr("Press any key to begin...");
|
|
|
|
|
2018-02-02 23:37:19 +00:00
|
|
|
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();
|
|
|
|
|
2018-07-30 00:40:31 +00:00
|
|
|
putln("prthex()");
|
2018-02-02 23:37:19 +00:00
|
|
|
do {
|
2018-07-30 00:40:31 +00:00
|
|
|
puthex(i);
|
|
|
|
putc(':');
|
2018-02-02 23:37:19 +00:00
|
|
|
i++;
|
2018-07-30 00:40:31 +00:00
|
|
|
if (!i&15) 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(); }
|
2018-02-02 23:37:19 +00:00
|
|
|
} while (i<128);
|
|
|
|
|
2018-07-19 04:27:50 +00:00
|
|
|
setdst(&s);
|
|
|
|
printf("S=\"%s\"");
|
|
|
|
newlin();
|
|
|
|
|
2018-07-30 00:40:31 +00:00
|
|
|
setdst(&$1234);
|
|
|
|
printf("&$1234=%w");
|
|
|
|
newlin();
|
|
|
|
|
2018-02-02 23:37:19 +00:00
|
|
|
done:
|
|
|
|
goto exit;
|
2018-07-30 00:40:31 +00:00
|
|
|
|
|
|
|
void pfchar(c) {
|
|
|
|
if (c<32) printf(c," H='%h' R='%r' L='%l' D='%d'");
|
|
|
|
else printf(c,"C='%c' H='%h' R='%r' L='%l' D='%d'");
|
|
|
|
}
|
|
|
|
|