Could not assemble hello.asm

Posted on 2003-02-23
Medium Priority
Last Modified: 2008-02-26
i got this .asm file "hello.asm":

segment dseg
msg:    db      'Hello, Dear World$'

segment sseg stack
        resb 0x40

segment cseg
        mov     ax, dseg
        mov     ds, ax
        mov     dx, msg
        mov     ah, 0x09
        int     0x21
        mov     ah, 0x4C
        int     0x21

the problem is that i was unable to properly compile it with NASM, im pretty sure there is nothing wrong with the code, its just that i couldn't figure how to use NASM

it yields this:
hello.asm:1: segment name `dseg' not recognised
hello.asm:4: segment name `sseg' not recognised
hello.asm:7: segment name `cseg' not recognised
hello.asm:8: unrecognised special symbol `..start'

Question by:x25
LVL 11

Accepted Solution

dimitry earned 1200 total points
ID: 8005773
You need to do next thing:
  NASM.EXE -fobj hello.asm
To create hello.obj
Then you need to create exe with the help of linker.
I used TLINK hello.obj and it created HELLO.EXE that prints "Hello, Dear ..."

Author Comment

ID: 8005971
thanks a lot, that really assembled.
i still have more question though, plz check back soon.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

Why WooCommerce is one of the majorly favored choices when it comes to having an eCommerce store. This article will acquaint you with some reasons that I believe make it one of the best eCommerce platforms available.
There are a few different ways to preview your site before DNS resolves it to your (mt) Media Temple server.  The Plesk platform makes it easy.  See the following guide to learn how.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…

621 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