Skip to content

Commit

Permalink
Organizing input files
Browse files Browse the repository at this point in the history
  • Loading branch information
faizal3199 committed Apr 1, 2018
1 parent 1ec173f commit e66018e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 149 deletions.
4 changes: 0 additions & 4 deletions error_test_input.txt

This file was deleted.

61 changes: 0 additions & 61 deletions intermediate_test_input.txt

This file was deleted.

61 changes: 0 additions & 61 deletions listing_test_input.txt

This file was deleted.

9 changes: 0 additions & 9 deletions object_test_input.txt

This file was deleted.

7 changes: 4 additions & 3 deletions pass1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ void pass1(){
valueString += valueTemp;

singleOperator= "";
while(i<operand.length()-1&&(lastByte=='+'||lastByte=='-'||lastByte=='/'||lastByte=='*')){
while(i<operand.length()&&(lastByte=='+'||lastByte=='-'||lastByte=='/'||lastByte=='*')){
singleOperator += lastByte;
lastByte = operand[++i];
}
Expand All @@ -339,9 +339,9 @@ void pass1(){
else{
lastOperator = 0;
}
}

valueString += singleOperator;
valueString += singleOperator;
}

if(!Illegal){
if(pairCount==1){
Expand All @@ -353,6 +353,7 @@ void pass1(){
else if(pairCount==0){
/*absolute*/
relative = 0;
cout<<valueString<<endl;
EvaluateString tempOBJ(valueString);
tempOperand = intToStringHex(tempOBJ.getResult());
}
Expand Down
22 changes: 11 additions & 11 deletions test_input.txt → test_inputs/input.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ CLOOP JSUB RDREC Comment here
JSUB WRREC Comment here
J CLOOP Comment here
ENDFIL LDA =C'EOF' Comment here
STA BUFFER Comment here
STA BUFFER Comment here
LDA #3 Comment here
STA LENGTH Comment here
JSUB WRREC Comment here
J @RETADR Comment here
USE CDATA
USE CDATA
RETADR RESW 1 Comment here
LENGTH RESW 1 Comment here
USE CBLKS
USE CBLKS
BUFFER RESB 4096 Comment here
BUFEND EQU * Comment here to test * literal
MAXLEN EQU BUFEND-BUFFER
BUFEND EQU * Comment here to test * literal
MAXLEN EQU BUFEND-BUFFER
.
. RDREC SUBROUTINE
.
USE DEFAULT
USE DEFAULT
RDREC CLEAR X Comment here
CLEAR A Comment here
CLEAR S Comment here
Expand All @@ -37,13 +37,13 @@ RLOOP TD INPUT Comment here
TIXR T Comment here
JLT RLOOP Comment here
EXIT STX LENGTH Comment here
RSUB Comment here
USE CDATA
RSUB Comment here
USE CDATA
INPUT BYTE X'F1' Comment here
.
. WRREC SUBROUTINE
.
USE DEFAULT
USE DEFAULT
WRREC CLEAR X Comment here
LDT LENGTH Comment here
WLOOP TD =X'05' Comment here
Expand All @@ -52,7 +52,7 @@ WLOOP TD =X'05' Comment here
WD =X'05' Comment here
TIXR T Comment here
JLT WLOOP Comment here
RSUB Comment here
USE CDATA
RSUB Comment here
USE CDATA
LTORG
END FIRST Comment here

0 comments on commit e66018e

Please sign in to comment.