Trivial Solutions
                    The LoseThos 64-bit PC Operating System
File:/LT/Demo/SubIntAccess.CPZ
This, and all LoseThos files, are public domain.  Do whatever you like.
God is watching; God is just; God is never out-done in generosity.  He talks!

LoseThos code compiles with the 64-bit LoseThos compiler/assembler I wrote.
Boot the LoseThos CD and you can compile it.  Not in Kansas anymore!

Click here for preliminary compiler information you need.

/*
  LoseThos has a feat that allows
  access to bytes and words of larger
  integers.

  See U64i union
 
  The versions with "i" are internal data types.
  Use "U64" instead of "U64i" and you
  will have access to subbytes and
  subwords.

        Unfortunately byte access causes the
  compiler to not use a register for the
  variable.

  See ::/LT/Demo/Lectures/FixedPoint.CPZ.
*/

U64 q=0xFEDCBA9876543210,q1;

"q\t\t=%016X\n",q;
q1=q.i16[2];
"q.i16[2]\t=%016X\n",q1;
q1=q.u8[5];
"q.u8[5]\t\t=%016X\n",q1;
q1=q.i32[1].u8[2];
"q.i32[1].u8[2]\t=%016X\n",q1;
q1=q.i32[0].i8[1];
"q.i32[0].i8[1]\t=%016X\n",q1;


Historical capture: 2012-03-09. Home | Power on LoseThos | Sources and changes