flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > Use of ExtraSegment in MenuetOS

Author
Thread Post new topic Reply to topic
MikeM



Joined: 30 Sep 2004
Posts: 1
MikeM
Hi!

Im a newbie in programming MenuetOS and after my first steps I discovered that the use of MOV ES, BX (needed for SCASW) leads to a TRAP 00000D and the automatic termination of the Program.

I didnt find any articles or postings of this behavior. What am I doing wrong?

THX in advance,
Mike
Post 30 Sep 2004, 18:56
View user's profile Send private message Reply with quote
spideros1



Joined: 17 Jan 2004
Posts: 77
Location: Poland
spideros1
Why do you need to change ES. What value do you load there ?
Segments in protected mode have different meaning and it's useless
to change segment registers in user mode. Do you want to write to
another process memory ?
Post 02 Oct 2004, 08:52
View user's profile Send private message Visit poster's website Reply with quote
Tolle



Joined: 21 Jan 2004
Posts: 71
Tolle
You don't need to set ES just to use SCASW, setting EDI is enough...
Post 02 Oct 2004, 10:27
View user's profile Send private message Visit poster's website Reply with quote
wanderer



Joined: 18 Jun 2003
Posts: 44
Location: Moldova, Kishinev
wanderer
Tolle wrote:
You don't need to set ES just to use SCASW, setting EDI is enough...

Segment registers format in protected mode differs from one in real mode. As I understood from previous posts menuet os uses flat memory model and initializes all (or almost all) segment registers to use segments with base 0 and limit 0xffffffff. That's why you have to use only offsets in you program and there's no reason to touch segment registers.

_________________
Best regards,
Antoch Victor
Post 02 Oct 2004, 22:41
View user's profile Send private message Yahoo Messenger 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 can 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.