Need Gnu equivalent for type 'Registers' 
Author Message
 Need Gnu equivalent for type 'Registers'

Quote:

> Does anyone know what gpc (GNU Pascal for djgpp) equivalent
> type corresponds to Borland's "Registers" type?
> --


From Borland's help file:

type
    (Registers record used by Intr and MsDos)
  Registers = record
    case Integer of
    0: (AX, BX, CX, DX, BP, SI, DI, DS, ES, Flags: Word);
    1: (AL, AH, BL, BH, CL, CH, DL, DH: Byte);
  end;

You should be able to declare this type directly using gpc,
but I don't know if it has procedures that accept it as a
parameter.

--
Jared Showalter
Remove the REMOVETHIS from my addresss to reply.



Mon, 27 Mar 2000 03:00:00 GMT  
 Need Gnu equivalent for type 'Registers'

Quote:

> From Borland's help file:

> type
>     (Registers record used by Intr and MsDos)
>   Registers = record
>     case Integer of
>     0: (AX, BX, CX, DX, BP, SI, DI, DS, ES, Flags: Word);
>     1: (AL, AH, BL, BH, CL, CH, DL, DH: Byte);
>   end;

> You should be able to declare this type directly using gpc,
> but I don't know if it has procedures that accept it as a
> parameter.

The official version of GPC, 2.0, does not have built-in types
`Word' and `Byte'.  Recent beta versions do, so I am referring
to gpc-970714 or newer, here and below.

To use interrupts from GPC, you need to write headers for the
respective functions from the DJGPP system library:

    Function __DPMI_simulate_real_mode_interrupt ( Vector: Integer;
                                     Var Regs: Registers ) : Integer; C;

The `Registers' record itself must be declared a little different
from Borland's one.  You can look it up from a C header file that
comes with DJGPP.  (Do not forget: `Word' has 32 bits in GPC,
`ShortWord' has 16.:-)

If I remember correctly, `Registers' must be the following:

    Type
      Registers = record
        case Integer of
          0: ( edi, esi, ebp, res, ebx, edx, ecx, eax: Word );
          1: ( di, di_hi, si, si_hi, bp, bp_hi, res_lo, res_hi,
               bx, bx_hi, dx, dx_hi, cx, cx_hi, ax, ax_hi,
               flags, es, ds, fs, gs, ip, cs, sp, ss: ShortWord );
          2: ( edi2, esi2, ebp2, res2: Word;
               bl, bh, bl_hi, bh_hi, dl, dh, dl_hi, dh_hi,
               cl, ch, cl_hi, ch_hi, al, ah, al_hi, ah_hi: Byte );
      end (* Registers *);

Be invited to join the GNU Pascal mailing list if you have further
questions.  To subscribe, write to gpc-request at hut dot fi; the
list itself is gpc at hut dot fi.

Hope this helps,

    Peter

 Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer

 maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]



Fri, 31 Mar 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Looking for equivalent to 'friend'(C++) in object pascal

2. type field ''money''

3. Equivalent of C 'Union'

4. Newbie needs mouse registers 'n stuff

5. 'Incompatible types 'string' and 'Tdbedit''

6. EVariantError 'Invalid variant type conversion'

7. Equivalent to DisableDefault in Paradox's ObjectPAL?

8. InstallShield doesn't register a DLL ?!

9. Creating RunTime Fields: EDataBaseError 'Field 'Fieldname' is not of the expected type'

10. More noob help needed please: 'asm'

11. Need help with 'Insufficient Memory' errors

12. need expert's Help: single quote '

 

 
Powered by phpBB® Forum Software