SparrowOSTS_121127.ISO
This commit is contained in:
1 parent
0e9364ff4c
commit
e57428affb
1218 files changed
+247142
-165507
No files matched your search
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
SparrowOS has a feat that allows
|
||||
access to bytes and words of larger
|
||||
integers.
|
||||
|
||||
See $LK,"U64i union","FF:::/SparrowOS/OSMain/Adam1a.HPP.Z,U64i union"$
|
||||
|
||||
The versions with "i" are internal data types.
|
||||
Use "I64" instead of "U64i" and you
|
||||
will have access to subbytes and
|
||||
subwords.
|
||||
|
||||
$BK,1$ Unfortunately byte access causes the
|
||||
compiler to not use a register for the
|
||||
variable.$BK,0$
|
||||
|
||||
See $LK,"::/SparrowOS/Demo/Lectures/FixedPoint.CPP.Z","FI:::/SparrowOS/Demo/Lectures/FixedPoint.CPP.Z"$.
|
||||
*/
|
||||
|
||||
I64 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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user