home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib27a.dsk
/
MARCH.1986
/
LIST.CREATE.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
5KB
|
113 lines
10 REM *******************************
20 REM * LIST.CREATE *
30 REM * BY J.R. VOKEY *
40 REM * COPYRIGHT 1986 *
50 REM * BY MICROSPARC, INC. *
60 REM * CONCORD, MA 01742 *
70 REM *******************************
80 REM =================================
90 REM Initialize
100 REM =================================
110 TEXT : HOME
120 PRINT CHR$(4)"BRUN PROCOMREC"
130 HMEM = PEEK(116) *256: HIMEM: HMEM
140 USER = HMEM +4 *256 +215
150 BUFFER = HMEM +5 *256:STRTBUF = BUFFER: REM USER command buffer
160 PRINT : PRINT "LOADING USER-LIST";
170 REM =================================
180 REM Word Substitution Macros
190 REM =================================
200 READ CMD$: REM Get word macro name
210 DATA ERROR
220 DATA "PRINT PEEK(218)+PEEK(219)*256": REM LINE NUMBER OF LAST ERROR
230 REM
240 REM (DATA statements for other word macros go here)
250 REM
260 DATA //: REM End of word macros
270 FOR WHILE = 0 TO 1: REM While NOT end-of-words DO
280 REM Add CTRL-H (BS) to delete word
290 FOR I = 1 TO LEN(CMD$):CMD$ = CMD$ + CHR$(8): NEXT I
300 REM Get macro code
310 READ MACRO$
320 REM Construct macro
330 MACRO$ = CMD$ +MACRO$
340 REM Stuff into buffer
350 GOSUB 1020
360 REM Get next word-macro
370 READ CMD$:WHILE = (CMD$ = "//")
380 NEXT WHILE
390 REM =================================
400 REM Key Substitution Macros
410 REM =================================
420 READ MACRO$: REM Get key macro
430 DATA *CALL-151,<LOAD,>SAVE,=CATALOG,@HOME,":POKE33,33",+TEXT
440 REM
450 REM (DATA statements of other key macros go here)
460 REM
470 DATA //: REM End of key macros
480 FOR WHILE = 0 TO 1: REM While NOT end-of-keys DO
490 REM Assign key macro to CMD$ with <BS>
500 CMD$ = LEFT$(MACRO$,1) + CHR$(8)
510 REM Construct macro
520 MACRO$ = CMD$ + MID$ (MACRO$,2)
530 REM Stuff into buffer
540 GOSUB 1020
550 REM Get next key macro
560 READ MACRO$:WHILE = (MACRO$ = "//")
570 NEXT WHILE
580 REM =================================
590 REM Completion Commands
600 REM =================================
610 READ MACRO$: REM Get completion command
620 DATA BLOAD,BSAVE,BRUN,CREATE,OPEN,CLOSE,WRITE,CATALOG,POSITION,APPEND,CHAIN,FLUSH,PREFIX
630 DATA "D$=CHR$(4)
640 REM
650 REM (DATA statements for other completion commands go here)
660 REM
670 DATA //: REM End of Completion commands
680 FOR WHILE = 0 TO 1: REM While NOT end-of-Completion DO
690 REM Stuff command into buffer
700 GOSUB 1020
710 REM Get next Completion command
720 READ MACRO$:WHILE = (MACRO$ = "//")
730 NEXT WHILE
740 REM =================================
750 REM Messages
760 REM =================================
770 READ MACRO$: REM Get message
780 DATA "?HELP:!PRODOS COMMAND RECOGNITION!BY J.R. VOKEY!COPYRIGHT 1986 MICROSPARC, INC.!!<CTRL-A> - RECOGNITION ON COMMAND!<CTRL-Z> - AUTOMATIC RECOGNITION!USE <CTRL-A> TO CANCEL AUTO-MODE"
790 REM
800 REM (DATA statements of other messages go here)
810 REM
820 DATA //: REM End of messages
830 FOR WHILE = 0 TO 1: REM While NOT end-of-messages DO
840 REM Append <CANCEL> to MACRO$
850 MACRO$ = MACRO$ + CHR$(24)
860 REM Stuff message into buffer
870 GOSUB 1020
880 REM Get next message
890 READ MACRO$:WHILE = (MACRO$ = "//")
900 NEXT WHILE
910 REM =================================
920 REM Save USER list
930 REM =================================
940 REM Set USER vector
950 STRTBUF = STRTBUF -1: POKE USER +1,STRTBUF/256: POKE USER,STRTBUF - INT(STRTBUF/256) *256
960 REM SAVE USER-list
970 PRINT CHR$(4)"BSAVE COMREC.USER,A"STRTBUF +1",L"BUFFER -STRTBUF
980 REM Inform USER
990 PRINT : PRINT : PRINT "PROCOMREC AND USER-LIST ARE LOADED"
1000 PRINT : PRINT "TYPE: ?HELP <CTRL-A> FOR HELP"
1010 END
1020 REM =================================
1030 REM Buffer Stuffer
1040 REM =================================
1050 FOR I = 1 TO LEN(MACRO$)
1060 REM Convert ! --> <CR>
1070 CHAR$ = MID$ (MACRO$,I,1): IF CHAR$ = "!" THEN CHAR$ = CHR$(13)
1080 POKE BUFFER, ASC(CHAR$) +128 *(I = LEN(MACRO$))
1090 BUFFER = BUFFER +1
1100 IF BUFFER >(HMEM +9 *256 -1) THEN PRINT CHR$(7)"BUFFER OVERFLOW - PROGRAM TERMINATED": POP : END
1110 NEXT I: PRINT ".";
1120 POKE BUFFER,0: REM Mark EOL
1130 RETURN