Just a curiosity, but in DOS assembly let's suppose that I have this:

entrada DB 80000 DUP(?)

Since we must tell the compiler the SEGMENT where BUFFER is, how can I refer to this variable, once it is in another segment? Do I have to use far pointers all the time when I access it, for example in a cmp command, or I just need to put the adress of DATA in DS once, in the beggining of the program?

mov AX, seg @DATA
mov DS, AX
mov DX, offset BUFFER

cmp BL,

If nobody matters with this off topic question, I'd be glad. Thanks
Posted on 2004-07-02 21:22:22 by Marginais
LDS- Load Pointer Using DS
LDS dest,src
Loads pointer from memory source to destination register and DS. The offset placed in the dest. register and the segment placed in DS
-- ------------------------------------------------
Number1 dw 100
Number2 dw 200
lds ax,Number1
lea dx,Number2
cmp ds:,ds:
Posted on 2004-07-03 05:02:09 by Criminal2

if you are refering to 16bit programming, you must set DS to access the BUFFER:

mov ax, seg BUFFER
mov ds,ax
Posted on 2004-07-03 05:19:05 by japheth