muss C/C++ in Pascal übersetzen 
Author Message
 muss C/C++ in Pascal übersetzen

Hallo,
ich muss ein C Programm in ein Pascalprogramm bersetzen, nun bin ich schon
auf die ersten Probleme gesto?en, wie kann man _ByteMask,GetByte, ATIIOPort,
UnitOf,GetBits,SetBits, IOPortTag, SparseIOTag bersetzen. Was bedeutet es
???????????????

#define RAGE_TOTAL_REGS (VGA_TOTAL_REGS + 1400)

#define SPARSE_IO 0
#define BLOCK_IO 1

#define _ByteMask(__Byte) ((unsigned char)(-1) << (8 * (__Byte)))
#define GetByte(_Value, _Byte) GetBits(_Value, _ByteMask(_Byte))

#define GetReg(_Register, _Index)                               \
        (                                                       \
                outb(_Register, _Index),                        \
                inb(_Register + 1)                              \
        )
#define PutReg(_Register, _Index, _Value)                       \
        outw(_Register, ((_Value) << 8) | (_Index))

#define ATIIOPort(_PortTag)       \
        (((ATIIODecoding == SPARSE_IO) ?     \
          (((_PortTag) & SPARSE_IO_SELECT) | ((_PortTag) & IO_BYTE_SELECT))
: \
          (((_PortTag) & BLOCK_IO_SELECT)  | ((_PortTag) & IO_BYTE_SELECT)))
| \
         ATIIOBase)

#define ATTRX   0x03c0u
#define ATTRD   0x03c1u
#define SEQX   0x03c4u
#define SEQD   0x03c5u
#define GRAX   0x03ceu
#define GRAD   0x03cfu
#define GENS1   0x03dau
#define CRTX   0x03d4u
#define CRTD   0x03d5u

#define SPARSE_IO_BASE  0x03fcu
#define SPARSE_IO_SELECT 0xfc00u
#define BLOCK_IO_BASE  0xff00u
#define BLOCK_IO_SELECT  0x00fcu
#define IO_BYTE_SELECT  0x0003u

#define _UnitOf(___Value) ((((___Value) ^ ((___Value) - 1)) + 1) >> 1)
#define GetBits(__Value, _Mask) (((__Value) & (_Mask)) / _UnitOf(_Mask))
#define SetBits(__Value, _Mask) (((__Value) * _UnitOf(_Mask)) & (_Mask))
#define IOPortTag(_SparseIOSelect, _BlockIOSelect) \
 (SetBits(_SparseIOSelect, SPARSE_IO_SELECT) | \
  SetBits(_BlockIOSelect, BLOCK_IO_SELECT))
#define SparseIOTag(_IOSelect) IOPortTag(_IOSelect, (unsigned)(-1))
#define BlockIOTag(_IOSelect) IOPortTag((unsigned)(-1), _IOSelect)



Wed, 13 Aug 2003 21:10:33 GMT  
 muss C/C++ in Pascal übersetzen
Benjamin,

wenn Du Deine Frage in englischer Sprache stellst, erhaelts Du
hoechstwahrscheinlich mehr Antworten.

--
Juergen



Thu, 14 Aug 2003 03:38:11 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Delphi CS 1.02 to Sybase Help

2. Accessing oracle sequences from Delphi 1.0 CS

3. CS Apps : TTable or TQuery ?

4. Delphi CS, Oracle7.2 & SQLNetV2.2

5. Documents in tables in CS ?

6. help needed please for CS 110 class

7. Delphi 2.0 CS Update & BLOB Problem

8. kcip@cs.cuhk.hk

9. Problem with Delphi3 CS and Sybase 11 - HELP please

10. 3 Questions on Delphi 3.0 cs

11. CS Queries than can be Cancelled

12. URL: http://www.cs.vu.nl/~jprins/tp.html

 

 
Powered by phpBB® Forum Software