Studies - Program the output values of the amplitude channel music. coprocessor on the curb.

ZX Review #7-8-9-10
(C) Pozhidaev Eugene, g.Chernogorsk


   Dear Editors, I want to
offer you a program that, unlike
other similar programs, displays the values ​​of the amplitudes 
of channels Music on the coprocessor

border at the top of the screen.
Before starting the procedure, you must download from the 
address 50000 compiled music.

140.

        DI

        CALL 50000
; Initialization ringtones

        LD HL, BORD
; Generation procedure BORD

        LD DE, 800

        ADD HL, DE

        LD (HL), # C9

        LD (NSP), SP

        LD SP, HL

        EXX

        LD HL, # 003E

        LD DE, # FED3

        LD C, 16
LOOP1 LD B, 12

        EXX

        PUSH DE

        EXX
LOOP2 PUSH DE

        PUSH HL

        DJNZ LOOP2

        DEC C

        JR NZ, LOOP1

        LD SP, (NSP)
N1 EI

        HALT

        DI

        LD BC, # FFFD

        LD HL, BORD +1

        LD DE, 50

        LD A, 8

        OUT (C), A

        IN A, (C)

        CALL IND

        LD BC, # FFFD

        LD HL, BORD +9

        LD A, 9

        OUT (C), A

        IN A, (C)

        CALL IND

        LD BC, # FFFD

        LD HL, BORD +17

        LD A, 10

        OUT (C), A

        IN A, (C)

        CALL IND

        JR WR_IND
IND LD B, 16
LOOP3 LD C, 0

        CP B

        CCF

        RL C

        LD (HL), C

        ADD HL, DE

        DJNZ LOOP3

        RET
WR_IND LD BC, 352
, Which slows down the cycle
LOOP4 DEC BC

        LD A, B

        OR C

        JR MZ, LOOP4

        CALL BORD

        CALL 50006

        LD A, 127

        IN A, (# FE)

        BIT 0, A

        JR NZ, N1

        CALL 50017

        EI

        RET

NSP DEFW 0
BORD EQU $
2

   Ca. Ed.: Unfortunately, we could not
check this procedure, because
We do not have the Pentagon, and all delays in the procedure 
chosen specifically for it. Therefore, We apologize in advance 
for any possible errors. 


           *