stage0/stage0
Dmitry Petukhov c563ce3ddc
reduce stage0_monitor size by 6 bytes (toggle default zero, use mux)
The toggle can have default state of zero, and then non-zero means
second nybble is processed. That allows to skip initialization of
toggle, and save 4 bytes.

But then we cannot create value 1 with 4-byte instruction.

But we can get something out of this situation: we can initialize
R11 to 0x1101, and R15 to 0xF, and then we can get 0x1100 with MUX:
MUX R0 R15 R11 R8   ; 0x1100 = ((0x1101 & ~0xF) | (0 | 0xF))

And we will also have value 0xF in R15.
0xF is used twice as immediate thus we save another 4 bytes
by using non-immediate instructions two times

We save 6 bytes overall.
(We lose 2 bytes because we use immediate load to R15)
2019-10-12 13:01:08 +05:00
..
stage0_monitor.hex0 reduce stage0_monitor size by 6 bytes (toggle default zero, use mux) 2019-10-12 13:01:08 +05:00
stage0_monitor.s reduce stage0_monitor size by 6 bytes (toggle default zero, use mux) 2019-10-12 13:01:08 +05:00