CRC16 routine for 8-bit platforms

Some time ago I stumbled over some CRC implementations on the very intersting Acorn’s BBC site BeebWiki.
Among several variants for different CPUs and languages (assembler, BASIC) an implementation for the Motorola 6809 was still missing. So, I provide my 6809 version. Beside the assembler versions there is also a BBC BASIC version available … and it looks so easy and nice. This challenges me to get the question answered if this is also possible for my past days preferred language BASIC on a Commodore 64. CBM BASIC V2 is far from being comparable to BBC BASIC, but it should be feasible either.
To spoiler the result: Yes, I managed to get a it running, but to be honest, BASIC V2 has truly not the elegance BBC BASIC has. See my repository on Github.

The main issue is the cumbersome handling of integer values to take advantage of the built-in AND, OR and NOT operators for bitwise handling of 16 bit values. Instead of the expected range from 0 to 65535 the integer range is in signed representation ranging from -32768 to +32767. Converting it to binary or doing a simple “left shift” needs some special case handling for negative and positive values.
One might get a grasp on it following the following blog article …

Misleading GUIs …

Recently I had the opportunity to help my girlfriend on her home-work. She had to accomplish several task on a business application which manages invoices, suppliers and so on. The GUI design might send some warning signals already … some 90 years spirit peeked out of the GUI design. Looked a bit Windows95ish, but the program could have its root in the 80’s too. I’m coming back this theory later.
But what happened? She got stuck into a specific task, where she has to create a new supplier account entry. A pop-up window appeared which could be easily filled out. After finishing it up, she was left alone in finishing it up and acknowledge her input. Just wondering, no OK or finish button. Just the X button on upper right, part of the window frame. Maybe the Return key has to be taken to finalize the form? Wrong – nothing happened. Did the form took the input automatically? Nope. All data disappeared, still no new supplier account to select.

Some tryouts later, a breakthrough. While experimenting I saw that the menu bar changed while pop-ups come and go. It seems that the whole GUI concept has been centered to the menu bar. And there it goes: on the left of the menu bar they placed icons which seem to be present on all occasions, namely a checking sign and an abandon sign. How the hell would the programmer of this GUI expect to focus on this static icons instead of providing an ok and abandon button right in the pup-up frame itself?  Now we got it! Just click the check button in the menu bar to acknowledge the data in the pop-up window. How easily – if one knows. Truly, not a joke, just wondering such thing still happens in 2018, quite a while distant from the 90’s.

After then I’ve just thinking of how text base programs during the 80’s worked. Not based on  windows they followed a hierarchical menu structure. To make it easier some fixed parts of the screen provided status information or expected standard actions (yes/no questions) to acknowledge inputs from the main screen content (which may stretch over several pages). This makes sense, because even you are deep into the menu hierarchy a user knows always where basic information can be seen and acknowledgment input are expected. There is just on single context, one layer the user sees. But taking this concept over into the world of windowing based GUIs may lead to cumbersome system concepts. One example could be the one described above. Just a guess, how such a crap GUI has been survived into our days …