Re: MK14 and MIDI
The 40 is hex, it effectively just sets bit 6 in AC register, which gets rotated right, eventually setting bit 7 to end loop after 8 data bits sent out from E register.
I could have used ORI 40 - but then ORI is only 10 timing cycles - ADI 40 is perfect being 11 since the data bits need to be exactly 32uS long.
But using ADI means I need to make sure the carry link is clear, which means using CCL - which again is perfect since I needed to pad out start bit by 5 cycles to 32uS before first data bit.
Another nice twist was I ended up with FF for stop bit exactly 32uS after last data bit sent.
__________________
David
Last edited by Silvester; 26th Aug 2022 at 4:55 pm.
Reason: 'stop' bit, last sentence
|