Closed fourstix closed 2 years ago
David Madole was kind enough to review the code and suggested a fix and an improvement.
1) An error in properly initializing R7 after the DMA is causing random failures. The code:
ghi r0 phi r7
Should be changed to:
ghi r3 phi r7
2) The code for Enabling interrupts is leaking a byte on the stack.
ldi 23h ; x=2, p=3 str r2 ; r2 is stack ptr in Elf/OS ret ; turn on interrupts
Would be better done as:
sex r3 ret ; turn on interrupts db 23h ; x=2, p=3
These changes have been made and tested and work great. Many thanks to @dmadole for his help!
Source code, binary file and library file updated and published in release v4.0.4
David Madole was kind enough to review the code and suggested a fix and an improvement.
1) An error in properly initializing R7 after the DMA is causing random failures. The code:
Should be changed to:
2) The code for Enabling interrupts is leaking a byte on the stack.
Would be better done as:
These changes have been made and tested and work great. Many thanks to @dmadole for his help!