mirror of https://github.com/wwarthen/RomWBW.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
768 B
43 lines
768 B
/* putc.c 11/21/2012 dwg - output a test character to the TMS9918 */
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <diagnose.h>
|
|
#include <n8chars.h>
|
|
#include <memory.h>
|
|
|
|
copyup()
|
|
{
|
|
unsigned char * p;
|
|
int ascii;
|
|
int byte;
|
|
|
|
p = 0x8000;
|
|
for(ascii=0;ascii<256;ascii++) {
|
|
for(byte=0;byte<8;byte++) {
|
|
*p++ = charset[(ascii*8)+7-byte];
|
|
}
|
|
}
|
|
}
|
|
|
|
main()
|
|
{
|
|
int index;
|
|
|
|
copyup();
|
|
hregbc = 0x4040;
|
|
hregde = 0;
|
|
hreghl = 0x8000;
|
|
diagnose();
|
|
|
|
hregbc = 0x4440;
|
|
hregde = (12<<8)+12;
|
|
diagnose();
|
|
|
|
for(index=0;index<600;index++) {
|
|
hregbc = 0x4740;
|
|
hregde = '?';
|
|
diagnose();
|
|
}
|
|
}
|
|
|