]OFF PRINTLOAD ( FILE: QUICKCOM.4TH -- This is not used in 4th/86 -- it is provided for information only -- 8 July 88 -- MFB) ( This file QUICKLY converts 4th programs to a CP/M "COM". It works like MAKECOM.4TH except that it expects the file BASYS.4IM to contain an image of the "system" routines. The first time you run this (or when you want to update BASYS.4IM), answer "Y" to the first question. The last "user" definition loaded is assumed to be the entry point. To use, enter: " QUICKCOM.4TH" LOAD ) 22 BLOCK SRCFILENAME 22 BLOCK COMFILENAME 10 BLOCK TOPDATA : CALCTOP TOPDATA 1+ B@ DUP IF ( not null) TOPDATA 1+ VAL ( get value) ELSE 6 @ ( default top) THEN ; " Do you want to create or update BASYS.4IM?" ." " \13 10\(Answer 'Y' first time):" ." GETCHR CRLF 0DFH AND "Y" = IFTRUE " \13 10\Top of memory (or just return to use system max):" ." 8 TOPDATA B! TOPDATA GETLIN ( get data memory top) CRLF CALCTOP 100H SWAP CROSS-COMPILE ( set cross mode) 103H ORG ( init.4th loaded below puts in start jmp at 100h) ( load most commonly used "runtime" ) " Loading BASIC" ." CRLF " BASIC.4TH" LOAD " Loading CIO" ." CRLF " CIO.4TH" LOAD " Loading FIO" ." CRLF " FIO.4TH" LOAD " Loading DISP" ." CRLF " DISP.4TH" LOAD ( *** Add more loads here if desired *** ) " BASYS.4IM" PIMAGE ENDIF " \13 10\File to cross compile (ex. TEST.4TH): " ." 20 SRCFILENAME B! SRCFILENAME GETLIN ( get source filename) " \13 10\Object output file (ex. B:TEST.COM): " ." 20 COMFILENAME B! COMFILENAME GETLIN ( get com filename) CRLF ( load user program ) " BASYS.4IM" GIMAGE ( get "runtime") SRCFILENAME 1+ ON PRINTLOAD LOAD OFF PRINTLOAD ( define a constant that is the def adr of the last word) LAST @ DUPB@ + 2+ @ CONST ENTRYPOINT : BOOT ( bootstrap) INITFIO ENTRYPOINT EXEC QUIT ; 128 CONST SYSIZE ( stack space for program) '' SYSIZE BLOCK SYSTK ( define stack) ( init code) 100H " INIT.4TH" LOAD STATUS ( print code size) COMFILENAME 1+ SAVE " COM file written\13 10\" ." QUIT ( exit to cpm)