Results 1 to 4 of 4

Thread: [RESOLVED] [MASM] Clarification about Symbolic Constants

Threaded View

  1. #1

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Resolved [RESOLVED] [MASM] Clarification about Symbolic Constants

    Theres an ambiguous part in a book I'm reading about MASM, I won't quote it here but tell me how the following code behaves...


    Code:
    NUMBER = 20 ;does this really mean 5?
    mov eax, NUMBER 
    NUMBER = 5
    mov ebx, NUMBER 
    add eax, ebx
    I inferred from the book that the very last instance of ...

    Code:
    NUMBER = ??
    ... propagates through the whole file rendering all of the other instances useless. Is this right?

    If this is the case then eax now contains 10 (5+5). But my own mind makes me think that it would actually contain 25.

    I know how things like this behave in other languages and they way the book says it sounds weird.

    Can anyone shed any light?

    (I would try it but I haven't got MASM on this machine)
    Last edited by wossname; Oct 5th, 2005 at 10:09 AM.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width