I am trying to read a section of memory, byte by byte, starting from the memory address stored in the EAX register. I push the current byte to the EBX register. However, when I execute the following line of code (advanced indexing mode):
movb byteCount(%eax), %ebx
I get the following error:
Program received signal SIGSEGV, Segmentation fault.
It seems that Assembly doesn't supporting using a label in advanced indexing. How would I go about emulating this same action without using a label or register before (%eax)? Below is the data section:
.data
str:
.string "abcdefg"
byteCount:
.int 1