use 40 columns for screen

This commit is contained in:
Brad Grantham 2018-07-28 12:12:40 -07:00
parent d30e8778d5
commit fadcda8050

13
main.c
View File

@ -1,21 +1,24 @@
char *title = "Apple IIa";
unsigned char title_length = 9;
unsigned char *text_page1_base = (unsigned char *)0x400;
volatile unsigned char *text_page1_base = (unsigned char *)0x400;
volatile unsigned char *text_page2_base = (unsigned char *)0x800;
int main(void)
{
int offset = (80 - title_length) / 2;
int offset = (40 - title_length) / 2;
unsigned char *loc = text_page1_base + offset;
volatile unsigned char *loc = text_page1_base + offset;
int i;
for(i = 0; i < 80 * 24; i++)
for(i = 0; i < (40 + 40 + 65) * 8; i++) {
text_page1_base[i] = ' ' | 0x80;
}
for(i = 0; i < title_length; i++)
for(i = 0; i < title_length; i++) {
loc[i] = title[i] | 0x80;
}
while(1);
}