I'm having a bad time figuring out how to print a char from a DB string. So let's say I have
str1 DB "hello"
tmp DB ?
and I want to print the 'e' char.
mov ah, [str1 +1*1]
mov tmp, ah
Invoke StdOut, addr tmp
However, this code prints me nothing. I want to know what I'm doing wrong. Thank you!
You've only got a single byte defined for the address (both in tmp and by using ah). This isn't going to work in Windows (which I'm assuming is your desired platform given the masm32 tag and the Invoke). Address should be 16-bit at a bare minimum, and would be 32 or 64 bit in modern versions of Windows.