diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-03-20 23:20:00 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-03-21 22:49:30 +0100 |
commit | 7c437e1e39f73517b458aa72f9754e165f572969 (patch) | |
tree | 1ed52f6fd8fd87fb70daf2fe6b0b14d7878ee90c /parse.cpp | |
parent | 32c25651f707b13f5f0c27cf807521cf163dcacb (diff) |
Add debugger instruction (int3)
Just compiles to an 'int3' instruction; not a full-featured debugger...
Diffstat (limited to 'parse.cpp')
-rw-r--r-- | parse.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -109,8 +109,8 @@ Team assemble(const string &source){ pargs.push_back(parseArgument(s,labels, {(int)team.banks.size()-1,(int)team.banks.back().size()})); } - if(word1=="jump"||word1=="turn"||word1=="scan")assert(pargs.size()==1); - else if(word1=="die"||word1=="move")assert(pargs.size()==0); + if(word1=="debugger"||word1=="die"||word1=="move")assert(pargs.size()==0); + else if(word1=="jump"||word1=="turn"||word1=="scan")assert(pargs.size()==1); else if(word1=="create")assert(pargs.size()==3); else assert(pargs.size()==2); @@ -127,6 +127,7 @@ Team assemble(const string &source){ else if(word1=="turn")s.push_back(Instruction::make(ins_t::turn,{pargs[0]})); else if(word1=="scan")s.push_back(Instruction::make(ins_t::scan,{pargs[0]})); else if(word1=="create")s.push_back(Instruction::make(ins_t::create,{pargs[0],pargs[1],pargs[2]})); + else if(word1=="debugger")s.push_back(Instruction::make(ins_t::debugger,{})); else assert(false); } } |