what could be wrong with this loop!?
well, i dont really understand , this is supposed to work! by the loops seem to not be working!
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;
}
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!
but when it comes to INX, it adds the offset to the end of the string , meaning it runs
Code:
Code:
if ( (temp != "INX") || (temp != "LAX" ) || (temp != "LDA")|| (temp != "DEX") || (temp != "CLX" ) )
{
CommandsBinaryString = BinaryDetector( commandnameptr );
CommandsBinaryString.append(mixstateptr);
CommandsBinaryString.append(offsetptr);
}
}
which it should skip! what is wrong ?
and i think it doesnt even run the first if statement! (it sikps it!)