News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

question on basics

Started by anuradha, March 15, 2007, 08:16:22 PM

Previous topic - Next topic

anuradha

hi guys
  its me again
  can any one tell me what are functionalities of these keywords
  1. .const
  2. .data
  3. .data?
  need help please :bg :bg

ragdog

.DATA?   uninitialized data

Here variables can be indicated, which are not yet initialized. That has the advantage the fact that one can reserve oneself memory without the size of the program affects. I.e. in this section e.g. 10kb memory can be reserved, the file size increases however not around 10kb.



.data initialized data

In this section all variables are indicated.



.const

Here constants can be indicated. Constant ones are constant values.


ragdog

anuradha


anuradha

hi guys
its me again
I have another one
can any one tell me what is  segment and 64k,4gig story?
thanks :bg :bg :bg :bg

raymond

In the early PCs (XT, AT), only 16-bit registers were available, having a maximum range of 64kb. In order to address more memory than 64kb, it was necessary to use another 16-bit register to indicate which "segment" of any additional memory that needed to be accessed.

With the advent of 32-bit registers, those now have a range of 4Gb. Since memory size exceeding 4Gb may only be coming to life, there is no need to use another register to indicate a segment. With the advent of 64-bit registers now getting on the market, those will be able to address memory sizes so large that you may never have to worry about their limit in your lifetime.

Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com