Click to See Complete Forum and Search --> : NASM: Addressing segment:offset


Bluefox815
October 1st, 2008, 09:17 PM
I previously used TASM 5.0, and the following code would output a string just fine.


var db "Hello", "$"

mov ax, seg var
mov ds, ax

mov ah, 09h
lea dx, var
int 21h


While NASM supports


var db "Hello", "$"

mov ah, 09h
mov dx, var
int 21h


Which doesn't make sense because I didn't specify what segment var is in which is required for "int 21,9" (string is stored in ds:dx)

What I want to know is how to address a location in memory in the format "segment : offset" because the same method as used above does not work with "int 10,13" with the NASM assembler.

Interrupt 10,13
http://www.htl-steyr.ac.at/~morg/pcinfo/hardware/interrupts/inte6rjk.htm