* ASCF 0 Do not print out ASCII assemblies * * * Wiz-Print -- A Spooling Program for use * version 1.4 with the North Star MDS * * * DRVRAD EQU 02D00H Print driver routine address * *BUFSIZ EQU 200H Each I/O buffer is 0.5K long BUFSIZ EQU 400H Each I/O buffer is 1K long *BUFSIZ EQU 800H 2K buffers * BUFSEC EQU BUFSIZ/100H DSKBUF EQU 40H sectors long DATA EQU 38H A NOP instruction used to flag data areas * DOS EQU 2000H CIN EQU 10H * TRUE EQU 0 FALSE EQU -1 * CHCR EQU 0DH CHLF EQU 0AH CHBEL EQU 7 CHRUB EQU 5FH CHDEL EQU 7FH * ORG DRVRAD * * ******************** * * Size the memory non-destructively * SETUP LXI SP,SETSTK * MVI A,0C3H STA SETUP LXI H,DOS+DRET SHLD SETUP+1 * SET0 LXI H,SGNON CALL OUTCHR * LHLD MEMSIZ If memory already sized, MOV A,H no need to do it again ORA L JNZ SET2 * LXI H,MMMS1 CALL OUTCHR * LXI H,PRGEND Point to first known good memory location MVI A,0AAH This test byte has lots of one's and zero's * SET1 MOV B,M Save the memory byte MOV M,A Make the test CMP M MOV M,B Restore the memory byte * INX H Bump the pointer JZ SET1 Loop up if test says memory is okay * DCX H Adjust pointer to reflect last good byte DCX H * SHLD MEMSIZ Save the starting address * PUSH H CALL OUTADD LXI H,MMMS2 CALL OUTCHR POP H * SET2 LXI D,START-PRGEND DAD D SHLD STRTADR * LXI D,SERIAL-START DAD D SHLD PRNTADR * * Send out the "Change system? " message * LXI H,CHGQST CALL OUTCHR CALL YESNO Go get an answer JNZ NOCHG Give current system configuration if NO * ******************** * * Ask about the NorthStar DOS * LXI H,DOS Set the default DOS location SHLD DOSADR * LXI H,DOSQST Ask where the new DOS is located CALL OUTCHR LHLD DOSADR Send out the default address CALL OUTADD * CALL GETADD Go get the address * JZ WZLOD If he gave an address, go save it * SHLD DOSADR Save the location of the DOS * ******************** * * Ask where Wiz-Print should load * * WZLOD LXI H,WIZ1QST Send out the question CALL OUTCHR LHLD MEMSIZ CALL OUTADD LXI H,WIZ2QST CALL OUTCHR LHLD STRTADR CALL OUTADD LXI H,WIZ3QST CALL OUTCHR * LHLD STRTADR CALL OUTADD CALL GETADD Go get the address * MVI L,0 It must be on a page boundry * JZ PRTLOD * SHLD STRTADR Store the load address * ******************** * * Ask about the print driver * * PRTLOD LXI H,PRTQST Ask where the print driver is CALL OUTCHR CALL GETADD Go get the address * JZ NSPRT If no address was given, assume NorthStar I/O * SHLD PRNTADR Store it CALL CRLF JMP GETDVC * * Check to see if it is a parallel or serial printer * NSPRT LXI H,DVETYP Send out the question CALL OUTCHR CALL YESNO * LXI D,SERIAL-START Assume serial JNZ DVESRL * LXI D,PARAL-START Oops, it's parallel * DVESRL LHLD STRTADR Initialize the print driver location DAD D SHLD PRNTADR * * Ask about the printer device number * GETDVC MVI A,1 Default is device #1 STA DVCNUM * LXI H,DVEQST Print the question CALL OUTCHR * MVI L,'7' Highest device number allowed MVI C,1 Only 1 digit input allowed CALL GETADD+4 Go get the device number * MOV A,L Pick up the value * JNZ $+8 If a number was given, store it * LDA DVCNUM Otherwise, pick up the default PUSH PSW CALL OUTH1 And send it out POP PSW * STA DVCNUM Store the device number * * Ask for the name of the spool file * LXI H,SPLINF Explain the next question CALL OUTCHR LHLD STRTADR CALL OUTADD LXI H,SPLQST Point to the question (GETNME will send it out) CALL GETNME Go get the name * * Move the new spool file name to the output file name location * MOVNME LXI H,NMEBUF Point to the name buffer LXI D,OUTFLE Point to the output file name buffer MOV A,M Pick up the character STAX D Transfer it to the other buffer INX H Bump both pointers INX D ORA A Are we through? JNZ MOVNME+6 Keep looping if not * * Ask about the size to make the spool file * GETSZE MVI A,DSKBUF Set it to the default value STA FLESIZ * LXI H,SIZQST Ask the question CALL OUTCHR * MVI C,2 Only a two digit number is allowed CALL GETADD+2 Go get the hex value * MOV A,L Pick up the size * JNZ $+8 If given, go make sure it's large enough * LDA FLESIZ Get the default value PUSH PSW CALL OUTHEX Send it out POP PSW * CPI BUFSIZ/100H*2 Is the size at least two buffers long? JNC $+2 If so, go determine how many buffers long it is * MVI A,BUFSIZ/100H*2 Make it two buffers long * STA FLESIZ Store the value * MVI B,0 Initialize the count BLKS INR B Increment the count SUI