1
0
mirror of https://github.com/mist64/perfect6502.git synced 2024-12-28 11:31:50 +00:00
perfect6502/cbmbasic.c

26 lines
374 B
C
Raw Normal View History

2010-10-06 16:53:40 +00:00
#include "perfect6502.h"
#include "runtime.h"
#include "runtime_init.h"
2010-10-07 00:28:02 +00:00
2010-10-06 16:53:40 +00:00
int
main()
{
int clk = 0;
void *state = initAndResetChip();
2010-10-06 16:53:40 +00:00
/* set up memory for user program */
init_monitor();
/* emulate the 6502! */
for (;;) {
step(state);
2010-10-06 16:53:40 +00:00
clk = !clk;
if (clk)
handle_monitor(state);
2010-10-06 16:53:40 +00:00
// chipStatus(state);
2010-10-06 16:53:40 +00:00
//if (!(cycle % 1000)) printf("%d\n", cycle);
};
}