Skip to content

Commit

Permalink
Fixing error generated due to removing debug lines in pass1 from comm…
Browse files Browse the repository at this point in the history
…it 'Use any file input'
  • Loading branch information
faizal3199 committed Apr 1, 2018
1 parent be4fc36 commit 1ec173f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion listing_test_input.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ Line Address Label OPCODE OPERAND ObjectCode Comment
285 00007 1 LTORG
290 00007 1 * =C'EOF' 454F46
295 0000A 1 * =X'05' 05
300 00066 -1 END FIRST Comment here
300 00066 END FIRST Comment here
4 changes: 4 additions & 0 deletions pass1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ void pass1(){
}
}

valueString += valueTemp;

singleOperator= "";
while(i<operand.length()-1&&(lastByte=='+'||lastByte=='-'||lastByte=='/'||lastByte=='*')){
singleOperator += lastByte;
Expand All @@ -339,6 +341,8 @@ void pass1(){
}
}

valueString += singleOperator;

if(!Illegal){
if(pairCount==1){
/*relative*/
Expand Down

0 comments on commit 1ec173f

Please sign in to comment.