public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Vandewoestyne <Bart.Vandewoestyne@pandora.be>
To: linux-kernel@vger.kernel.org
Subject: Dos2Linux
Date: Tue, 04 Sep 2001 11:02:30 +0200	[thread overview]
Message-ID: <3B9498A6.5B216ABE@pandora.be> (raw)

How do I translate the following piece of DOS-code to linux?

static union {
  unsigned int *a;      // One 32 bits address
  unsigned long  l;     // One 32 bits long
  unsigned int w[2];    // Two 16 bits words
  unsigned char  b[4];  // Four 8 bits bytes
} DMAaddr;

static union {
  signed int w;         // One 16 bits words
  signed char  b[2];    // Two 8 bits bytes
} DMAcntr;

...

static void setadr( unsigned int far *buff, unsigned int length )
{
  unsigned int lw;

  lw = FP_SEG( buff );                // Segment address of buffer
  DMAaddr.w[1] = ( lw >> 12 ) & 0xf;    // Makes real 32bit address
  DMAaddr.w[0] = ( lw << 4 ) & 0xfff0;
  DMAaddr.l += ( unsigned long )FP_OFF( buff );
  DMAcntr.w = length;
}


Thanks,
mc303

-- 
Ing. Bart Vandewoestyne			 Bart.Vandewoestyne@pandora.be
Hugo Verrieststraat 48			       GSM: +32 (0)478 397 697
B-8550 Zwevegem			 http://users.pandora.be/vandewoestyne
----------------------------------------------------------------------
"Any fool can know, the point is to understand." - Albert Einstein

             reply	other threads:[~2001-09-04  9:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-04  9:02 Bart Vandewoestyne [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-28 15:10 DOS2linux Camiel Vanderhoeven
2001-08-28 15:27 ` DOS2linux Camiel Vanderhoeven
2001-08-27 19:39 DOS2linux Bart Vandewoestyne
2001-08-27 19:59 ` DOS2linux Randy.Dunlap
2001-08-27 20:06 ` DOS2linux Alan Cox
2001-08-27 20:19   ` DOS2linux Bart Vandewoestyne
2001-08-27 20:28     ` DOS2linux Alan Cox
2001-08-27 23:39     ` DOS2linux Camiel Vanderhoeven
2001-08-28  6:54       ` DOS2linux Bart Vandewoestyne
2001-08-28 14:45         ` DOS2linux Camiel Vanderhoeven
2001-08-28 15:03           ` DOS2linux Bart Vandewoestyne
2001-08-28 15:30             ` DOS2linux Brian Gerst
2001-08-27 22:23   ` DOS2linux Dr. Kelsey Hudson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B9498A6.5B216ABE@pandora.be \
    --to=bart.vandewoestyne@pandora.be \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox