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
Solved

Heading Details

Posted on 2004-03-26
7
231 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
7 Comments
 
LVL 12

Accepted Solution

by:
stefan73 earned 25 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 25 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Net framework versions 2.0 and sdk 4 512
Picking random number 8 178
CRM 2011 Custom Code 4 58
Crystal Report for VS2013 17 127
IT certifications are a concrete representation of continual learning on the part of the candidate.  Continual learning is necessary for the long term success of an IT professional, but are IT certifications the right path for you?
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

766 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