;*************************** AMUS Program Label ****************************** ; Filename: TALKAT.M68 Date: 02/21/89 ; Category: UTIL Hash Code: 122-000-150-044 Version: 1.1 ; Initials: GR/AM Name: JAMES A. JARBOE IV ; Company: EDUCATIONAL FILMSTRIPS & VIDEO Telephone #: 4092955767 ; Related Files: WLDSCN.UNV Must also have TALKTO.LIT to function ; Min. Op. Sys.: 1.3B Expertise Level: BEG ; Special: Utility front end for TALKTO telecommunications program ; Description: Displays TALKTO script files located on DSK0:[7,0] and allows ; user to activate a selected script file by pressing a CR or EXECUTE. ; ;***************************************************************************** ;**************************************************************************** ;* * ;* TALKAT.M68 * ;* * ;* Written By: James A. Jarboe IV * ;* Educational Filmstrips & Video * ;* 1401 19th Street * ;* Huntsville, TX 77340 * ;* 409-295-5767 * ;* * ;* 07-Jan-89 * ;* GR/AM * ;**************************************************************************** ; Description: a TALKTO utility that displays the filename & comment line ; of *.TLK files in DSK0:[7,0] for automatic use with TALKTO. ; Will automatically chain to the selected SCRIPT file when ; the cursor is moved to an appropriate Script file and a ; carriage return is pressed. ; ; Options: ; TALKAT/? for help ; Notes: ; You must be a licensed user of TALKTO or program will not work. ; Public SCRIPT files (*.TLK) must be located in DSK0:[7,0]. ; TALKAT should be located on DSK0:[1,4]. ; The first line of each SCRIPT file (*.TLK) should have a comment ; line describing the SCRIPT file. TALKAT displays the first line ; of the SCRIPT file commented or not. TALKAT will disregard the ; first character of the first line of each SCRIPT file taking for ; granted that the first character is a comment character. This is ; for display purposes only and will not harm the SCRIPT file or ; harm it's activation. When a SCRIPT file is selected, by moving ; cursor bar, Press a Carriage Return and TALKAT will chain to ; TALKTO using the selected SCRIPT file. ; ; ; Notice: This program is donated to AMUS users as a programming example. ; ASMMSG " " ASMMSG "( TALKAT )" ASMMSG "( By James A. Jarboe IV )" ASMMSG "( LNKLIT with WLDSCN )" ASMMSG "( Use TALKAT/? for HELP )" ASMMSG " " SEARCH SYS SEARCH SYSSYM SEARCH TRM EXTERN $ODTIM VMAJOR =1 ; James A. Jarboe IV VMINOR =1 ; Fixed problem with less than 18 *.tlk files VEDIT =0 VSUB =0 VWHO =0 ; TALKAT was taken from an example program FILMAP by Dave Pallmann ; on usage of UltraSoft's WLDSCN routine. ; ;IMPORTANT-- WLDSCN on the AMUS Network will not work with AMOS 2.0 ; ; A5---> impure index ; A4---> wildscan DDB index ; A3---> Base of file specifications in memory ; A1---> current file specification ; D5---> number of files in memory ; D4---> current file number ; ;impure area used by TALKAT .OFINI .OFDEF INPDDB,D.DDB .OFDEF BUFFER,30. .OFDEF CURBAS,2 ; Saves current base .OFDEF TRMBUF,26. ; Terninal GOODIES .OFDEF INPBUF,512. ; Input buffer for file .OFSIZ MEMSIZ ;the following structure is used to remember the directory information in ;memory .OFINI .OFDEF F.DEV,2 ; device code .OFDEF F.DRV,2 ; drive number .OFDEF F.PPN,2 ; PPN .OFDEF F.FIL,4 ; filename .OFDEF F.EXT,2 ; extension .OFDEF F.BLK,2 ; size in blocks .OFSIZ F.SIZ DEFINE PRTTAB AA,BB PUSH D1 MOVB #AA,D1 LSLW D1,#10 MOVB #BB,D1 TCRT POP D1 ENDM DEFINE CURSOR ROW,COL MOVB ROW,D1 ROLW D1,#8. MOVB COL,D1 TCRT ENDM ;These macros are used to call WLDSCN, the wildcard directory scanner ;These are defined in WLDSCN.UNV as well DEFINE WINIT IF NDF,W.INIT,EXTERN W.INIT CALL W.INIT ENDM DEFINE WSPEC EXT IF NDF,W.SPEC,EXTERN W.SPEC CALL W.SPEC IF B,EXT,ASCII /???/ IF NB,EXT,ASCII /'EXT/ BYTE 0 ENDM DEFINE WSCAN IF NDF,W.SCAN,EXTERN W.SCAN CALL W.SCAN ENDM ;start of code START: PHDR -1,PV$RPD!PV$RSM,PH$REE!PH$REU ; program header INIT: GETIMP MEMSIZ,A5 ; allocate local memory WINIT ; initialize WLDSCN (sets up A4) USRFRE A3 ; point to free memory to file table MOV A3,A1 ; set index to table base CLR D5 ; clear file count SETOCT: JOBIDX A6 ; index user's JCB MOVW JOBTYP(A6),CURBAS(A5) ; Save term goodies ANDW #^C,JOBTYP(A6) ; force OCTAL radix TRMCHR TRMBUF(A5) ; Get terminal driver flags CMDLIN: CALL HEADER ; Set up screen CMPB @A2,#57 ; Need help? JNE 10$ ; No CALL THELP ; Yes.. then call it CRLF JMP EXIT ; Then quit. 10$: LEA A2,TLK ; Load LIB: filespec WSPEC ; process wildcard file specification JNE EXIT ; branch on invalid spec USREND A2 ; index end of free memory SUB #10,A2 ; subtract 8 bytes for good measure LOAD: CTRLC EXIT ; branch on ^C WSCAN ; get next file that matches spec JNE CKZERO ; no more - branch MOVW D.DEV(A4),F.DEV(A1) ; copy spec MOVW D.DRV(A4),F.DRV(A1) ; from a4scan MOVW D.PPN(A4),F.PPN(A1) ; DDB @A4 to MOV D.FIL(A4),F.FIL(A1) ; our internal MOVW D.EXT(A4),F.EXT(A1) ; table INC D5 ; add one to file count JOBIDX A0 ; index user's JCB again TSTW F.DEV(A1) ; defaulted device code? BNE 10$ ; no MOVW JOBDEV(A0),F.DEV(A1) ; yes - use log device code 10$: TSTW F.DRV(A1) ; defaulted drive number? BPL 20$ ; no MOVW JOBDRV(A0),F.DRV(A1) ; yes - use log device code 20$: TSTW F.PPN(A1) ; defaulted PPN? BNE 30$ ; no MOVW JOBUSR(A0),F.PPN(A1) ; yes - use log account number 30$: ADD #F.SIZ,A1 ; point index to next table entry CMP A1,A2 ; are we out of memory? JLT LOAD ; no PRTTAB 24.,1 ; Yes ... PRTTAB -1,11. ; then TYPE <%> ; tell TYPE ; em PRTTAB -1,12. ; we TYPE