1
0
mirror of https://github.com/mist64/perfect6502.git synced 2024-06-08 12:29:28 +00:00
perfect6502/cbmbasic.c
Michael Steil c4f7cfb449 The state pointer is no longer global, but passed down to every function.
...and surprisingly, it's not any slower. if anything, it's 1% faster.
2014-12-01 11:00:30 +01:00

26 lines
374 B
C

#include "perfect6502.h"
#include "runtime.h"
#include "runtime_init.h"
int
main()
{
int clk = 0;
void *state = initAndResetChip();
/* set up memory for user program */
init_monitor();
/* emulate the 6502! */
for (;;) {
step(state);
clk = !clk;
if (clk)
handle_monitor(state);
// chipStatus(state);
//if (!(cycle % 1000)) printf("%d\n", cycle);
};
}