A synth block used to spell out which parameter is an input and which is an output. That was redundant: with map, 2^K entries already mean %1..%K are the inputs and the value's bits land on the parameters after them; with a raw table, nothing needs saying at all. So 'inputs' and 'outputs' now fail with a message pointing at map/stat, and the map form derives both. Added 'stat' as the fully explicit form: 2^params values, one per input combination, which is exactly the state table the search consumes. examples/full_add_stat.r8asm is the same adder written that way and produces a byte-identical tape to the map version (95 characters), both pass the eight combination check.
19 lines
205 B
Plaintext
19 lines
205 B
Plaintext
%include "asm/lib.r8asm"
|
|
|
|
%synth fulladd_fast
|
|
params 6
|
|
map 0 1 1 2 1 2 2 3
|
|
mode layers
|
|
%endsynth
|
|
|
|
.var A 0
|
|
.var B 1
|
|
.var Ci 2
|
|
.var S 3
|
|
.var Co 4
|
|
.var T 5
|
|
|
|
fulladd_fast A B Ci S Co T
|
|
output S
|
|
output Co
|