#include "SReadline/SReadline.h"
using namespace swift;
-#define RAM_END (1000)
-#define PROG_END (1000)
+#define RAM_END (0x3000)
+#define PROG_END (0x3000)
#define REG_COUNT (16)
typedef boost::function<void (const vector<string> &)> Func;
bool ignoreBreak = false;
+bool exitProg = false;
+
void doExit(const vector<string>&)
{
- exit(EXIT_SUCCESS);
+ exitProg = true;
}
unsigned int convertStringToNum(const std::string& in)
cout << i << " : " << std::hex << i << std::dec << " " << data << endl;
}
*/
- cpu.setRegister(1, 4);
+/* cpu.setRegister(1, 4);
cpu.setRegister(2, 0);
cpu.setRAM(0,5);
cpu.setRAM(4,0x66334455);
cpu.setRAM(8,32);
cpu.setRAM(12,45);
-
+*/
// following: job of the bootloader
//set stackpointer
cpu.setStack(500);
Func lastFunc = NULL;
- while(1) {
+ while(!exitProg) {
UserInput = Reader.GetLine("> ", Tokens, EndOfInput);
if(EndOfInput) {
break;