Early in my career in late ‘80s, I was troubleshooting asynchronous communication protocol used for semiconductor equipment. These where streams of data packages carried over an RS-232 serial cable in a hierarchical format that you can think of like XML. These were request/reply messages, but asynchronous. In order to understand which reply messages paired to which request messages, the protocol allowed for 4 “context bytes” in the header of every message. If you send over a context ID of 100 in a request, the reply or replies will include that same 100. Also for your mental imagery, please see me just a year out of college, sitting by myself in a bunny suit in a massive and noisy clean room, sweety hands in latex gloves, and usually fogged up safety goggles because of the mask over my face.
I was troubleshooting a new interface for a piece of equipment from a company called Lambda Ace. Metrology equipment like this one in semiconductor fabs at that time were poor in this protocol. In this case, the context IDs that came back from the tool appeared to be random and far off from what I was sending. I typically sent small numbers and it was sending me huge numbers. I started looking for patterns in the data and once I looked at this in Hex, it all started to come together. The last 2 bytes were always 0x4C and 0x41. In the text version of the Hex dump, it showed those were the ASCII values for the characters L and A, or Lambda Ace.
I was on an Intel processor which stored bytes in little-endian, so those last 2 bytes were higher order bits making the 4 byte number quiet large. The hack was to figure out the constant from 0x4C41 that I always needed to subtract from my reply's context bytes. I also had to be sure I kept my set of context bits to values that fit in the lower order 2 bytes. It was a kludgy hack for sure and I’m sure broke again with future tools of this type.