[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Heading Details

Posted on 2004-03-26
7
Medium Priority
?
239 Views
Last Modified: 2012-03-15
Hello, thanks for reading my question.

I was wondering if someone could explain what "heading details" were, and why they are required by some assemblers and not others.

I seem to remember trying to write a simple program, but it wouldnt assemble because it was requiring all this additional code (that didn't seem to make much sense to me).  Is this the same thing?

I hope my question makes sense.  I'm kinda new to assembly and have a lot of questions...

Thanks in advance.

Michael
0
Comment
Question by:michaelman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 12

Accepted Solution

by:
stefan73 earned 100 total points
ID: 10685254
Hi michaelman,
You mean all the lines about code model and such?

They're required for the assembler in order to create a binary - this information is used to create the appropriate sections, relocation entries, etc.

Cheers,

Stefan
0
 
LVL 12

Expert Comment

by:stefan73
ID: 10685263
michaelman,
Provide an example, and I'll see.
0
 

Author Comment

by:michaelman
ID: 10685334
The following code was included in MASM.  The file is called "minimum.asm", which leads me to believe its the smallest code that can be assebled (?).

At any rate, none of the tutorials I have read provide much information about the first few lines:

                 ideal
                 p286n
                 model tiny

                codeseg
                   org 100h
                   jmp start
             
               start:
                  mov ax, 4c00h
                  int 21h
               end
0
 
LVL 8

Assisted Solution

by:manish_regmi
manish_regmi earned 100 total points
ID: 10690511
hi,
 those "heading details" are required by the assembler the output you want.
eg,
.model tiny is a model directive. it will tell the assembler to use tiny memory model.
The executable code contains segments code, data and stack.
so you need to tell the assembler to put which code in which segment.

hi, if you are newbie, the book below will be a good start
http://cs.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html

regards manish
0
 
LVL 5

Expert Comment

by:twobitadder
ID: 10698970
codeseg
        org 100h

this tells the assembler that the code segment (area of memory that will hold the instructions as opposed to data) begins at address 100 hex.
org 100h simply means origin 100h.
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
Working from home is a dream for many people who aren’t happy about getting up early, going to the office, and spending long hours at work. There are lots of benefits of remote work for employees.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question