well, i dont really understand , this is supposed to work! by the loops seem to not be working!
i expect the out put as when command name ptr is INX, it should skip the offset and MIX stat ptr initialization! and just print the INX retrived binary!Code:void CLA::machinLanguageConvertor() { string temp = commandnameptr; int argument = 0; if ( commandnameptr != "not needed" ) { argument = Atoi(offsetptr); offsetptr = Oct2Bin( argument ); if ( (temp != "INX") || (temp != "LAX" ) || (temp != "LDA")|| (temp != "DEX") || (temp != "CLX" ) ) { CommandsBinaryString = BinaryDetector( commandnameptr ); CommandsBinaryString.append(mixstateptr); CommandsBinaryString.append(offsetptr); } } else { CommandsBinaryString = commandnameptr; } cout<<"\nBinary Instruction = "<<CommandsBinaryString; }
but when it comes to INX, it adds the offset to the end of the string , meaning it runs
which it should skip! what is wrong ?Code:Code:if ( (temp != "INX") || (temp != "LAX" ) || (temp != "LDA")|| (temp != "DEX") || (temp != "CLX" ) ) { CommandsBinaryString = BinaryDetector( commandnameptr ); CommandsBinaryString.append(mixstateptr); CommandsBinaryString.append(offsetptr); } }
and i think it doesnt even run the first if statement! (it sikps it!)


