Histogram

A histogram is essential to examine random numbers. Or generally, noisy numbers, such as come from a/d conversion. The numbers are binned; the number of occurrences in each bin counted and displayed. In this case, there are 256 bins.

Memory

Of course, there must be 256 words of memory to store the counts. With the Eval board, this could be external RAM. But here's a chance to use neighbors' memory, in this case using 5 nodes (509, 510, 511, 512 and 513). The first 4 can store 51 words, the remaining 13 being used for code. The last can store 56, for a total of 260.

go

An infinite loop. The histogram node (609) talks to the first memory node (509). There are 3 instructions Reading is slow, since the number must ripple back. But, in the case of a histogram, you only read one word per scan line.

The others are fast, since several instructions can be rippling through the nodes at the same time.

The last memory node does not need 5 words of forwarding code. So it can start using memory at that point (3d) and wrapping from 3f to 0.

1+

This code, at address 51, will be executed to increment a bin

Histogram

Drawing the histogram uses run-length video.

go

An infinite loop

init

It's convenient to load node 610 before 609. Yet 610 would start sending numbers before 609 is ready. So 610 waits for a number from 609, which obliges with !.

610 executes a @b from the loading port during init. This code @b go must be in the same word so that loading can complete while 610 is waiting.