 ' Start this pgm then power up talker board

 CLOSE : CLS
 OPEN "allphons.bin" FOR BINARY AS #1
 OPEN "COM1:4800,N,8,2,CD0,CS0,DS0,OP0,TB2048,RB2048" FOR RANDOM AS #2
 OPEN "phonsbak.bin" FOR OUTPUT AS #3

PRINT "Writing allphons.bin to EEPROM..."
 FOR j = 0 TO 1023
    WHILE EOF(2): WEND
    a$ = INPUT$(1, 2)
    PRINT ASC(a$); "of 255", , j; "of 1023"
    IF ASC(a$) <> INT(j / 4) THEN PRINT "error"
    a$ = INPUT$(64, 1)
    PRINT #2, a$;
NEXT

PRINT "Reading EEPROM contents back into phonsback.bin"
FOR j = 0 TO 1023
    a$ = INPUT$(64, 2)
    PRINT "Page"; j; "of 1023 received"
    PRINT #3, a$;
NEXT

CLOSE

PRINT "Comparing allphons.bin and phonsbak.bin"
 OPEN "allphons.bin" FOR BINARY AS #1
 OPEN "phonsbak.bin" FOR BINARY AS #2
 FOR j = 0 TO 1023
 PRINT j; "of 1023"
 a$ = INPUT$(64, 1)
 b$ = INPUT$(64, 2)
 IF a$ = b$ THEN PRINT "match" ELSE PRINT "mismatch": BEEP: STOP
 NEXT

IF j = 1023 THEN PRINT "success"

