Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

16 bit Segmented Assembly Nasm .98 version

Status
Not open for further replies.

SaithDagger

Programmer
Jul 24, 2010
2
US
Student? Suppose you can consider me a 'newbie' or a newly entered programmer. But, no. I'm not an enrolled college student at the moment (so please don't immediately delete).

But hopefully someday I will :D

I'm new to assembly. I've taken interested in the book, 'Assembly Language Step-by-Step', 2nd edition by Jeff Duntemann. He's a well written, incredibly easy to understand writer. I suggest anyone new to Assembly to check this book out.

More to the point. I've been working throughout his examples, mostly 16-bit real mode flat model. So far no problem. Instead of just copying and pasting, or just opening up his original document, I have been rewriting to get a smooth and more understandable approach with assembly and NASM instructions.

The problem I am now having is with examples with 16-bit segmented examples. I noticed that with real mode flat model, NASM had no problems with

[SECTION CODE] or
[SECTION DATA] with 16-bit real mode flat model

but is having difficult with the naming of

SEGMENTED code or
SEGMENTED stack stack with attempts of doing 16-bit real mode segmented model.

The error that occurs is:
segment name 'stack' is not recognized and
segment name 'code' is not recognized.


Any ideas?




*********************** Answered *************************

Okay. I was going to delete this, but hopefully I can give some use to others that are new and using Nasm as well. Who knows, someone may google this type of problem and bring them here, possibly another new user to the forums.

If you have this book, read pg 246. Basically, Nasm-ide uses NASM for 16-bit REAL MODE FLAT MODEL ONLY assembly. Once you get into 16-bit REAL MODE -SEGMENT- MODEL, you can't use Nasm through NASM-IDE to assemble and link. Nasm-ide doesn't have a linker. :O (I read that at one point, but I guess I forgot. Assembly seems to be vastly more detail oriented than higher level languages that I'm used to).


Well. Thanks for reading my own question/answer xD.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top