(FILECREATED " 2-Dec-84 13:31:27" {ERIS}<SPEECH>PROSE>COMMUNICARD.;12 13411 changes to: (FNS ANSWERING.MACHINE GET.MESSAGES STORE.MESSAGE WAIT.FOR.CALL PLAYIT TEST.RECORD DIAL.DIGIT DIAL STATUS TONE? TEST.TONE TEST.PLAY COMMUNICARD.SETUP OFF.HAND OFF.HOOK OFF.LINE OFF.PHONE ON.HAND ON.HOOK ON.LINE ON.PHONE RINGING? TEST INIT.ANSWERING.MACHINE CORRECT TEST.PLAY.FILE INP OUT HEX POLL) (VARS COMMUNICARDCOMS SMEAR.LIMIT SLOW.LIMIT FAST.LIMIT BEEP.LIMIT BACKWARDS.LIMIT SPEECH3.LIMIT SPEECH2.LIMIT SPEECH1.LIMIT RESPONSE.LIMIT SPEECH.THRESHOLD RDY TONE MONITOR HAND ENB LINE PHONE OH DATA DTMF RST CTRL AROUNDEXITFNS BANK) previous date: "30-Nov-84 17:10:18" {ERIS}<SPEECH>PROSE>COMMUNICARD.;1) (* Copyright (c) 1984 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT COMMUNICARDCOMS) (RPAQQ COMMUNICARDCOMS ((VARS BACKWARDS.LIMIT BANK BEEP.LIMIT CTRL DATA DTMF ENB FAST.LIMIT HAND LINE MONITOR OH PHONE RDY RESPONSE.LIMIT RST SLOW.LIMIT SMEAR.LIMIT SPEECH.THRESHOLD SPEECH1.LIMIT SPEECH2.LIMIT SPEECH3.LIMIT TONE) (FNS ANSWERING.MACHINE COMMUNICARD.SETUP CORRECT DIAL DIAL.DIGIT GET.MESSAGES HEX HEXCHAR INIT.ANSWERING.MACHINE INP OFF.HAND OFF.HOOK OFF.LINE OFF.PHONE ON.HAND ON.HOOK ON.LINE ON.PHONE OUT PLAYIT POLL RECORDIT RINGING? STATUS STORE.MESSAGE TEST TEST.PLAY TEST.PLAY.FILE TEST.RECORD TEST.TONE TONE? WAIT.FOR.CALL))) (RPAQQ BACKWARDS.LIMIT 5000) (RPAQQ BANK 4) (RPAQQ BEEP.LIMIT 2000) (RPAQQ CTRL 630) (RPAQQ DATA 631) (RPAQQ DTMF 628) (RPAQQ ENB 8) (RPAQQ FAST.LIMIT 5000) (RPAQQ HAND 16) (RPAQQ LINE 4) (RPAQQ MONITOR 32) (RPAQQ OH 1) (RPAQQ PHONE 2) (RPAQQ RDY 128) (RPAQQ RESPONSE.LIMIT 30000) (RPAQQ RST 629) (RPAQQ SLOW.LIMIT 5000) (RPAQQ SMEAR.LIMIT 5000) (RPAQQ SPEECH.THRESHOLD 128) (RPAQQ SPEECH1.LIMIT 30000) (RPAQQ SPEECH2.LIMIT 5000) (RPAQQ SPEECH3.LIMIT 5000) (RPAQQ TONE 64) (DEFINEQ (ANSWERING.MACHINE [LAMBDA NIL (* hdj " 2-Dec-84 13:27") (PROG (PHONEMESSAGESTREAM) (SETQ PHONEMESSAGESTREAM (OPENSTREAM (QUOTE {DSK}<SPEECH>MESSAGES.SPEECH) (QUOTE APPEND))) (printout STATUSSTREAM "-- Started at " (DATE) " --" T) (while (WAIT.FOR.CALL) do (OFF.HOOK) (printout STATUSSTREAM "call at " (DATE) T) (PLAYIT SPEECH1.ARRAY SPEECH1.LIMIT) (PLAYIT BEEP.ARRAY BEEP.LIMIT) (RECORDIT RESPONSE.ARRAY RESPONSE.LIMIT) (PLAYIT SPEECH2.ARRAY SPEECH2.LIMIT) (PLAYIT RESPONSE.ARRAY RESPONSE.LIMIT) (PLAYIT BACKWARDS.ARRAY BACKWARDS.LIMIT) (PLAYIT RESPONSE.ARRAY RESPONSE.LIMIT (QUOTE BACKWARDS)) (PLAYIT SLOW.ARRAY SLOW.LIMIT) (PLAYIT RESPONSE.ARRAY RESPONSE.LIMIT (QUOTE SLOW)) (PLAYIT FAST.ARRAY FAST.LIMIT) (PLAYIT RESPONSE.ARRAY RESPONSE.LIMIT (QUOTE FAST)) (PLAYIT SMEAR.ARRAY SMEAR.LIMIT) (PLAYIT RESPONSE.ARRAY RESPONSE.LIMIT (QUOTE SMEAR)) (PLAYIT SPEECH3.ARRAY SPEECH3.LIMIT) (BLOCK 2000) (ON.HOOK) (STORE.MESSAGE PHONEMESSAGESTREAM RESPONSE.ARRAY)) (CLOSEF PHONEMESSAGESTREAM]) (COMMUNICARD.SETUP [LAMBDA NIL (* hdj " 2-Dec-84 11:27") (BUS.RESET) (BUS.OUTPUT RST 0) (BUS.OUTPUT CTRL]) (CORRECT [LAMBDA (DATUM) (* hdj " 1-Dec-84 17:21") (if (IGREATERP DATUM 127) then (IDIFFERENCE DATUM 128) else DATUM]) (DIAL [LAMBDA (PHONE.NUMBER) (* hdj " 2-Dec-84 11:46") (PROG ((STRING (SUBSTRING PHONE.NUMBER 1))) (for X from 1 to (NCHARS STRING) do (DIAL.DIGIT (GNC STRING]) (DIAL.DIGIT [LAMBDA (DIGIT) (* hdj " 2-Dec-84 12:07") (if (ZEROP DIGIT) then (SETQ DIGIT 10)) (if (NUMBERP DIGIT) then (for X from 1 to DIGIT do (PRIN3 ".") (ON.HOOK) (BLOCK 200) (OFF.HOOK) (BLOCK 100)) (TERPRI) (BLOCK 2000]) (GET.MESSAGES [LAMBDA NIL (* hdj " 2-Dec-84 13:30") (PROG [(MESSAGESTREAM (OPENSTREAM (QUOTE {DSK}<SPEECH>MESSAGES.SPEECH) (QUOTE INPUT] (WAIT.FOR.CALL) (OFF.HOOK) (while (NOT (EOFP MESSAGESTREAM)) as MESSAGE# from 1 do (printout T "Press <next> for message number " MESSAGE# T) (while (NOT (KEYDOWNP (QUOTE NEXT))) do (BLOCK)) (\BINS MESSAGESTREAM (fetch (ARRAYP BASE) of RESPONSE.ARRAY) 0 (ARRAYSIZE RESPONSE.ARRAY)) (PLAYIT RESPONSE.ARRAY (ARRAYSIZE RESPONSE.ARRAY))) (PLAYIT BEEP.ARRAY (ARRAYSIZE BEEP.ARRAY)) (ON.HOOK) (CLOSEF MESSAGESTREAM]) (HEX [LAMBDA (STR) (* hdj "30-Nov-84 16:37") (PROG (LENGTH STRING) (SETQ STRING (SUBSTRING STR 1)) (SETQ LENGTH (NCHARS STRING)) (RETURN (for X from 1 to LENGTH sum (TIMES (EXPT 16 (IDIFFERENCE LENGTH X)) (HEXCHAR (GNC STRING]) (HEXCHAR [LAMBDA (CHAR) (* hdj "30-Nov-84 16:36") (SELECTQ CHAR ((0 1 2 3 4 5 6 7 8 9) CHAR) (A 10) (B 11) (C 12) (D 13) (E 14) (F 15) NIL]) (INIT.ANSWERING.MACHINE [LAMBDA NIL (* hdj " 1-Dec-84 17:33") (* * comment) (PROG NIL (SETQ SPEECH1.ARRAY (ARRAY SPEECH1.LIMIT (QUOTE BYTE) 0 0)) (SETQ SPEECH2.ARRAY (ARRAY SPEECH2.LIMIT (QUOTE BYTE) 0 0)) (SETQ SPEECH3.ARRAY (ARRAY SPEECH3.LIMIT (QUOTE BYTE) 0 0)) (SETQ RESPONSE.ARRAY (ARRAY RESPONSE.LIMIT (QUOTE BYTE) 0 0)) (SETQ BACKWARDS.ARRAY (ARRAY BACKWARDS.LIMIT (QUOTE BYTE) 0 0)) (printout T "now run TEST.RECORD on SPEECH1.ARRAY, SPEECH2.ARRAY, SPEECH3.ARRAY, RESPONSE.ARRAY, and BACKWARDS.ARRAY." T]) (INP [LAMBDA (A) (* hdj "30-Nov-84 17:14") (BUS.INPUT A]) (OFF.HAND [LAMBDA NIL (* hdj " 2-Dec-84 11:27") (BUS.OUTPUT CTRL (LOGAND (LOGNOT HAND) (BUS.INPUT CTRL]) (OFF.HOOK [LAMBDA NIL (* hdj " 2-Dec-84 11:27") (BUS.OUTPUT CTRL (LOGOR (BUS.INPUT CTRL) OH]) (OFF.LINE [LAMBDA NIL (* hdj " 2-Dec-84 11:27") (BUS.OUTPUT CTRL (LOGAND (LOGNOT LINE) (BUS.INPUT CTRL]) (OFF.PHONE [LAMBDA NIL (* hdj " 2-Dec-84 11:27") (BUS.OUTPUT CTRL (LOGOR PHONE (BUS.INPUT CTRL]) (ON.HAND [LAMBDA NIL (* hdj " 2-Dec-84 11:27") (BUS.OUTPUT CTRL (LOGOR HAND (BUS.INPUT CTRL]) (ON.HOOK [LAMBDA NIL (* hdj " 2-Dec-84 11:27") (BUS.OUTPUT CTRL (LOGAND (BUS.INPUT CTRL) (LOGNOT OH]) (ON.LINE [LAMBDA NIL (* hdj " 2-Dec-84 11:27") (BUS.OUTPUT CTRL (LOGOR LINE (BUS.INPUT CTRL]) (ON.PHONE [LAMBDA NIL (* hdj " 2-Dec-84 11:27") (BUS.OUTPUT CTRL (LOGAND (LOGNOT PHONE) (BUS.INPUT CTRL]) (OUT [LAMBDA (A D) (* hdj "30-Nov-84 17:14") (BUS.OUTPUT A D]) (PLAYIT [LAMBDA (ARRAY LIMIT OPTION) (* hdj " 2-Dec-84 12:32") (SELECTQ OPTION [SLOW (for DATUM from 0 to (SUB1 LIMIT) do (BUS.OUTPUT DATA (ELT ARRAY DATUM)) (BUS.OUTPUT DATA (ELT ARRAY DATUM] [FAST (for DATUM from 0 to (SUB1 LIMIT) by 2 do (BUS.OUTPUT DATA (LRSH (IPLUS (ELT ARRAY DATUM) (ELT ARRAY (ADD1 DATUM))) 1] [BACKWARDS (for DATUM from (SUB1 LIMIT) to 0 by -1 do (BUS.OUTPUT DATA (ELT ARRAY DATUM] [SMEAR (for DATUM from 0 to (IDIFFERENCE LIMIT 3) do (BUS.OUTPUT DATA (ELT ARRAY (IPLUS DATUM 2))) (BUS.OUTPUT DATA (ELT ARRAY (IPLUS DATUM 1))) (BUS.OUTPUT DATA (ELT ARRAY DATUM] (for DATUM from 0 to (SUB1 LIMIT) do (BUS.OUTPUT DATA (ELT ARRAY DATUM]) (POLL [LAMBDA (ADDR DATA) (* hdj "30-Nov-84 16:18") (BUS.OUTPUT ADDR DATA]) (RECORDIT [LAMBDA (ARRAY LIMIT) (* hdj " 1-Dec-84 17:00") (BUS.OUTPUT DATA SPEECH.THRESHOLD) (for DATUM from 0 to (SUB1 LIMIT) do (SETA ARRAY DATUM (BUS.INPUT DATA]) (RINGING? [LAMBDA NIL (* hdj " 2-Dec-84 11:26") (ZEROP (LOGAND MONITOR (BUS.INPUT CTRL]) (STATUS [LAMBDA NIL (* hdj " 2-Dec-84 12:03") (PROG (STATUS) (SETQ STATUS (BUS.INPUT CTRL)) (printout T "Status: ") (printout T (if (ZEROP (LOGAND OH STATUS)) then "on" else "off") "hook/" (if (ZEROP (LOGAND PHONE STATUS)) then "" else "no ") "phone/" (if (ZEROP (LOGAND LINE STATUS)) then "off" else "on") "line/" (if (ZEROP (LOGAND HAND STATUS)) then "off" else "on") "hand/" (if (ZEROP (LOGAND MONITOR STATUS)) then "" else "not ") "ringing/" (if (ZEROP (LOGAND TONE STATUS)) then "no " else "") "tone " T]) (STORE.MESSAGE [LAMBDA (FILE SAMPLE) (* hdj " 2-Dec-84 13:31") (\BOUTS FILE (fetch (ARRAYP BASE) of SAMPLE) 0 (ARRAYSIZE SAMPLE]) (TEST [LAMBDA NIL (* hdj " 2-Dec-84 11:27") (while T do (if (RINGING?) then (OFF.HOOK) (BUS.OUTPUT DATA SPEECH.THRESHOLD) (for DATUM from 0 to (SUB1 SPEECH.LIMIT) do (SETA SPEECHARRAY DATUM (BUS.INPUT DATA))) (ON.HOOK]) (TEST.PLAY [LAMBDA (ARRAY LIMIT OPTION) (* hdj " 2-Dec-84 11:24") (while T do (if (RINGING?) then (OFF.HOOK) (PLAYIT ARRAY LIMIT OPTION) (ON.HOOK]) (TEST.PLAY.FILE [LAMBDA (FILE) (* hdj " 1-Dec-84 17:13") (while T do (if (RINGING?) then (OFF.HOOK) (for DATUM from 0 to (SUB1 SPEECH.LIMIT) do (BUS.OUTPUT DATA (BIN FILE))) (ON.HOOK]) (TEST.RECORD [LAMBDA (ARRAY LIMIT) (* hdj " 2-Dec-84 12:26") (while T do (if (RINGING?) then (OFF.HOOK) (BUS.OUTPUT DATA SPEECH.THRESHOLD) (PRIN1 "Recording... ") (RECORDIT ARRAY LIMIT) (printout T "done." T) (PLAYIT ARRAY LIMIT) (BLOCK 1000) (ON.HOOK) (BLOCK 3000]) (TEST.TONE [LAMBDA NIL (* hdj " 2-Dec-84 12:20") (PROG (THE.TONE) (while T do (BLOCK) (COND ((RINGING?) (OFF.HOOK) (BLOCK 2000) (COND ((NOT (ZEROP (LOGAND (BUS.INPUT CTRL) TONE))) (printout T "tone " (BUS.INPUT DTMF) T) (BUS.OUTPUT DTMF 0))) (ON.HOOK]) (TONE? [LAMBDA NIL (* hdj " 2-Dec-84 12:10") (COND ((ZEROP (LOGAND (BUS.INPUT CTRL) TONE)) NIL) (T (PROG1 (LOGAND 15 (BUS.INPUT DTMF)) (BUS.OUTPUT DTMF 0]) (WAIT.FOR.CALL [LAMBDA NIL (* hdj " 2-Dec-84 13:27") (while [AND (NOT (RINGING?)) (NOT (KEYDOWNP (QUOTE STOP] do (BLOCK)) (NOT (KEYDOWNP (QUOTE STOP]) ) (PUTPROPS COMMUNICARD COPYRIGHT ("Xerox Corporation" 1984)) (DECLARE: DONTCOPY (FILEMAP (NIL (2033 13329 (ANSWERING.MACHINE 2043 . 3335) (COMMUNICARD.SETUP 3337 . 3524) (CORRECT 3526 . 3728) (DIAL 3730 . 3986) (DIAL.DIGIT 3988 . 4382) (GET.MESSAGES 4384 . 5212) (HEX 5214 . 5605) (HEXCHAR 5607 . 5865) (INIT.ANSWERING.MACHINE 5867 . 6642) (INP 6644 . 6766) (OFF.HAND 6768 . 6957) ( OFF.HOOK 6959 . 7132) (OFF.LINE 7134 . 7323) (OFF.PHONE 7325 . 7494) (ON.HAND 7496 . 7662) (ON.HOOK 7664 . 7850) (ON.LINE 7852 . 8018) (ON.PHONE 8020 . 8210) (OUT 8212 . 8337) (PLAYIT 8339 . 9334) (POLL 9336 . 9468) (RECORDIT 9470 . 9726) (RINGING? 9728 . 9889) (STATUS 9891 . 10765) (STORE.MESSAGE 10767 . 10977) (TEST 10979 . 11349) (TEST.PLAY 11351 . 11592) (TEST.PLAY.FILE 11594 . 11906) (TEST.RECORD 11908 . 12323) (TEST.TONE 12325 . 12780) (TONE? 12782 . 13053) (WAIT.FOR.CALL 13055 . 13327))))) STOP