Backflips, cartwheels, and proc params...

Orlando Llanes a010111t at bc.seflin.org
Mon Nov 10 16:43:06 CET 1997


Let's say I have a record as follows:

TYPE
  ToeFoo = PACKED RECORD { Is PACKED neccessary to keep it continuous? }
    Bar : Byte;
    BarNone : Word;
  END;

  The fields are not important, what is important is the following procedure:

  PROCEDURE DahDahDah( VAR aFoo : ToeFoo );
  BEGIN
  END;

  I need to get a pointer to it in ASM in order to manipulate it and in
order to save the value. What would I have to do? Is it safe to assume
that DS = Descriptor to aFoo in procedure DahDahDah? And do VAR parameters
return a 32-bit offset? I remember it coming up once before that the
pointers were 32-bit offsets, but I just want to verify that I remembered
correctly :}

  For the curious, what I'm doing is coding a DPMI Simulate Real Mode
Interrupt so I Can call RM ISRs, but especially to change the graphics
mode. I'm aware of BPCompat (BTW, AWESOME collection of routines Chief et
al! :), and I tried it, but although the procedure
__dpmi_simulate_real_mode_interrupt() executed properly, I didn't get the
desired video mode. Besides, I'm coding it myself because I want to keep
it simple. Again for the curious, I typed in the following code:

  PROGRAM VGA;

  USES
    DPMI;

  VAR
    Regs : __dpmi_regs;

  BEGIN
    Regs.x.ax := $03;
    __dpmi_simulate_real_mode_interrupt( $10, Regs );
  END.

Instead of getting mode 3, I got mode 1 or 2 (I didn't check beyond
noticing that it didn't look like Mode-13h, it was some 40x20 characters
per screen, and it looked like a text mode). I honestly don't think it was
something wrong in the DPMI unit, the DPMI unit links to a C routine. 

See ya!
Orlando Llanes

  "Hey, we all did the drug thing, we all did the money thing, and 
   eventually you find out that none of that stuff fixes anything, and we 
   have nowhere else to go except to evolve spiritually and intellectually"
                                    -- Meredith Brooks

"Look out fo' flyeeng feet"
      O__/                     a010111t at bc.seflin.org
    \/|____.  O
      <__.  \/\>
             / \
____________|___\______    http://ourworld.compuserve/homepages/Monkey414




More information about the Gpc mailing list