Solved

Heading Details

Posted on 2004-03-26
7
229 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to implement a communication protocol 8 520
Buffer Overflow Bomb Assignment - Final Phase 3 1,562
Array in beta 10 271
Digital Output does not have continuity to ground? 3 83
Cloud-based technologies and services will continue to grow in popularity in 2017 thanks to the simple, scalable and cost-effective solutions they deliver. Here are three areas where cloud adoption is poised to really take off.
A customer recently asked me about anti-malware and the different deployment options available for his business. Daily news about cyberattacks, zero-day vulnerabilities, and companies that suffered a security breach made him wonder if the endpoint a…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now