//
//  main.c
//  v6502
//
//  Created by Daniel Loffgren on H.25/03/28.
//  Copyright (c) 平成25年 Hello-Channel, LLC. All rights reserved.
//

#include <stdio.h>
#include "cpu.h"
#include "mem.h"

int main(int argc, const char * argv[])
{
	printf("Allocating virtual memory of size 2k…\n");
	
    return 0;
}


//
//  main.c
//  v6502
//
//  Created by Daniel Loffgren on H.25/03/28.
//  Copyright (c) 平成25年 Hello-Channel, LLC. All rights reserved.
//

#include <stdio.h>
#include <string.h>

#include "cpu.h"
#include "mem.h"
#include "core.h"

int main(int argc, const char * argv[])
{
	printf("Creating 1 virtual CPU…\n");
	v6502_cpu *cpu = v6502_createCPU();
	
	printf("Allocating virtual memory of size 2k…\n");
	cpu->memory = v6502_createMemory(2048);
	
	char command[10];
	for (;;) {
		printf("] ");
		scanf("%s", command);
		
		if (!strncmp(command, "!", 2)) {
			v6502_printCpuState(cpu);
		}
	}
	
    return 0;
}


Create a CPU and start REPLing
Create a CPU and start REPLing

git-svn-id: dd14d189f2554b0b3f4c2209a95c13d2029e3fe8@6 96dfbd92-d197-e211-9ca9-00110a534b34
