This prose is close enough to a spec to write some C code for format A. I assume hardware (DMA) that deposits link data in memory in the order so that integers from the link are in memory so that a normal load command from the address where the hardware put it, results in the right integer. This means for little endian machines, depositing the bytes in decreasing addresses. To port such code between machines of different endianness it is necessary to: I will come back and make this precise after I have debugged and ported some code.

For this code the packet header (money & SS) comes first for those systems that may be in a position to perform routing logic before the entire packet has arrived.

Both of the stabs below emphasize simplicity as a means to speed. In the 2nd I store turn ops in characters to speed and simplify the code at the expense of packet size.


DMA architectures have gone many ways according to this. Hyper transport may be involved. I will assume here a DMA that moves a stream of bytes from fiber to contiguous real memory in order of decreasing significance, which means towards smaller addresses on a little endian machine. A maximum byte count is specified by the program