Newsgroups: comp.os.minix
Subject: Re: question about mpx386.s
References: <a3a4i9.hdg.ln@nnews.ath.cx>
Organization: Minix
Message-ID: <llgjh1bal5h5e60c3235gih1l0@stereo.pch.home.cs.vu.nl>
From: philip@pch.home.cs.vu.nl (Philip Homburg)
Date: Sat, 7 Jul 2001 09:03:50 +0200
Lines: 30
NNTP-Posting-Host: 213.84.34.176
X-Trace: 994489434 newszilla.xs4all.nl 14046 213.84.34.176
Path: news.adfa.edu.au!clarion.carno.net.au!news0.optus.net.au!news1.optus.net.au!optus!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!newszilla.xs4all.nl!not-for-mail
Xref: news.adfa.edu.au comp.os.minix:37804

In article <a3a4i9.hdg.ln@nnews.ath.cx>, Paul <paul@mmail.ath.cx> wrote:
>Have a few questions about mpx386.s (from version 2.0.0)
>(It's amazing I should come out from masterboot and friends and still alive
>at mpx386 :)
>
>1. "cmp 4(ebp), 0 " since we are in protected mode, I assume we are
>comparing 32-bit values by default, right?
>2. "4(ebp)" (if I'm not mistaken) is referring to the 32-bit value at
>     "push #MCS_SELECTOR
>     push #ret386  ! Monitor far return address" , right?
>3. If in the case monitor doesn't allow return, it should be referring to
>    " push #0
>     push 16(bp)  ! 32 bit address of parameters (ss relative)", right?
>4. If all the above are correct, then "4(ebp)" should most likely never be
>"0"
>  and " jz noret" is pointless....

I think you got things the wrong way around. The test in the monitor code is
there to figure out if the kernel is going to return or not. Old kernels
do not return to the monitor, and therefore the extra addresses should not
be pushed. 

To find a monitor that doesn't allow return, you have to look at the sources
of older versions of the monitor.





						Philip Homburg
