Similar issue to #93 : we need a syntax that will load an unsigned 16 bit word from memory.
In general we can do what any good C compiler would do and perform loads based on the type of the pointer, but for now we don't really handle types in any nice way (and it'll be a bit).
In the meantime we probably want a stopgap. One idea is to treat loads followed by immediate casts, e.g.
(int16_t) *foo
or maybe the opposite:
* (int16_t *) foo
as a load of exactly 16 bits, and more generally support built-in types of the form intXX_t or uintXX_t.
Similar issue to #93 : we need a syntax that will load an unsigned 16 bit word from memory.
In general we can do what any good C compiler would do and perform loads based on the type of the pointer, but for now we don't really handle types in any nice way (and it'll be a bit).
In the meantime we probably want a stopgap. One idea is to treat loads followed by immediate casts, e.g.
(int16_t) *foo
or maybe the opposite:
* (int16_t *) foo
as a load of exactly 16 bits, and more generally support built-in types of the form
intXX_t
oruintXX_t
.