apple2a/main.c

25 lines
517 B
C
Raw Normal View History

2018-07-28 05:30:44 +00:00
char *title = "Apple IIa";
unsigned char title_length = 9;
2018-07-28 19:12:40 +00:00
volatile unsigned char *text_page1_base = (unsigned char *)0x400;
volatile unsigned char *text_page2_base = (unsigned char *)0x800;
2018-07-28 05:30:44 +00:00
int main(void)
{
2018-07-28 19:12:40 +00:00
int offset = (40 - title_length) / 2;
2018-07-28 05:30:44 +00:00
2018-07-28 19:12:40 +00:00
volatile unsigned char *loc = text_page1_base + offset;
2018-07-28 05:30:44 +00:00
int i;
2018-07-28 19:12:40 +00:00
for(i = 0; i < (40 + 40 + 65) * 8; i++) {
2018-07-28 05:30:44 +00:00
text_page1_base[i] = ' ' | 0x80;
2018-07-28 19:12:40 +00:00
}
2018-07-28 05:30:44 +00:00
2018-07-28 19:12:40 +00:00
for(i = 0; i < title_length; i++) {
2018-07-28 05:30:44 +00:00
loc[i] = title[i] | 0x80;
2018-07-28 19:12:40 +00:00
}
2018-07-28 05:30:44 +00:00
while(1);
}