I have this C++ code I'm trying to replicate in Assembly (68K):
int main()
{
int i=0;
char *string = "This is a string"
while(string[i]!=' ')
{
/.../
i++;
}
return 0;
}
I'm stuck on the string[i]!=0, indexing part of assembly. I need to CMP.B with a letter string[i] with some ' ' in memory. I tried CMP.B [STRING, D3],D5 with STRING being the string stored as a variable, D3 being the current index as a number stored in a register and D5 being the empty space I'm comparing it with in a register,