diff --git a/equi.c b/equi.c index d3dd08c..a494be1 100644 --- a/equi.c +++ b/equi.c @@ -523,12 +523,17 @@ void equi_main_loop() { /* Equi VM entry point */ int main(int argc, char* argv[]) { + uchar instr, bc; + /* CC65-specific terminal init */ +#ifdef __CC65__ + clrscr(); + bc = cursor(1); +#endif /* _attempt_ to disable buffering for char input/output */ #if !defined __CC65__ && !defined __TINYC__ setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); #endif - uchar instr; /* initialize the RAM in the most standard way */ ram.gpd_start = (uchar *)&ram.gpd - (uchar *)&ram.main_stack; ram.cmd_start = (uchar *)&ram.cmdbuf - (uchar *)&ram.main_stack; @@ -537,7 +542,7 @@ int main(int argc, char* argv[]) { /* Start both execution and input buffering from the start of command buffer (-1 because we use prefix increment) */ ram.pc = ram.ibp = 65535U; - printf("Welcome to Equi v" EQUI_VER " by Luxferre, 2022\n\nCLT: 0x%04X (%d bytes)\nGPD: 0x%04X (%d bytes)\nCommand buffer: 0x%04X (%d bytes)\nEqui ready\n\n> ", + printf("\nWelcome to Equi v" EQUI_VER " by Luxferre, 2022\nCLT: 0x%04X (%d bytes)\nGPD: 0x%04X (%d bytes)\nCommand buffer: 0x%04X (%d bytes)\nEqui ready\n\n> ", (unsigned int) ((uchar *)&ram.clt - (uchar *)&ram.main_stack), (unsigned int) ((uchar *)&ram.gpd - (uchar *)&ram.clt), ram.gpd_start,