On Monday 03 December 2001 00:44, you wrote:

> ORG #9000
>       IN A, (#A8)
>       PUSH AF
>       OR #03
>       OUT (#A8), A
>       LD A, <address>
> BUSY  LD (#3FF0), A
>       AND #80
>       JRNZ BUSY
>       LD A, <data>
>       LD (#3FF1), A
>       POP AF
>       OUT (#A8), A
>       EI
>       RET
>
> This routine simply hung, presumably on the loop that waits for the YM2164
> status register to return a not busy signal (bit 7 = 0). Any ideas why,
> and what I should do differently / add to this?

First of all, you forgot the "DI" statement at the start. Switching the 
interrupt routine (#0038) away is a bad idea. Maybe your actual program did 
have "DI" though, since you do have an "EI" at the end of the program.

Second, the BUSY loop does not read any status register. So it will be 
executed either once or forever, depending on bit7 of <address>.

Bye,
                Maarten
--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html

Reply via email to