flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > mov ax,es:[bx]

Author
Thread Post new topic Reply to topic
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1
fasm doesnt seem to accept

mov ax,es:[bx]

in 16 bit real programs, Sad

eg see attached no-op program xyz.asm

I know this is correct asm as it is accepted by the
assembler I was using previously, Twisted Evil

the hex dump of xyz.com via the previous assembler
is:

0000: BB000026 8B07B44C CD21

and it runs without problem doing nothing,

I want to be able to use non default segments otherwise
the coding can get very tricky trying to do everything via
implicit segment registers

I looked through the online documentation but couldnt
see this explained,

is there some directive to do this? Rolling Eyes


Description:
Download
Filename: xyz.asm
Filesize: 62 Bytes
Downloaded: 282 Time(s)

Post 27 Jan 2006, 22:06
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
mov ax, [es:bx] will work
Post 28 Jan 2006, 01:41
View user's profile Send private message Reply with quote
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1
locodelassembly wrote:
mov ax, [es:bx] will work


now why didnt I think of that! Very Happy

I've tried now

mov eax,[es:ebx]

which also functions Razz

I can continue with the code I'm working on, Arrow

I suppose [es:bx] is a more logical notation Shocked

(as es:[bx] literally means the segment :offset where
segment = es and offset = [bx], whereas [es:bx] means
the thing pointed to by es:bx )
Post 28 Jan 2006, 03:10
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.