[FreeVMS] How to write PROBER and PROBEW for IA32?
Roger Tucker
roger.tucker at mci.com
Ven 30 Sep 19:04:10 CEST 2005
I recently wrote a routine to parse 32 bit and 64 bit item. I was hoping to
use this routine on FreeVMS and work on some of the sys$get*() system
services. It works on OpenVMS but doesn't on FreeVMS yet...
The first think it needs is __PAL_PROBER(). I noticed that FreeVMS doesn't
currently probe its args yet and we need to start doing that. So, I decided
it was time to write PROBER, and PROBEW for IA32. I know VAX assembler and
Alpha assembler (and I use to know Z80A and 8088 assembler many years ago),
so how hard could that be? I've been reading the I32 processor manuals for
the last few days!!! What a kludged-up / fucked-up CPU!!! :-)
(But I'm going to learn it if it kills me!)
I'm getting a little closer, so here is where I am:
1. After the jump to kernel mode (they call it supervisor), I think you
read the callers CS selector from the stack into a register. This will give
you the caller's previous mode.
2. Use the ARPL instruction to correct the D segment passed.
(In case they are trying to trick you...)
3. Use the VERR D segment instruction to verify read.
Just wondering if I'm on the right track, or if anyone else has tried to
write a PROBR type routine for IA32.
Thanks,
Roger
Plus d'informations sur la liste de diffusion FreeVMS