any Assembly Language gurus out there?

alfhead

Senior member
Jan 22, 2001
216
0
0
I've got an assignment coming up that involves a small portion of 80x86 assembly language programming. I've got a couple of questions:

1.) how do you specifiy a null character? my code needs to count the length of a string by comparing each letter to a null, and stopping the counting when the null character is reached.

2.) is the CMP operator proper to use when comparing a loaded register with the null character?
 

CSoup

Senior member
Jan 9, 2002
565
0
0
Null character is specified by the value 0 (zero).
Yes, you can use CMP or TEST.