Re: Binary

1998-09-03 Thread James
On Tue, 1 Sep 1998, Josh Muckley wrote: -You need to find the pinouts of the parallel port and then just -connect a led from a data line to a ground line. There are three -differant types of lines in your p-port. The first and most important -is DATA (out), the second is STATUS (in) and the thi

Re: Binary

1998-09-02 Thread Josh Muckley
You need to find the pinouts of the parallel port and then just connect a led from a data line to a ground line. There are three differant types of lines in your p-port. The first and most important is DATA (out), the second is STATUS (in) and the third is CONTROL (i/o). You can find a lot more

Re: Binary

1998-08-31 Thread Andrew P. Bell
Yes, what makes binary<->hex conversion difficult? It is about the most natural conversion one can do. Each nibble is a hex character -- simple. No need to break out a calculator or abacus for God's sake. Anyway, macros or enumerated types will obviously be nicer to read than hex, octal, or

Re: Binary

1998-08-30 Thread James
On Sun, 30 Aug 1998, Chetan Sakhardande wrote: -No way. - -Just curious -- why? you ever seen that diagram that shows how to connect LEDs to the data lines on your parallel port? well i wanted it to flash different patterns (for no good reason) and it's 1 bit per led, 1 on, 0 off. specifying 101

Re: Binary

1998-08-30 Thread Glynn Clements
James wrote: > -> How do you use binary numbers in C? i'm sure i once knew... > -> > -> i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... > - > -ANSI C doesn't provide any way to specify numbers in binary. > > ahh... oops! i know where i saw it, x86 assembly : mov al, 0101

Re: Binary

1998-08-30 Thread David Ross
On Sat, 29 Aug 1998, Moshe Zadka wrote: > On Sat, 29 Aug 1998, David Ross wrote: > > > From the K&R C book I understand that the language syntax was > > intentionally kept > > small to avoid "scope creep" that would lead to LANGUAGE bloat (e.g. P/L 1). > > Language design like the rest of lif

Re: Binary

1998-08-30 Thread David Ross
> Henrik Nordstrom wrote: > [Charset iso-8859-1 unsupported, filtering to ASCII...] > > Moshe Zadka wrote: > > > > > OK, I want the first and fourth bit of a byte (cause the flags > > > there matter to me, say) x&0x9 can be used, but x&0b1001 seems a > > > bit clearer. > > > > I prefer havin

Re: Binary

1998-08-30 Thread holotko
James wrote: > How do you use binary numbers in C? i'm sure i once knew... > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... > > -- > [EMAIL PROTECTED]http://x-map.home.ml.org Offhand I know of no such "binary " conversion specifiers, functions, etc. in

Re: Binary

1998-08-30 Thread Chetan Sakhardande
No way. Just curious -- why? On Fri, 28 Aug 1998, James wrote: > How do you use binary numbers in C? i'm sure i once knew... > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... > > -- > [EMAIL PROTECTED]http://x-map.home.ml.org >

Re: Binary

1998-08-30 Thread James
On Sat, 29 Aug 1998, Glynn Clements wrote: - -James wrote: - -> How do you use binary numbers in C? i'm sure i once knew... -> -> i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... - -ANSI C doesn't provide any way to specify numbers in binary. - ahh... oops! i know where i

Re: Binary

1998-08-29 Thread Henrik Nordstrom
Moshe Zadka wrote: > OK, I want the first and fourth bit of a byte (cause the flags > there matter to me, say) x&0x9 can be used, but x&0b1001 seems a > bit clearer. I prefer having flags defined.. /* Some hypotetical flags for a device called RTB */ #define RTB_FLAG_AAB(1<<0) #define RTB_F

Re: Binary

1998-08-29 Thread Moshe Zadka
On Sat, 29 Aug 1998, David Ross wrote: > From the K&R C book I understand that the language syntax was > intentionally kept > small to avoid "scope creep" that would lead to LANGUAGE bloat (e.g. P/L 1). > Language design like the rest of life is filled with trade-offs. > > Your prefered syntax

Re: Binary

1998-08-29 Thread David Ross
On Sat, 29 Aug 1998 15:58:08 +0300 (IDT) Moshe Zadka wrote: > > On Sat, 29 Aug 1998, Glynn Clements wrote: > > > > > Moshe Zadka wrote: > > > > > > How do you use binary numbers in C? i'm sure i once knew... > > > > > > > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binar

Re: Binary

1998-08-29 Thread Moshe Zadka
On Sat, 29 Aug 1998, Glynn Clements wrote: > > Moshe Zadka wrote: > > > > How do you use binary numbers in C? i'm sure i once knew... > > > > > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... > > > > There is none. One of the major problems in C... > > Huh? In all of

Re: Binary

1998-08-29 Thread Glynn Clements
Moshe Zadka wrote: > > How do you use binary numbers in C? i'm sure i once knew... > > > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... > > There is none. One of the major problems in C... Huh? In all of the time that I've been using C, I have never felt any need to

Re: Binary

1998-08-29 Thread Glynn Clements
James wrote: > How do you use binary numbers in C? i'm sure i once knew... > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... ANSI C doesn't provide any way to specify numbers in binary. -- Glynn Clements <[EMAIL PROTECTED]>

Re: Binary

1998-08-29 Thread Moshe Zadka
On Fri, 28 Aug 1998, James wrote: > How do you use binary numbers in C? i'm sure i once knew... > > i know you prefix 0x to numbers for Hex, 0 for octal, what's binary... There is none. One of the major problems in C... -- Moshe Zadka <[EMAIL PROTECTED]> |(\_/) What's Yellow and Co