Mail Archives: djgpp/1997/03/13/12:17:20
Dave -
You can get access to any portion of an integer type by using
combinations of bit shifts and bit masks.
for upper nibble of byte use
byte >> 4
for lower nibble of byte use
byte & 0xF0
for 3rd nibble of a word use
(word >> 8) & 0xF0
and so on
Andrew
>
> Heya peoples,
>
> I have a simple question (I hope) for some of you out there :)
> How in C (esp. GCC) do I find the high order of a byte, in Turbo
> pascal I would do this... a := Hi($1234) which would return ($12),
> how can I do this in DJGPP?
>
> Thanks heaps
> Dave
>
>
- Raw text -