2021-07-02 00:53:42 +01:00
|
|
|
/*ZealOS has a feature that allows access to bytes and words of larger ints.
|
2020-02-15 20:01:48 +00:00
|
|
|
|
|
|
|
See $LK,"U64i union",A="FF:::/Kernel/KernelA.HH,U64i union"$.
|
|
|
|
|
2020-02-17 07:18:27 +00:00
|
|
|
The versions with "i" are internal data types. Use "I64" instead of "U64i" and you will have access to subbytes and subwords.
|
2020-02-15 20:01:48 +00:00
|
|
|
|
Rename abs_addres to abs_address.
Update documentation/comments to rename addr, fun, var, stmt, blk, desc, reg, seg, ptr, dup, clus, val, and bttn, to address, function, variable, statement, block, description, register, segment, pointer, duplicate, cluster, value, and button, respectively.
2021-10-07 02:35:32 +01:00
|
|
|
Unfortunately, byte access causes the compiler to not use a register for the variable.
|
2020-02-15 20:01:48 +00:00
|
|
|
|
2021-12-11 11:21:22 +00:00
|
|
|
See $LK,"::/Demo/Lectures/FixedPoint.ZC"$.
|
2020-02-15 20:01:48 +00:00
|
|
|
*/
|
|
|
|
|
2020-12-23 23:27:18 +00:00
|
|
|
I64 q = 0xFEDCBA9876543210, q1;
|
2020-02-15 20:01:48 +00:00
|
|
|
|
2020-12-23 23:27:18 +00:00
|
|
|
"q\t\t\t\t=%016X\n", q;
|
|
|
|
q1 = q.i16[2];
|
|
|
|
"q.i16[2]\t\t=%016X\n", q1;
|
|
|
|
q1 = q.u8[5];
|
|
|
|
"q.u8[5]\t\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;
|