Lv 612,962 points

Din

Favorite Answers45%
Answers1,772
Questions1

I make music on my PC and have been working with computers for about 16 or 17 years. I'm A+ Certified as of 2004 and try to make sure I know what I'm talking about before answering. Sometimes it works. Sometimes it doesn't. When all else fails, Google. When that fails, get the biggest hammer you can find and show that upstart computer who's boss. http://din.soonlabel.com http://www.traxinspace.com/profile/din

  • Assembly programming: Moving from TASM/MASM to NASM?

    I started learning assembly using Turbo Assembler several months ago (courtesy of a book that's way too old) and have run into the problem of getting away from TASM's striving for MASM compliance. I'm currently trying to port a working TASM project (16-bit real-mode with DOS segmented memory access) over to NASM syntax, and I'm getting stuck on how to point DS to the data group in order to access memory variables. I can't seem to find any information on directives or predefined labels that equate to the TASM/MASM instruction:

    mov ax,dgroup

    There's a very brief explanation of writing DOS object files that includes the line 'mov ax,data', but it doesn't cover how to label the data segment in the source file so this compiles without an 'undefined label' error. All the NASM manual says is that it won't use ASSUME or any other kind of assembler-assisted segment pointer assigning; it has to be done manually.

    So the question is this:

    Does anyone know either the directives/labels I need to be using, a good online tutorial explaining the solution, or an alternative way of pointing DS to the data group (or if I'm going about things in an old-fashioned way)? How can I do this 'manually'?

    1 AnswerProgramming & Design1 decade ago