Prev: F043 Up: Map Next: F092
F04F: Routine at F04F
Used by the routine at EFD5.
F04F LD A,($EB39) Jump to SetDefault if *EB39 is equal to 00.
F052 CP $00
F054 JR Z,SetDefault
F056 XOR A A=00.
F057 JR $F05B Jump to F05B.
SetDefault F059 LD A,$05 A=05.
F05B LD ($F043),A Write A to *F043.
F05E LD ($F047),A Write A to *F047.
F061 LD B,$02 B=02.
F063 LD DE,($F045) DE=*F045.
F067 DEC DE Decrease DE by one.
F068 LD A,D Jump to F067 if DE is not zero.
F069 OR E
F06A JP NZ,$F067
F06D LD A,($F043) A=*F043.
F070 XOR %00010000 Flip the speaker bit.
F072 LD ($F043),A Write A to *F043.
F075 OUT ($FE),A Set border to the colour held by A.
F077 DJNZ $F063 Decrease counter by one and loop back to F063 until counter is zero.
F079 LD B,$02 B=02.
F07B LD DE,($F049) DE=*F049.
F07F DEC DE Decrease DE by one.
F080 LD A,D Jump to F07F if DE is not zero.
F081 OR E
F082 JP NZ,$F07F
F085 LD A,($F047) A=*F047.
F088 XOR %00010000 Flip the speaker bit.
F08A LD ($F047),A Write A to *F047.
F08D OUT ($FE),A Set border to the colour held by A.
F08F DJNZ $F07B Decrease counter by one and loop back to F07B until counter is zero.
F091 RET Return.
Prev: F043 Up: Map Next: F092