News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Equate sizing questions

Started by StillLearningMasm, April 04, 2023, 06:38:22 PM

Previous topic - Next topic

StillLearningMasm

Is there anybody out there who can answer these questions?

This fragment of code I have a few questions about.

Var1 EQU 100000000000000000000000h
Var2 EQU 10000000000000000000h
var3 = 0ffffffffh
dseg segment
  myval dt Var2
dseg ends


The value for var1 is a text value of  100000000000000000000000h, It is a TEXT value not a number.
The value is the largest value that can be created by EQU instruction.
The value for var2 is a text value of  10000000000000000000h, It is a TEXT value not a number.

The size of the value for var2 can be placed in myval and now has a size of 10 bytes.
If I want to place the value I have in Var1 to a memory location I can not easily do it since I have no identifier
bigger than tb. Also why did masm allow a EQU text value bigger than 10 bytes since there is no
instructions that can use it?
Is a TEXT value the same as a number value? They seem to be.

The value in Var3 is a number. It is the max size the number can be 0ffffffffh. It is NOT a TEXT value.
Why is the max size of a value using = not the same when using EQU?



jj2007

Quote from: StillLearningMasm on April 04, 2023, 06:38:22 PMThe value for var1 is a text value of  100000000000000000000000h, It is a TEXT value not a number.
The value is the largest value that can be created by EQU instruction.

Try Var1 EQU 800000000000000000000000000000000h with a more recent version of MASM.
Or Var1 EQU 800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000h with UAsm - I wonder what the practical use is of that :rolleyes:

StillLearningMasm

JJ2007,
where do I get the more recent version of masm?

jj2007

You'll have to download a Microsoft C/C++ compiler, and find ml.exe

Otherwise, try UAsm - 99.9% compatible.