First get the test case to compile.  This means first adjusting the include path.
The first problem is that there is no uch thing as an 'sfr' (Special function register) in standard C.
We added a #include test-double and put it into the test directory.  The makefile finds test/REG1210.h version that changes the sfr's into ints.
After adding the produciton code file to the build, it complains about the original REG1210.h.  So we have to adjust the include path to look for the test double in the test directory
The 'xdata' extension stops the compile. We can get rid of it by #defining it away in REG1210.h
The we do the same thing, making 'code' go away
To get rid of 'at' we need a macro, call it AT. We need versions for on and off-target. Because we don't want to touch REG1210.h, we choose to force incldue these headers.
Another minor edit is needed to use macros instead of the 'interrupt' and 'using' extensions.  These too are added to the forced includes for on and off-target
To get past unsupported binary literals, I wrote a #define generator for all binary literals creating binary_byte_literals.h. The included it in the forced include files.  The production code then just needs the leading '0' removed from binary literals. (This code has no abstaction)
Now that the compile problems are done, the linker complains about undefined external references to the faked registers.  They have all been declared as ints, so create the associated global definitions. Also realize the test will go into an infinite loop as the test calls say_hi().  Globals don't change state as registers do.
Because we cannot make globals act like registers, we need a macro that use can use to intercept and control register interactions.   I defined READ_REG for on and off-target. Off-target we use CppUMock to fake out the registers. Next we'll put it use.  The tests still go into an infinite loop
Now that READ_REG is in the function being called by the test, it fails at the first unexpected READ_REG. Time to add some expectations.
We've got some expectations now, but we did nto do the proper house keeping with CppUMock.  Add that next.
Cleaned up the mock, added WRITE_REG for on and off target.
The binary constants are not recognized in the test.cpp file?
Should add the forced include to CPPFLAGS. It is for the preprocessor, not just C.  Also fixed a test typo EI->IE.
Refactor the tests, extract helper functions to cut down on the noise.
Notice the order of the expectations are not enforced. Here the order is critical. Fix that next
The code is in the test harness. We have a proof of concept of how to test similar code.