Logo 
Search:

Assembly Language Answers

Ask Question   UnAnswered
Home » Forum » Assembly Language       RSS Feeds
  Question Asked By: Quah Jerry   on May 23 In Assembly Language Category.

  
Question Answered By: Abhishek Singh   on May 23



down vote
accepted you'd need to dereference the pointer to get the actual character:

mov eax, OFFSET operandA+1
mov cl,byte ptr [eax]
cmp cl,'!'
or

mov eax, OFFSET operandA
mov cl,byte ptr [eax + 1]
cmp cl,'!'
this preserves eax so you can compare the second char using:

inc eax
mov cl,byte ptr [eax]
cmp cl,'?'
or

mov cl,byte ptr [eax + 2]
cmp cl,'?'

Share: 

 
 
Didn't find what you were looking for? Find more on accept sting and display second character of string Or get search suggestion and latest updates.


Tagged: