Friday, 21 June 2013
This is not totally consistent because the LCD design is set up for manufacturing not developing. Coders work round oddities to keep the manufacturing costs down.
Next thing to do is to wire this up to the actual emulated CPU and get some real code running.
The CPU core has run real code, mainly to test that it's functioning at the right speed - I set up 16 nibbles as a decimal counter and set it going. Multiplying the number of instruction cycles per loop by the counter gives you a rough total of the cycles done, and it can be timed with a watch (approximately).
This is what the code looks like (the first bit zeros data memory, not guaranteed on reset).
lbl 0,0 ; clear row 0
nocarry: ; come back here to increment counter
lbl 0 ; point to first digit
lda 0 ; add 1 to digit
lda 0 ; retrieve , add 6 for decimal overflow
exci 0 ; dec overflow, write the zero back and bump BL.
t increment ; loop back don't set B to zero as inc next digit.
The keyboard and sound has to be done too but these are much simpler.