view level1/modules/dwwrmess.asm @ 2897:260116065a2f lwtools-port

arcadepak: Add empty_smash.txt and empty_thexder.txt dummy files This was done in default branch in commit 9b29d654db13 but did not get into the lwtools branch. We'll probably do this differently later, but for now I'll just pick this solution. At this point everything I have spotted of useful changes in the default branch has been pushed to the lwtools branch. I have cherry-picked changes both ways in order to make a merge easier, but a real merge will probably not be useful. I did try it out and waded through merge conflicts and diff'ed the result with current lwtools branch, so I am pretty sure nothing useful will be lost.
author Tormod Volden <debian.tormod@gmail.com>
date Sat, 11 Jan 2014 18:20:09 +0100
parents c92a6c65bbd9
children c505ae3120c4
line wrap: on
line source

*******************************************************
*
* DWWriteMESS
*  
*  4/27/10 AAW - Based on John Linville's example
*
* Entry:
*    X  = starting address of data to send
*    Y  = number of bytes to send
*
* Exit:
*    X  = address of last byte sent + 1
*    Y  = 0
*    All others preserved
*


DWWrite   pshs      u,d,cc              ; preserve registers
          orcc      #$50                ; mask interrupts

txByte   ldb       ,x+                 ; get a byte to transmit
         stb       $ffe0               ; write it to the FIFO
         leay      ,-y                ; decrement byte counter
         bne       txByte              ; loop if more to send          
          
          puls      cc,d,u,pc           ; restore registers and return