; ; 1 ; *********************************** ; * SSB-MPF DEMO_SUBROUTINE.S * ; *********************************** ; ;COPYRIGHT, MULTITECH INDUSTRIAL CORP. 1982. ;Written by Yung Jui Chen, R&D department. ;ROUTINE address is 5200H ;Speech subroutine utility ;User give speech data address then call ;this routine ;For example, LD HL,6000H ; CALL START ; or CALL 5200H ; then it will speak the word at address 6000H ; PORT EQU 0FEH ; I/O address of SSB-MPF ORG 5200H ; assembly program start ; address START LD B,10H ; reset counter RESET LD A,0FFH ; TMS 5200 reset code is ; *111**** OUT (PORT),A ; send the reset command CALL DELY DJNZ RESET ; reset routine LD A,60H ; enable speak external ; command OUT (PORT),A ; VSP ready CALL DELY SEND1 LD A,(HL) ; fetch speak data OUT (PORT),A ; send data to TMS 5200 CALL DELY INC HL ; next data IN A,(PORT) ; read the status of VSP BIT 7,A ; check talking status JR Z,SEND1 ; need more data to VSP SEND2 LD A,(HL) ; load next data of ; send1 loop OUT (PORT),A ; send data continue CALL DELY INC HL ; next address IN A,(PORT) ; check the talk status ; activate or not BIT 7,A ; get the stop code? JP NZ,SEND2 ; if no,send the rest ; data and check RET ; if yes,complete progra ; return to main prog. DELY PUSH BC ; delay routine LD B,0FFH ; delay counter DJNZ $- POP BC RET