.......|.....|.................|......................................................... .length 66 .tm 2 .bm 2 ;*********************************************************************** ;* * ;* BASIC.X * ;* * ;* (C) 1986 Champaign Computer * ;* Written by: Jack Shaffer * ;* * ;* Function: * ;* - Extra program to renumber a basic program written with SuperVue * ;* - Starts with 100 and increments by 10 * ;* - ^G^R starts the renumbering * ;* - SVCPY's file to VUE compatiable .BAS file and compiles * ;* * ;* These keys have been redefined: * ;* F command - copies .T file to .BAS ext. * ;* G command - like F command, then compiles .BAS file * ;* * ;* 10/01/86 Created. - jss * ;* 11/25/86 Tidied up the display when adding numbers. - jss * ;* 12/03/86 Will not number blank lines. - jss * ;* 04/08/87 Release to AMUS network. - jss * ;* * ;*********************************************************************** 'MAP BAS'NUM,6 'MAP FOUND,1 'MAP X,3 'MAP DEL'NUM,1 'MAP SIZE,6 KEY R START: 'BAS'NUM=100 'FOUND=0 'DMODE 'HOME 'DISPLAY-OFF ; Comment out this line to see a dazzling display RD'LOOP1: 'DEL'NUM=0 'INSERT RD'LOOP: 'EOL 'BEQ NO'AMP 'RANGE .. ; Don't do microspace command 'BEQ NO'AMP 'RANGE 09 'BNE NO'NUMBER 'TEXT ^D 'DEL'NUM=1 'BR RD'LOOP NO'NUMBER: 'CMP " " ; Insert a space if not already there 'BEQ NO'SPACE 'TEXT " ^U" NO'SPACE: 'CMPNUM DEL'NUM,1 'BEQ GET'OUT 'LENGTH BAS'NUM,SIZE 'SIZE=SIZE+1 'XBUF=CURSOR 'X=1 'SCANWHILE X,XBUF," " 'X=X-1 'CMPNUM SIZE,X 'BHI GET'OUT ; Stay in INSERT if size > x 'TEXT ^Q ; Go into type over mode GET'OUT: 'CURSOR=BAS'NUM 'BAS'NUM=BAS'NUM + 10 CHKLIN: 'EOL ; Skip over if blank line, SV hangs up if we don't 'BEQ NO'AMP 'FOUND=0 ; Check line for & - don't number if found 'TEXT ^N SPACHK: 'LEFT ; Back up to first non-blank 'RANGE !~ 'BNE SPACHK 'RANGE && 'BNE NO'AMP 'FOUND=1 NO'AMP: 'EOF 'BEQ DONE 'TEXT ^M 'CMPNUM FOUND,0 'BHI CHKLIN ; Line had a & 'BR RD'LOOP1 DONE: 'INSERT 'TEXT ^Q 'HOME 'DISPLAY-PAGE 'DING 'STOP .......|.....|.................|......................................................... ; finish out - do svcpy to .bas extension do F do FINISH 'chainprep "svcpy &.bas=&.t$" 'text finish^M 'stop ; go (finish) - do svcpy to .bas extension - compil do G do GO 'chainprep "svcpy &.bas=&.t$compil &.bas/m$" 'text finish^M 'stop .