🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1269

Re: A nibble here...

#1269
From: Dave
Date: Tue, 19 Mar 2002 21:42
24 lines
1492 bytes
Thanks.  Sometimes I make things way too hard. :-p

Dave

"R.F. Pels" <ruurd@acklin.nl> wrote in message news:3c97aa38_2@dnews...
> Dave wrote:
>
> > I've got a binary file I'm reading in that has command codes in it.  One
> > set of commands has a hex code B0 - BF which means "change color to"
with
> > the color being the low order nibble of the byte.  How can I pull off
the
> > nibbles from the bytes?
>
> Subtract B0 hex?
> And the command code with 0x0F is probably the fastest:
>
>         int color = commandcode & 0xf0;
>
>
>
> --
>
> Ruurd
Technical Details
Message-ID: <3c97b111$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3c9766f6$1_1@dnews> <3c97aa38_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,bb1597c09fe1bc82
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-03-19 13:44:44 PST
From: "Dave" <dstaelens@nospam.specialmetals.com>
Newsgroups: borland.public.jbuilder.java.api
References: <3c9766f6$1_1@dnews> <3c97aa38_2@dnews>
Subject: Re: A nibble here...
Date: Tue, 19 Mar 2002 16:42:35 -0500
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 207.140.76.7
Message-ID: <3c97b111$1_2@dnews>
X-Trace: dnews 1016574225 207.140.76.7 (19 Mar 2002 13:43:45 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!dnews