It means move the "contents" of this address into the register (instead of the value of the address itself).
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
Yes, better said: Value vs. Address
[Your embedded ASM]
Well, that's a different story. The C++ compiler is probably assuming since you have BOTH forms in the same program that you only wanted one form
If I put something like that through my ASM compiler with the address and the value, it will give an error.
I simply had to give another name to the same location and it was OK.
mov ah, 09h
mov dx, strData
int 21h
mov dx, byte ptr [strData2]
;mov ax, byte ptr [strData] ; gives error
int 20h
strData:
strData2:
db 'this$'
As seen in Debug, you'll notice the results are completely different:
-r
AX=0000 BX=0000 CX=0012 DX=0000 SP=FFFE BP=0000 SI=0000 DI=0000
DS=1456 ES=1456 SS=1456 CS=1456 IP=0100 NV UP EI PL NZ NA PO NC
1456:0100 B409 MOV AH,09
-p
AX=0900 BX=0000 CX=0012 DX=0000 SP=FFFE BP=0000 SI=0000 DI=0000
DS=1456 ES=1456 SS=1456 CS=1456 IP=0102 NV UP EI PL NZ NA PO NC
1456:0102 BA0D01 MOV DX,010D
-p
AX=0900 BX=0000 CX=0012 DX=010D SP=FFFE BP=0000 SI=0000 DI=0000
DS=1456 ES=1456 SS=1456 CS=1456 IP=0105 NV UP EI PL NZ NA PO NC
1456:0105 CD21 INT 21
-p
this
AX=0924 BX=0000 CX=0012 DX=010D SP=FFFE BP=0000 SI=0000 DI=0000
DS=1456 ES=1456 SS=1456 CS=1456 IP=0107 NV UP EI PL NZ NA PO NC
1456:0107 8B160D01 MOV DX,[010D] DS:010D=6874
-p
AX=0924 BX=0000 CX=0012 DX=6874 SP=FFFE BP=0000 SI=0000 DI=0000
DS=1456 ES=1456 SS=1456 CS=1456 IP=010B NV UP EI PL NZ NA PO NC
1456:010B CD20 INT 20
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402