Board index » delphi » translating to pascal (delphi)

translating to pascal (delphi)

can anybody translate this or explain this to me in pascal ??

    pix = inl(0x0CF8);
    pix &= 0x7F000003;
    pix |= 0x80000800;
    pix |= (1<<11);
    pix |= (3<<8);
    pix |= (0x90);
    outl(pix, (unsigned short) 0x0CF8);
    m_SMBBA = (unsigned short)inl(0x0CFC) - 1;

--
please remove .nospam if you reply by e-mail

 

Re:translating to pascal (delphi)


Alex van Kaam heeft geschreven in bericht
<6bg8e3$...@news3.euro.net>...
|can anybody translate this or explain this to me in pascal ??

Mmmm... this kind of C-stuff is why I choose Delphi....

|
|    pix = inl(0x0CF8);  >>   ???
|    pix &= 0x7F000003;  >>   pix := pix and $7F000003;
|    pix |= 0x80000800;  >>   pix := pix or  $80000800;
|    pix |= (1<<11);     >>   pix := pix or (1 shl 11)
|    pix |= (3<<8);      >>   pix := pix or (3 shl 8)
|    pix |= (0x90);      >>   pix := pix or $90;
|    outl(pix, (unsigned short) 0x0CF8); >> unsigned short() = word();
|    m_SMBBA = (unsigned short)inl(0x0CFC) - 1; >>     -""-

Quote
>>> inl() and outl() are obviously C-functions, someone else might

know them.

Regards,
Dirk Claessens
______________________________________________
Home   : <dirk.claess...@village.uunet.be>
Office : <dirk.claessens...@belgium.agfa.com>
Nothing will come of nothing.
Dare mighty things. (William Shakespeare)
______________________________________________

Re:translating to pascal (delphi)


Quote
Alex van Kaam wrote in message <6bg8e3$...@news3.euro.net>...
>can anybody translate this or explain this to me in pascal ??

>    pix = inl(0x0CF8);
>    pix &= 0x7F000003;
>    pix |= 0x80000800;
>    pix |= (1<<11);
>    pix |= (3<<8);
>    pix |= (0x90);
>    outl(pix, (unsigned short) 0x0CF8);
>    m_SMBBA = (unsigned short)inl(0x0CFC) - 1;

>--

    pix := inl($0CF8);
    pix := pix and $7F000003;
    pix :=  pix or $80000800;
    pix :=  pix or (1 shl 11);
    pix :=  pix or (3 shl 8);
    pix :=  pix or ($90);
    outl(pix, cardinal($0CF8));
    m_SMBBA := cardinal(inl($0CFC)) - 1;

Re:translating to pascal (delphi)


Quote
kroma wrote in message ...

>Alex van Kaam wrote in message <6bg8e3$...@news3.euro.net>...

>    pix := inl($0CF8);
>    pix := pix and $7F000003;
>    pix :=  pix or $80000800;
>    pix :=  pix or (1 shl 11);
>    pix :=  pix or (3 shl 8);
>    pix :=  pix or ($90);
>    outl(pix, cardinal($0CF8));
>    m_SMBBA := cardinal(inl($0CFC)) - 1;

Oops... Change 'Cardinal' to 'Word'

Re:translating to pascal (delphi)


Quote
Alex van Kaam wrote:

> can anybody translate this or explain this to me in pascal ??

>     pix = inl(0x0CF8); // Pix := PortL[$0CF8];
>     pix &= 0x7F000003; // Pix := Pix and $7F000003;
>     pix |= 0x80000800; // Pix := Pix or $80000800;
>     pix |= (1<<11);   // Pix := Pix or (1 shl 11);
>     pix |= (3<<8);    // Pix := Pix or (3 shl 8);
>     pix |= (0x90);  // Pix := Pix or $90;
>     outl(pix, (unsigned short) 0x0CF8);

                         // PortL[$0CF8] := Pix;
Quote
>     m_SMBBA = (unsigned short)inl(0x0CFC) - 1;

                         // m_SMBBA := PortL[$0CFC] - 1;

--

http://www.midnightbeach.com - for info about me, my work, my writing,
                               and my homeschool resource pages.

Other Threads