But, obviously this doesn't work. So can anyone help me.
Please reply in normal mail / or both. Thanx
Nathan Palmer
silp...@juno.com
silp...@prodigy.net
you are not allowed to assign immediate values to a segment
register ( binary values,integers etc). the only way is to place a value
within another register and then mov that registers value into a segment
register. (using ax is the most common)
mov ax,SEGment string
mov es,ax
;;;or
push Segment string
pop es
then simply assign the offset to bp
mov bp,offset string
and you set
later
Samuel Igwe
--
Jerry L. Oyler
oy...@n-jcenter.com
>Ok. For function 13 interupt 10 i need to move a string into es:bp.
>How exactly would be the best way of doing this using tasm v3.2? Don't
>i have to move the segment into es, and then the offset into bp? like:
>mov bp, OFFSET string
> mov es, SEG string
> But, obviously this doesn't work. So can anyone help me.
>Please reply in normal mail / or both. Thanx
>Nathan Palmer
>silp...@juno.com
>silp...@prodigy.net
Try below:
mov bp, SEG string
mov es, bp
mov bp, OFFSET string
Hope this helps.
Good luck !
TB>SI>Ok. For function 13 interupt 10 i need to move a string into es:bp.
TB>SI>How exactly would be the best way of doing this using tasm v3.2? Don't
TB>SI>i have to move the segment into es, and then the offset into bp? like:
TB>SI>mov bp, OFFSET string
TB>SI> mov es, SEG string
TB>SI> But, obviously this doesn't work. So can anyone help me.
TB>Should work... make sure you have all the other registers set right too.
TB>AL = 0, BH = Page, BL = Attribute, CX = number of characters in the
TB>string, DH = Start Row, DL = Start Column.
TB>Make sure your attribute is not the same colour as the background. (Ie:
TB>if your background is black, you shouldn't have the attribute set at
TB>zero. Set it at 7 or something.)
Whoops, just noticed something obvious. You are trying to move the
segment of the string directly into the ES register. You can't move a
constant value into a segment register, but you CAN move a word register
into a segment register. So try:
MOV AX, SEG String
MOV ES,AX
(Note: If you're using A86 then this isn't the problem.. A86 allows you
to move directly into segment registers. It assembles MOV ES,10 for
example into:
push ax
MOV AX,10
MOV ES,AX
pop ax
)
SI>Ok. For function 13 interupt 10 i need to move a string into es:bp.
SI>How exactly would be the best way of doing this using tasm v3.2? Don't
SI>i have to move the segment into es, and then the offset into bp? like:
SI>mov bp, OFFSET string
SI> mov es, SEG string
SI> But, obviously this doesn't work. So can anyone help me.
Should work... make sure you have all the other registers set right too.
AL = 0, BH = Page, BL = Attribute, CX = number of characters in the
string, DH = Start Row, DL = Start Column.
Make sure your attribute is not the same colour as the background. (Ie:
if your background is black, you shouldn't have the attribute set at
You can load a segment register from memory (variable).
mov es,foo
ret
foo dw wongo
--
<---->
As an assembler author, I'd be interested to know about this
instruction: it isn't listed in any of the opcode lists I've seen.
Can you tell me what code the `mov es,foo' instruction generates,
please?
--
<^ I /\/\ O /\/ Simon Tatham <sg...@cam.ac.uk>
_> ------------ Trinity College, Cambridge, CB2 1TQ, England
Simon-
Yes, you CAN do this as well as the converse (store a segment register
into memory). The opcodes are:
10001110 mod 0sr r/m Memory or Reg to Segment Register (Load).
10001100 mod 0sr r/m Segment Register to Memory or Reg (Store).
where:
mod has the "normal" meaning.
0sr is 000 => es, 001 => cs, 010 => ss, 011 => ds.
r/m has the "normal" meaning.
Note that this definition is from an 8088 book, and I believe the
case of loading INTO cs is illegal in the more modern processors.
I hope this helps...
Jim Neil ___ ___/ ____/ ___ / ____/ ____/
Creator of The / / / / / /
TERSE Programming Language / ___/ ___/ ____ / ___/
ISBN: 0-9652660-0-1 / / / \ / /
jim-...@digital.net __/ ______/ __/ __\ ______/ ______/ TM
http://www.terse.com
*whoops* That'll teach me to post without thinking. I read `mov
es,foo' as meaning `mov es,OFFSET foo', and failed to spot the
error. Sorry, people...
The encoding for MOV segreg,mem/reg is 8E mod 0 reg r/m
where mod and r/m are used to specify the memory or register operand and
reg is two bits which specify the segment register.
Sorry, but in this case, Scott is correct.
-- Chuck
>Scott Nudds <af...@james.freenet.hamilton.on.ca> wrote:
>> You can load a segment register from memory (variable).
>>
>> mov es,foo
>> ret
>>
>> foo dw wongo
>As an assembler author, I'd be interested to know about this
>instruction: it isn't listed in any of the opcode lists I've seen.
>Can you tell me what code the `mov es,foo' instruction generates,
>please?
It's in the Intel docs.
Even DEBUG knows about this instruction:
8E 06 00 01 MOV ES,[0100H]
--
Henry S. Takeuchi
ht...@eskimo.com
Seattle, Washington (USA)
(Simon Tatham) wrote:
: As an assembler author, I'd be interested to know about this
: instruction: it isn't listed in any of the opcode lists I've seen.
: Can you tell me what code the `mov es,foo' instruction generates,
: please?
08CH mod.0ss.r/m MOV mem/reg,segreg
08EH mod.0ss.r/m MOV segreg,mem/reg
Available on all members of the 80x86 family from the 8088.
--
<---->