So, is ASSUME instruction redundant?
. ASSUME , ( : ). CS DS , , , . , CS , . , DS.
, , DS mov ax, 2000h ; mov ds, ax , () 2000h, . , - !
data_here segment
multiplier db 02h
multiplicand db 08h
product dw dup(0) ; ??? btw, missing a count between dw and dup(0) ?
data_here ends
data_there segment
ihavesomevalue dw 1234h
multiplier db 02h
multiplicand db 08h
product dw dup(0)
data_there ends
assume ds:data_here assume ds:data_there :
lea ax, data_here
mov ds, ax
assume ds:data_here
mov cx, word ptr [multiplier]
CX, 0802h ( + LSB). DS data_there data_here:
lea ax, data_there ; MODIFIED !!!
mov ds, ax
assume ds:data_here
mov cx, word ptr [multiplier]
, CX 1234h - ihavesomevalue.
?
, DS data_here .
, DS data_here, , / .
DS data_there. mis , DS data_here. , multiplier 2 0 , , . .
ASSUME .
BTW, ASSUME , , , :
BLOCK struct
item1 dd 0
item2 dd 0
item3 dd 0
BLOCK ends
assume esi:PTR BLOCK
mov eax, [esi].item2
add ecx, [esi].item3
.. ESI / BLOCK, .
P.S.: !