not exactly sure what you're trying to do.

by (Login MCalkins)
ASM Forum

 

are you trying to move the data into the si register? if so:

jmp label1
data:
db "a"
db "b"
label1:
mov si,[data] ;moves 16 bits

or are you trying to move the data into the memory pointed to by the si register? if so:

jmp label1
data:
db "a"
db "b"
label1:
mov ax,[data] ;moves 16 bits
mov [si],ax

>how do i mov the data into say ds:si or something.

If you mean the memory pointed to by ds:si, well then ds is the default register, so you only need to specify si. (If you were to specify a segment, wouldn't that make it a far pointer by definition? ds:si is a far pointer. si is a near pointer.)

>I don't need to make some far pointer like [es:di] so how could I do this with near pointer.

just [di], assuming that ds contains the correct segment. ds is default for mov and for lodsb, etc, but es is default for stosb, if i recall correctly.

>And would that be the segment CS?

well, it looks to me like you're mixing your data in with your code, so i wouldn't be surprised if cs and ds point to the same segment, but ds is the one that needs to be right for a mov instruction, unless you use a segment override.

>And how would I do this AND have it work in linked obj files and call absolute with qbasic.

well, i'll let someone else answer the obj question in detail. as far as call absolute, remember what i said in my article about having to find out your starting offset? There is an example at the end of this post:

http://www.network54.com/Forum/632471/message/1232670812/CALL+Absolute%28%29

Regards,
Michael

Posted on Dec 1, 2009, 8:07 PM

Respond to this message   

Return to Index

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement