1
0
mirror of https://github.com/mist64/perfect6502.git synced 2024-06-02 17:41:32 +00:00
perfect6502/cbmbasic/cbmbasic.c
Michael Steil 3e60b6dd44 cleanup: moved cbmbasic and apple1basic demos into subdirectories
* also changed "clang" to "cc"
* enabled optimizations for 64 bit (it's 10 years later!)
* updated README to reflect CPU speed in 2020 (5x faster than 2014!)
* added benchmarking instructions to README
2020-06-04 19:32:59 +02:00

26 lines
377 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);
};
}