Sunday, 10 January 2016

Moving on apace ......

The monitor moves on apace.

Firstly the quiz question.

The problem was I had SIO working backwards. Instead of reading into bit 0, shifting the others left, and outputting bit 7, it works the other way round – bit 7 is the input bit, bit 0 goes to the SOUT latch and the data is shifted right.

So LDI 0x80 ; XAE ; SIO which is supposed to set the SOUT Flag (this is the start bit) wouldn’t do anything (well, it would clear SOUT…. which is connected to Bit 0)

Anyway, that is fixed and I have written the bulk of the arithmetic routines – addition and subtraction (easy) , multiplication (bit harder) and division (messy).  I prototyped them in python, this should be in the documents directory.

The missing bits ; division is unsigned at the moment and doesn’t test for division by zero.

I’ve got about 364 bytes left, plus some set-up-to-test code so its probably about 400 bytes or so, so looks like most of the goodies are going to fit. I might look at other mathematical operations.

We shall see.

No comments:

Post a Comment