uart: swap status with config half word
[calu.git] / 3b_sim / sim.cpp
index 349c41a471ed70459b0d7f324b8f1110843cb6e7..d628d10a1cff46ec1cd740a4a1bb0081eb037839 100644 (file)
@@ -20,8 +20,8 @@
 #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;
@@ -76,9 +76,11 @@ vector<CDat> breakpoints;
 
 bool ignoreBreak = false;
 
+bool exitProg = false;
+
 void doExit(const vector<string>&)
 {
-       exit(EXIT_SUCCESS);
+       exitProg = true;
 }
 
 unsigned int convertStringToNum(const std::string& in)
@@ -632,7 +634,7 @@ int main(int argc, char* argv[])
        Func lastFunc = NULL;
 
 
-       while(1) {
+       while(!exitProg) {
                UserInput = Reader.GetLine("> ", Tokens, EndOfInput);
                if(EndOfInput) {
                        break;