Fixed a serious bug where I was using the A7 register without thinking.
I am breaking terry's code for the moment to do a bit of test work.