Routines |
Prev: 64926 | Up: Map | Next: 64990 |
Used by the routine at Handler_TickerNews.
|
||||
|
||||
Sounds_Telecast | 64964 | LD B,10 | B=10 (counter). | |
Sounds_Telecast_Loop | 64966 | CALL RandomNumber | Get a random number which is either 0 or 1. | |
64969 | AND %00000001 | |||
There's a 50/50 chance of playing either melody 3 or melody 7.
|
||||
64971 | LD A,7 | A=melody 7. | ||
64973 | JR Z,Sounds_Telecast_Write | Jump to Sounds_Telecast_Write if the random number was 0. | ||
64975 | LD A,3 | A=melody 3. | ||
Sounds_Telecast_Write | 64977 | LD (65421),A | Write melody ID to MelodyID. | |
64980 | PUSH BC | Stash the note counter on the stack. | ||
64981 | CALL PlaySounds | Call PlaySounds. | ||
64984 | POP BC | Restore the note counter from the stack. | ||
64985 | HALT | Halt operation (suspend CPU until the next interrupt, and do this twice). | ||
64986 | HALT | |||
64987 | DJNZ Sounds_Telecast_Loop | Decrease counter by one and loop back to Sounds_Telecast_Loop until counter is zero. | ||
64989 | RET | Return. |
Prev: 64926 | Up: Map | Next: 64990 |