Hi, i am trying to write a short piece of protected mode code in nasm, that will display the ascii chars of the first few bytes at location es:bx. However i am aware that in protected mode, it is not considered as es:bx but as es:ebx. Question is, how do you increment the (e)bx register, i.e. add 1 to it?
Adding one to a 32-bit register is not a concern of protected-mode programming. I think you are missing some understanding of the differences between real and protected mode.
To answer your last question:
- or -
Not much different than 16-bit coding...
To answer your last question:
inc ebx
- or -
add ebx, 1
Not much different than 16-bit coding...
Or even:
But... the "es:" override is not often used in PMODE. What PMODE environment are you trying to work in? "Homemade"? Linux? Windows? It might make a difference...
Best,
Frank
lea ebx,
But... the "es:" override is not often used in PMODE. What PMODE environment are you trying to work in? "Homemade"? Linux? Windows? It might make a difference...
Best,
Frank