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
365 B
Plaintext
19 lines
365 B
Plaintext
%include "asm/lib.r8asm"
|
|
|
|
%synth fulladd_stat
|
|
params 6
|
|
stat 0 9 10 19 12 21 22 31 0 9 10 19 12 21 22 31 0 9 10 19 12 21 22 31 0 9 10 19 12 21 22 31 0 9 10 19 12 21 22 31 0 9 10 19 12 21 22 31 0 9 10 19 12 21 22 31 0 9 10 19 12 21 22 31
|
|
mode layers
|
|
%endsynth
|
|
|
|
.var A 0
|
|
.var B 1
|
|
.var Ci 2
|
|
.var S 3
|
|
.var Co 4
|
|
.var T 5
|
|
|
|
fulladd_stat A B Ci S Co T
|
|
output S
|
|
output Co
|