I was reading the "art of assembly" manual and it said the following processor command will cause Masm to have a fit.

mov ds:[10h],10

It doesn't explain why and i was wondering if anybody knew and had some corresponding correct syntax if you wanted 10 at that locatiion.

Still a newbie
Posted on 2002-05-18 12:01:23 by titan
Think about it ;)

The CPU is a machine. It needs to place number in proper little boxes. 8bit, 16 bit, 32 bits... etc.

So you tell it to "just place 10 at this address". And the computer scratches its processor, and wonders "which box do i use?"

Posted on 2002-05-18 15:08:32 by NaN
Well NaN i guess that would mean that Masm does not default to a byte or word or dword if you just give it a value. Is this what your saying?
Posted on 2002-05-18 15:45:49 by titan
Ok i got it. The source would have to be a register. I should have read the opcodes before i posted. But the way the item had been described in the assembly manual leads one to believe it would generate an error specific to Mam syntax.

Posted on 2002-05-18 16:15:13 by titan
mov byte ptr ds:[10h], 10
mov dword ptr ds:[10h], 10
Posted on 2002-05-18 16:24:41 by bdjames
Ok so it doesn't necessarily have to be a register. Its been a while and i never really got the syntax down before. Thanx again.

mov byte ptr ds:[10h], 10
Posted on 2002-05-18 17:55:16 by titan