F1 to submenu for various utilities
F2 to submenu for Psion suite
F3 to submenu for PD Prolog, ComputerOne Forth and DigitalPrecision SuperForth
F4 to submenu for C68 programming
F5 for escape to SuperBasic Command line
The "various utilities" submenu at this time gives only access to Qjump QRAM utilities, but I intend to add unzip, kermit, etc. The F1 key is dedicated to return to main menu.
The "Psion Suite" submenu gives access to QUILL, ABACUS, ARCHIVE and EASEL. The F2 key is dedicated to return to main menu.
The "Prolog and Forth" submenu gives access to QED for plain text editing and to one PD Edimburgh Prolog engine and my two Forth self compilers. The F3 key is dedicated to return to main menu.
The "C68 programming" submenu gives access to QED for plain text editing and to compiler, linker and make. The F4 key is dedicated to return to main menu.
To be noted : all submenus go back to main menu through the same key as was used to access them, but this is not mandatory, it was so configured by my menu map instructions. Also, in the three latter submenus, the F1 key gives access to a text editing program, either QUILL or QED.
I Splitted this boot program in two parts to clarify :
First, the menu navigation itself
Code: Select all
==================================
My new boot file, to access C68
and other programming tools
on a WIN hard disk with Qemulator
==================================
REM BOOT install commands
dev$='flp1_'
REM Loading of Superbasic extensions : TK2_EXT, etc.
a = RESPR(14638) : LBYTES dev$ & 'ptr_gen',a : CALL a
a = RESPR(10126) : LBYTES dev$ & 'wman' ,a : CALL a
a = RESPR(5036) : LBYTES dev$ & 'ramprt' ,a : CALL a
a = RESPR(9328) : LBYTES dev$ & 'qptr' ,a : CALL a
PROG_USE dev$
WINDOW#0,388,42,110,4:PAPER#0,0:INK#0,7:BORDER#0,1,7
WINDOW#1,88,216,20,4:PAPER#1,208:INK#1,7:BORDER#1,1,7
WINDOW#2,388,172,110,48:PAPER#2,0:INK#2,4:BORDER#2,1,7
OPEN#3,scr_512x34a0x222:PAPER#3,0:INK#3,4:border#3,1,0
REM A little procedure convert a notepad .txt to suit QED etc.
32500 DEFine PROCedure TXT4QL(N$)
32501 OPEN_IN #5,N$ & ".txt"
32502 OPEN_NEW #4,N$
32503 REPeat READ_LINE
32504 INPUT #5,L$
32505 L=LEN(L$)
32506 IF CODE(L$(L))=13 THEN
32507 PRINT #4,L$(1 TO L-1)
32508 ELSE
32509 PRINT #4,L$
32510 END IF
32511 IF EOF(#5) THEN EXIT READ_LINE
32512 END REPeat READ_LINE
32513 CLOSE #5
32514 CLOSE #4
32515 END DEFine TXT4QL
REM The four submenus
32600 DATA 80,7,' M A I N ',' M E N U '
32601 DATA 0,7,' ',' '
32602 DATA 0,7,' ',' '
32603 DATA 0,7,' ',' '
32604 DATA 2,7,' Qjump ',' Q/RAM ',32605
32605 om=32741 : bye : REM back to main menu
32606 bye
32607 bye
32608 bye
32609 EXEC dev$ & 'QRAM' : bye
32610 DATA 2,7,' PSION ',' QUILL '
32611 DATA 80,7,' M A I N ',' M E N U '
32612 DATA 2,7,' PSION ',' ABACUS '
32613 DATA 2,7,' PSION ',' ARCHIVE '
32614 DATA 2,7,' PSION ',' EASEL ',32615
32615 EXEC dev$ & 'quill' : bye
32616 om=32741 : bye : REM back to main menu
32617 EXEC dev$ & 'abacus' : bye
32618 EXEC dev$ & 'archive' : bye
32619 EXEC dev$ & 'easel' : bye
32620 DATA 2,7,'QED Editeur',' de textes '
32621 DATA 2,7,' PROLOG ',' Edimburgh '
32622 DATA 80,7,' M A I N ',' M E N U '
32623 DATA 2,7,' FORTH ','ComputerOne'
32624 DATA 2,7,' FORTH ','DigitalPrec',32625
32625 EXEC dev$ &'qed':bye
32626 EXEC dev$ &'prolog':bye
32627 om=32741 : bye : REM back to main menu
32628 EXEC dev$ &'forth':bye
32629 EXEC dev$ &'forth83_job':bye
32630 DATA 2,7,' C68K ',' EDIT '
32631 DATA 2,7,' C68K ',' COMPILE '
32632 DATA 2,7,' C68K ',' LINK '
32633 DATA 80,7,' M A I N ',' M E N U '
32634 DATA 2,7,' C68K ',' MAKE ',32635
32635 EXEC_W QED:C68:bye
32636 CLS#0:PRINT#0,"Compiling...";:PRINT#0,CCC$(0):C68:bye
32637 CLS#0:PRINT#0,"Linking...";:PRINT#0,CCC$(1):C68:bye
32638 om=32741 : CLS#2 : bye : REM back to main menu
32639 QF:EXEC_W MAKE,#2,#2,#2;p$ & " -t " & Q$:C68:bye
REM The main menu calling four submenus or escaping to SuperBasic
32741 DATA 208,7,' Various ',' Utilities '
32742 DATA 208,7,' PSION ',' SUITE '
32743 DATA 208,7,'Programming',' Tools '
32744 DATA 208,7,' C68 ','Development'
32745 DATA 80,7,' SUPER ',' BASIC ',32746
32746 om=32600 : PAPER#2,0:INK#2,4:CLS#2 : bye
32747 om=32610 : PAPER#2,0:INK#2,4:CLS#2 : bye
32748 om=32620 : PAPER#2,0:INK#2,4:CLS#2 : bye
32749 om=32630 : PAPER#2,0:INK#2,4:CLS#2 : C68 : bye
32750 CLS:CLS#0:PRINT#0,'Say BYE to quit SUPER BASIC':STOP
32751 DEFine PROCedure C68
32752 PAPER#2,0:INK#2,4:CLS#2:VIEW#2,dev$ &'C68'
32753 END DEFine C68
REM The menu navigation procedure "bye"
32754 DEFine PROCedure bye
32755 RESTORE om:CLS:CLS#0
32756 PAPER#3,0:INK#3,4:csize#3,0,0:cls#3:AT#3,0,7
32757 PRINT#3,' F1',,'F2',,'F3',,'F4',,'F5'
32758 FOR i = 5 TO 69 STEP 16
32759 READ p,q,p$,Q$
32760 PAPER#3,p:INK#3,q
32761 AT#3,1,i:PRINT#3,p$
32762 AT#3,2,i:PRINT#3,Q$
32763 END FOR i
32764 p = CODE(INKEY$(-1))/4
32765 IF p<58 OR p>62:GO TO 32764
32766 PAPER#3,0:READ q:GO TO p+q-58
MODE 4 : CSIZE#3,2,1:CLS#3
PRINT#3," POLKA's SuperBasic Setup'n Run !"
om=32741 : PAUSE 250:PAPER#2,0:INK#2,4:CLS#2:initform : bye
Second, the specific part implementing the C68 front-end
Code: Select all
============================================
C68 Introducing text file : MDV1_C68
============================================
When using COMPILE (F2) or LINK (F3), a setup form will replace
this HELP screen. Some of the options will be set or disabled,
depending on what this program assumes when booting and on what
you have already done since that time. The field you would most
likely modify will be highlighted: that is the filename.
Remember that you can step through the fields using the ¾ and ¿
keys. ENTER key starts compiling or linking, ESC key exits.
The SPACE BAR has different functions depending on the fields:
- sometimes it will let you step through different options.
- sometimes it will let you activate or inhibit an option.
- sometimes it will erase a field, and let you input something.
All this was meant to be intuitive. Feel free to experiment !!!
==============================================
Part of boot file MDV1_BOOT for C68 front-end
==============================================
32640 DEFine PROCedure QF: INPUT#0,"Which file ? ";P$:INPUT#0,"What goals ? ";Q$:IF p$<>"":p$="-f "&p$
32641 END DEFine
32642 DEFine PROCedure RU(PR$,PA$):Cls#2:EXEC_W dat$&PR$,#2,#2,#2;PA$:END DEFine
32643 DEFine PROCedure XX:nnn=LEN(r$(1)):RU r$(1,4 TO nnn-2),"":END DEFine
32644 DATA 18,4,0,2,0,2,2,0,7,7,12
32645 DATA 12,2,"3K"," -=3072",5,18,2
32646 DATA 12,2,"5K"," -=5120",5,18,3
32647 DATA 12,2,"7K"," -=7168",5,18,4
32648 DATA 12,2,"9K"," -=9216",5,18,1
32649 DATA 24,2,"VERBOSE"," -v",7,1,6
32650 DATA 24,2,"LACONIC","",7,1,5
32651 DATA 41,2,"ANSI"," -unproto",9,5,8
32652 DATA 41,2,"K&R ","",9,5,7
32653 DATA 53,2,"16 bits"," -Qshort",13,7,10
32654 DATA 53,2,"32 bits","",13,7,9
32655 DATA 30,7,""," flp2_mydir_",12,14,4
32656 DATA 30,8,""," myprog_c",15,11,1
32657 DATA 30,4,""," -Iflp2_",14,9,2
32658 DATA 30,5,""," -Lflp2_",11,13,3
32659 DATA 10,12,"Floating point & Maths flp1_LIB_LIBM_a"," -lm",16,12,15
32660 DATA 10,13,"Dynamic allocations flp1_LIB_LIBMALLOC_a"," -lmalloc",17,15,16
32661 DATA 10,14,"debug support flp1_LIB_LIBDEBUG_a"," -ldebug",18,16,17
32662 DATA 10,15,"Semaphores and tasking flp1_LIB_LIBSEM_a"," -lsem",1,17,18
32663 DATA 0,1,0,0,1,0,0,1,0,1,1,1,1,1,0,0,0,0,11
32664 DATA 1,1,0,4,"COMPILE AND LINK OPTIONS :"
32665 DATA 4,2,0,4,"Stack : Mode : Norm : Int :"
32666 DATA 0,3,0,7,"----------------------------------------------------------------"
32667 DATA 7,4,0,4,"My Include Directory :"
32668 DATA 7,5,0,4,"My Library Directory :"
32669 DATA 0,6,0,7,"----------------------------------------------------------------"
32670 DATA 7,7,0,4,"My Project Directory :"
32671 DATA 7,8,0,4,"My Current File Name :"
32672 DATA 0,9,0,7,"----------------------------------------------------------------"
32673 DATA 1,10,0,4,"Standard Libraries to scan :"
32674 DATA 10,11,0,7,"Standard C LIBRARY flp1_LIB_LIBC_a"
32675 DEFine PROCedure INITFORM
32676 o=32644:RESTORE o:READ m:DIM f(m):READ n:DIM r$(n,32)
32677 DIM CC(7):FOR i=0 TO 7:READ CC(i):NEXT i:READ cp
32678 RESTORE o+m+1:FOR i=1 TO m:READ f(i):NEXT i:READ MMM
32679 FOR i=1 TO m:READFLD(o+i):IF m$="":r$(jt)=n$
32680 END DEFine
32681 DEFine PROCedure EDITFORM
32682 o=32644:CLS#2:RESTORE o+m+2
32683 FOR i=1 TO MMM:READ x,y,jp,jt,m$:PAPER#2,jp:INK#2,jt:AT#2,y,x:PRINT#2,m$
32684 c=cp:READFLD(c+o)
32685 c=NEXTFLD(c):IF c<>cp:GO TO 32685
32686 REPeat ScanKeyb
32687 a=CODE(INKEY$(-1))
32688 SELect ON a
32689 ON a=208:c=PREVFLD(c)
32690 ON a=216:c=NEXTFLD(c)
32691 ON a=32:c=TOGGLE(c)
32692 ON a=10:DISPFLD c,0:EXIT ScanKeyb
32693 ON a=27:C68:bye
32694 END SELect
32695 END REPeat ScanKeyb
32696 FOR i=1 TO m
32697 READFLD(o+i):IF m$="":n$=r$(jt)
32698 IF ((m$<>"") OR ((jt>1) AND (jt<n))) AND (f(i)=1):p$=p$&n$
32699 END FOR i
32700 dat$=r$(n,4 TO LEN(r$(n)))
32701 END DEFine
32702 DEFine FuNction CCC$(opt)
32703 p$=" -tmpflp2_":EDITFORM:INK#2,4:CLS#2:nnn="_c"INSTR r$(1)
32704 IF nnn=0:nnn=len(r$(1))+1:r$(1)=r$(1)&"_c"
32705 IF opt=0:p$="-c "& dat$ & r$(1,4 TO nnn+1)&" "&p$
32706 IF opt=1:p$="-o"&dat$&r$(1,4 TO nnn-1)&" "&dat$&"*_o "&p$
32707 EXEC_W CC,#2,#2,#2;p$
32708 PRINT#0," Done... Hit any key !";:return inkey$(-1)
32709 END DEFine
32710 DEFine FuNction TOGGLE(i)
32711 IF m$="" THEN
32712 EDITFLD(jt)
32713 ELSE
32714 IF jt=i :f(i)=1-f(i)
32715 IF jt<>i:f(i)=0:i=jt:f(i)=1:READFLD(i+o)
32716 END IF
32717 DISPFLD i,1:RETurn i
32718 END DEFine
32719 DEFine FuNction PREVFLD(i)
32720 DISPFLD i,0:i=jp:i=FINDFLD(i):DISPFLD i,1:RETurn i
32721 END DEFine
32722 DEFine FuNction NEXTFLD(i)
32723 DISPFLD i,0:i=jn:i=FINDFLD(i):DISPFLD i,1:RETurn i
32724 END DEFine
32725 DEFine PROCedure DISPFLD(i,s)
32726 PAPER#2,CC(2*f(i)+s):INK#2,CC(4+2*f(i)+s)
32727 AT#2,y,x:PRINT#2,m$;:IF m$="":PRINT#2,r$(jt,4 TO)
32728 END DEFine
32729 DEFine PROCedure EDITFLD(ii)
32730 PAPER#2,CC(2*f(i)):INK#2,CC(4+2*f(i))
32731 AT#2,y,x:PRINT#2,FILL$(" ",29)
32732 AT#2,y,x:INPUT#2,O$:r$(ii)=r$(ii,1 TO 3)&O$
32733 END DEFine
32734 DEFine PROCedure READFLD(l)
32735 RESTORE l:READ x:READ y:READ m$:READ n$:READ jn:READ jp:READ jt
32736 END DEFine
32737 DEFine FuNction FINDFLD(i)
32738 READFLD(i+o):IF (jt<>i)AND(f(i)=0):i=jt:GO TO 32738
32739 RETurn i
32740 END DEFine
Bye, Paul