Solved

Heading Details

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mainframe Assembler 9 734
False Theorem 27 944
How to join a 9V power supply cable 4 449
ia32 assembly to c 3 483
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 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