TITLE 'DISK I/O MODULE'›SUBTTL 'File DISKIO.AMA'›;›; Contains subroutines to do disk I/O and supply›; object code to the disassembly loop.›;›;**********************›;›; GETBYT›;›;**********************›;›; Subroutine to get next unprocessed byte.›;›PROC›GETBYTJMP (GBPTR);Vector to source-dependent›; object code input routine.›;›GBMEMLDA PASS ;Code for memory input›CMP #2;Pass 2?›BNE :GBM1;No, move on›JSR SETORG;Yes, set the origin›JSR LINADR;Repeat line address›LDA #0;and see that it›STA PASS;doesn't happen again›:GBM1SEC›;›; Any data left in the Big Buffer?›;›LDA BUFTOP›SBC OBJPTR›LDA BUFTOP+1›SBC OBJPTR+1›BCS :GBM2;Yes, go get it.›LDA #0;No, so say so›STA MORSEG›SEC;Indicate failure›RTS;And get out.›:GBM2LDY #0›LDA (OBJPTR),Y;Get the byte›TAX;Save it›INC OBJPTR;Step this counter›BNE :GBM4›INC OBJPTR+1›:GBM4INC STAR ;and locatin counter›BNE :GBM6›INC STAR+1›:GBM6TXA;Recover byte›CLC ;Indicate success›RTS›;›;›GBFILSEC ;Code for DOS file input.›;›; Any data left in the Big Buffer?›;›LDA BUFTOP›SBC OBJPTR›LDA BUFTOP+1›SBC OBJPTR+1›BCS :GBF2;Yes, go get a byte.›JSR GOFIL;No, go get some more.›BCC :GBF2;Got some data›LDA #0;File is empty›STA MORSEG;so say so.›RTS ;Exit with carry set.›;›; There is data available in the Big Buffer›; but we have to do some interpretation yet.›;›:GBF2LDA HEADER+2;This is nr of bytes›; remaining in the current file section. Is it 0?›BNE :GBF8;No, go get the next one.›LDA HEADER+3›BNE :GBF8›LDA #0›STA MORSEG›;›; Yes, see if there's another section in the file.›;›; Here we read the next 4 bytes from the Big Buffer›; and extract the section address/length information.›; These 4 bytes must be present because we already›; know there is at least 1 byte, and GOFIL will not›; load them if there isn't room for all 4.›;›LDY #3›:GBF4LDA (OBJPTR),Y›STA HEADER,Y›DEY›BPL :GBF4›;›; Now move OBJPTR up 4 bytes to jump over the header info.›;›CLC›LDA OBJPTR›ADC #4›STA OBJPTR›LDA OBJPTR+1›ADC #0›STA OBJPTR+1›;›; Now test the new section for contiguity with the last.›;›LDA HEADER;Section start address›CMP STAR;Disassembly location counter›BNE :GBF6;Not equal, reset counter›LDA HEADER+1›CMP STAR+1›BEQ :GBF8;Equal, section is contiguous›;›; Set the location counter to the start of the new section.›;›:GBF6LDA HEADER›STA STAR›LDA HEADER+1›STA STAR+1›LDA #$FF›STA MORSEG›SEC;Return without reading a byte.›RTS›;›; At last we go get the damn byte.›;›:GBF8LDY #0›LDA (OBJPTR),Y›TAX;Save the byte›INC OBJPTR;Step the pointer›BNE :GBF10›INC OBJPTR+1›:GBF10CLC;Step the location counter›INC STAR›BNE :GBF11›INC STAR+1›:GBF11DEC HEADER+2;Count down nr of bytes in section›LDA HEADER+2›CMP #$FF›BNE :GBF12›DEC HEADER+3›:GBF12LDA HEADER+2›BNE :GBF13›LDA HEADER+3›BNE :GBF13›STA MORSEG›:GBF13TXA;Recover the byte›CLC;Indicate success›RTS›EPROC›;›;›;›;**********************›;›; GOFIL›;›;**********************›;›; Subroutine to move more data from the source file›; into the Big Buffer.›;›; Enter SECCNT=nr of unloaded bytes remaining›; in the current DOS file section›;›; Exit BUFTOP=address of top of loaded›; part of Big Buffer›;Carry=set if & only if no data got transferred›;Y=error code if a disk read error occurred›; ›PROC›GOFILLDA MORSEG›BNE :GOFOK›SEC›RTS›:GOFOKSEC›LDA #BIGBUF&$FF›STA OBJPTR;Reset this pointer›SBC #1›STA BUFTOP;and this one›LDA #BIGBUF/256›STA OBJPTR+1›SBC #0›STA BUFTOP+1›;›; Now we have OBJPTR set equal to BIGBUF so it›; points to the next byte to be processed and›; BUFTOP set to 1 less to indicate the top of›; the loaded part of the Big Buffer.›;›; While we're at it, let's compute buffer space available.›;›SEC›LDA BUFMAX›SBC BUFTOP›STA BFAVL›LDA BUFMAX+1›SBC BUFTOP+1›STA BFAVL+1›;›; Now start on the disk access. First get the input›; disk into the drive if required.›;›LDA TWODR›BNE :LOOP1›LDA DISKID›BEQ :LOOP1›JSR GINDSK;Get input disk›;›; Get object code from a DOS file.›;›:LOOP1LDA SECCNT;Any data left in›; current file section?›BEQ :LP1A›JMP :OLDSC;Yes, go get it.›:LP1ALDA SECCNT+1›BEQ :LP1B›JMP :OLDSC›;›; This section done, so see if there's room in the›; Big Buffer for another section header.›;›:LP1BSEC›LDA BFAVL›SBC #5›LDA BFAVL+1›SBC #0›BCS :GF0›JMP :BFULL;Not enough room, get out.›;›; We have room for a header and at least one data byte,›; so get the header.›;›:GF0LDX #$10;Select IOCB 1›LDA #GETCHR›STA ICCOM,X›;›; Set buffer length to 0 for one-byte xfer›;›LDA #0›STA ICBLL,X›STA ICBLH,X›;›; Watch closely now.›;›:GF1JSR CIOV;Get 1 byte from input file›BPL :GF1A›JMP :FLEND;No byte, it's EOF›:GF1ASTA DOSHDR›JSR CIOV›BPL :GF1B›JMP :FLEND›:GF1BSTA DOSHDR+1›CMP #$FF;Binary file flag?›BNE :GF2;No, go on.›CMP DOSHDR›BEQ :GF1;Yes, get 2 more bytes.›:GF2JSR CIOV›BPL :GF2A›JMP :FLEND›:GF2ASTA DOSHDR+2›JSR CIOV›BPL :GF2B›JMP :FLEND›:GF2BSTA DOSHDR+3›;›; Now we have the file section start address in DOSHDR(2)›; and end address in DOSHDR+2(2).›; Next we get the number of bytes in the new section.›;›SEC›LDA DOSHDR+2;End address›SBC DOSHDR;Start address›STA DOSHDR+2;Now section length›LDA DOSHDR+3›SBC DOSHDR+1›STA DOSHDR+3›CLC;Have to add 1›LDA DOSHDR+2;to get correct length.›ADC #1›STA DOSHDR+2›STA SECCNT›LDA DOSHDR+3›ADC #0›STA DOSHDR+3›STA SECCNT+1›;›; OK, now the header block has start/length information and›; SECCNT has the section length. With me? Now we›; move the header block into the Big Buffer.›;›LDY #4›:HDLPDEY›LDA DOSHDR,Y›INY›STA (BUFTOP),Y›DEY›BNE :HDLP›;›; Now move BUFTOP up 4 bytes.›;›CLC›LDA BUFTOP›ADC #4›STA BUFTOP›LDA BUFTOP+1›ADC #0›STA BUFTOP+1›;›; Now we have an active file section, so see how much›; room we have in the Big Buffer.›;›:OLDSCSEC›LDA BUFMAX›SBC BUFTOP›STA BFAVL›LDA BUFMAX+1›SBC BUFTOP+1›STA BFAVL+1›BCC :BFULL›BNE :OS1›LDA BFAVL›BEQ :BFULL›;›; Now set up the IOCB to read SECCNT bytes.›;›:OS1LDX #$10;Select IOCB 1›LDA SECCNT›STA ICBLL,X›LDA SECCNT+1›STA ICBLH,X›;›; Now see if we can get away with this.›;›SEC›LDA BFAVL›SBC SECCNT›LDA BFAVL+1›SBC SECCNT+1›BCS :GF3;Yes we can.›LDA BFAVL ;No, only xfer BFAVL bytes.›STA ICBLL,X›LDA BFAVL+1›STA ICBLH,X›:GF3CLC›LDA BUFTOP;Set buffer location›ADC #1›STA ICBAL,X›LDA BUFTOP+1›ADC #0›STA ICBAH,X›JSR CIOV;Load buffer›;›; Read error here will take care of itself later.›; Next move BUFTOP up by byte count.›;›CLC›LDA BUFTOP›ADC ICBLL,X›STA BUFTOP›LDA BUFTOP+1›ADC ICBLH,X›STA BUFTOP+1›;›; And move SECCNT down by the same amount.›;›SEC›LDA SECCNT›SBC ICBLL,X›STA SECCNT›LDA SECCNT+1›SBC ICBLH,X›STA SECCNT+1›;›; And loop back for another section.›;›JMP :LOOP1›:FLENDLDA #0›STA MORSEG;Probably don't need this›:BFULLSEC;This will set the carry›LDA BUFTOP;if we got any data›SBC #BIGBUF&$FF›LDA BUFTOP+1›SBC #BIGBUF/256›ROR A;and this will toggle it.›EOR #$80›ROL A›RTS›;›;›GBSECSEC;Input code for sector input.›;›; Any data left in the Big Buffer?›;›LDA BUFTOP›SBC OBJPTR›LDA BUFTOP+1›SBC OBJPTR+1›BCS :GBS2;Yes, go get some›JSR GOSEC;No, get more from disk›BCC :GBS2;Got some, so process›LDA #0 ;Disk exhausted›STA MORSEG;so say so›RTS;and get out.›:GBS2LDY #0 ;Get a byte›LDA (OBJPTR),Y›TAX;Save it›INC OBJPTR;Step this pointer›BNE :GBS4›INC OBJPTR+1›:GBS4INC STAR;and locatin counter›BNE :GBS6›INC STAR+1›:GBS6TXA;Recover byte›CLC;Indicate success›RTS;and exit with byte in A.›;›;›;**********************›;›; GOSEC›;›;**********************›;›; Subroutine to fill the Big Buffer from a sector list.›;›GOSECLDA #$00›STA MORSEG›SEC›LDA #BIGBUF&$FF›STA OBJPTR;Reset this pointer›SBC #1›STA BUFTOP;and this one.›LDA #BIGBUF/256›STA OBJPTR+1›SBC #0›STA BUFTOP+1›;›; Does Big Buffer have room for another sector?›;›:GOS2SEC›LDA BUFMAX›SBC BUFTOP›STA BFAVL;nr bytes avail in buffer›LDA BUFMAX+1›SBC BUFTOP+1›STA BFAVL+1›SEC›LDA BFAVL›SBC #$80;Length of a sector›LDA BFAVL+1›SBC #0›BCC :GOXIT;No room, get out.›;›; Buffer has room, now select a sector.›;›:GOS4INC SECTRY›BNE :GOS6›INC SECTRY+1›:GOS6SEC;Out of sector numbers?›LDA #$D0›SBC SECTRY›LDA #2›SBC SECTRY+1›BCC :GOXIT;Yes, get out›;›; See if this sector number is in the sector list.›;›LDX SECTRY›LDY SECTRY+1›JSR MAPACC›LDA SECMAP,X›AND MASK,Y›BEQ :GOS4;No, try another sector›;›; We want this sector, so go read it.›;›LDA TWODR›BNE :GOS7›LDA DISKID›BEQ :GOS7›JSR GINDSK›:GOS7LDA SECTRY›STA DAUX1›LDA SECTRY+1›STA DAUX2›LDA #1;Drive 1›STA DUNIT›LDA #GETSEC;Get sector command›STA DCOMND›CLC;Start new sector one›LDA BUFTOP;byte above BUFTOP›ADC #1›STA DBUFLO›LDA BUFTOP+1›ADC #0›STA DBUFHI›JSR DSKINV;Read the sector›LDA DSTATS›;›; Need some error trapping here›;›;›; These NOP's form a hook for a subroutine to do›; special input data processing after the sector›; is read.›;›NOP›NOP›NOP›CLC;Move BUFTOP up 128 bytes›LDA BUFTOP›ADC #$80›STA BUFTOP›LDA BUFTOP+1›ADC #0›STA BUFTOP+1›JMP :GOS2;Go back for next sector›:GOXITLDA PASS;Is this pass 2?›CMP #2›BNE :GOSX2›JSR SETORG;Output ORG pseudo-op›JSR LINADR;Repeat the line address›LDA #0›STA PASS›:GOSX2SEC›LDA BUFTOP;This sets carry if›SBC #BIGBUF&$FF;we got any data›LDA BUFTOP+1›SBC #BIGBUF/256›ROR A;and this toggles it.›EOR #$80›ROL A›RTS›EPROC›;›;›;›;*********************›;›; RECOUT›;›;*********************›;›; Subroutine to output one record from the source line›; buffer to the selected output devices.›;›; Enter LINEBF contains 1 assembly-language instruction›;›; No exit parameters›;›PROC›RECOUTLDA LNFLAG;Want line numbers?›BEQ :RE2;No›JSR LNNUM;Yes, put one in NUMBUF›:RE2LDA DSKOPT;Write disk?›BNE :RE3;Yes›JMP :NODSK;No, skip it›:RE3LDA TWODR;1 or 2 disk drives?›BNE :RE4;1›LDA DISKID;2, which one do we have?›CMP #1›BEQ :RE4;Output disk, go on›JSR GOPDSK;Input disk, get the other›:RE4LDA I2OPEN;Is IOCB2 open?›BNE :RE6;Yes›JSR OPENO;No, open it›;›; Is there room in the current output file for›; another record?›;›:RE6SEC›LDA FILSZ›SBC MAXSZ›LDA FILSZ+1›SBC MAXSZ+1›BCC :RE8;Yes, send it on out›JSR NEWFIL;No, open a new file›;›; Now output the instruction to the current output file.›;›:RE8LDX #$20;IOCB2›JSR CIOREC›BPL :RE10›JMP :RERROR›:RE10CLC›LDA FILSZ;Update length of file›ADC ICBLL,X›STA FILSZ›LDA FILSZ+1›ADC ICBLH,X›STA FILSZ+1›:NODSKLDA FREEZE;Freeze selected?›BNE :NODSK;Yes, wait here›LDX #0 ;No, push on›JSR CIOREC;Put record to screen›LDX #$30;IOCB3 for printer›LDA PROPT;Printer option?›BEQ :NOPR;No›LDA PROPEN;Printer open?›BNE :PRINT;Yes›LDA #OPEN;No, open it›STA ICCOM,X›LDA #OPNOT›STA ICAX1,X›LDA #LOW :PBUF›STA ICBAL,X›LDA #HIGH :PBUF›STA ICBAH,X›JSR CIOV›BPL :OPNOK›JSR PHFFT›LDX #0›STX PROPT›LDX #$30›JMP :CLOSE›:OPNOKLDA #$FF ;Signal success›STA PROPEN›JMP :EXIT;Don't print till next time›:PRINTJSR CIOREC›BPL :EXIT›LDA #$FF›STA FREEZE›JMP :EXIT›:NOPRLDA PROPEN;Printer still open?›BEQ :EXIT;No›JSR CIOREC;Yes, wrap up current line›:CLOSELDA #CLOSE;and close it›STA ICCOM,X›JSR CIOV›LDA #0›STA PROPEN›:EXITRTS›:RERRORJMP IOERR;Failure exit point›:PBUFDB 'P:';Name buffer›;›; Subroutine to output one record from buffer›; pointed to by OUTPTR to the selected IOCB›;›CIORECLDA #PUTREC›STA ICCOM,X›LDA OUTPTR›STA ICBAL,X›LDA OUTPTR+1›STA ICBAH,X›LDA #$80›STA ICBLL,X›LDA #0›STA ICBLH,X›JSR CIOV›RTS›EPROC›;›;******************›;›; NEWFIL›;›;******************›;›; Subroutine to close the current output file (because›; full) and open a new one.›;›PROC›;›; First find where in OUTFBF the extender starts.›;›NEWFILLDX #1›:NF2INX›CPX #$0F›BNE :NF3›JMP :NFERR›:NF3LDA OUTFBF,X›CMP #'.'›BNE :NF2›STX TEMP;Save offset to period›INX;Get offset to last digit›INX›INX›STX TEMP+1;Save this offset›;›; Now we add 1 to the extender by ASCII addition (!)›;›:NF4LDY OUTFBF,X›INY›CPY #':'›BCC :NF6›LDA #'0'›STA OUTFBF,X›DEX›CPX TEMP;Finished?›BNE :NF4;No, do another digit›:NF6TYA›STA OUTFBF,X›;›; Now the new extender is in the file name in OUTFBF.›; Next we merge the file name into the LINK instruction.›;›LDY #6›:NF8INY;Find end of pseudo-op›LDA LINKBF,Y›CMP #$27;Quote?›BEQ :NF10›CMP #' ';Space?›BEQ :NF9›CPY #$12;No, try again›BNE :NF8›JMP :NFERR;Couldn't find end›:NF9INY ;Look at next char›LDA LINKBF,Y›CMP #$27;Quote?›BEQ :NF10;Yes›CMP #'#';#?›BEQ :NF10;Yes›DEY ;No, use last char›LDA LINKBF,Y›:NF10PHA;Save last char of pseudo-op›LDX #$FF›:NF12INX›INY›LDA OUTFBF,X;Merge file name›STA LINKBF,Y›CPX TEMP+1;Offset to final char in filenm›BNE :NF12›INY›PLA;Recover space, quote or #›CMP #$27›BNE :NF14›STA LINKBF,Y;Insert if quote›INY›:NF14LDA #EOL;Terminate record›STA LINKBF,Y›;›; Now the link instruction is in LINKBF but we may›; need a line number.›;›LDA LNFLAG›BEQ :NOLN›LDX #$20;Output contents of NUMBUF›LDA #PUTCHR›STA ICCOM,X›LDA #LOW NUMBUF›STA ICBAL,X›LDA #HIGH NUMBUF›STA ICBAH,X›LDA #6›STA ICBLL,X›LDA #0›STA ICBLH,X›JSR CIOV›JSR LNNUM;Update the line number›;›;Now output the file link to the old file to wrap it up.›;›:NOLNLDX #$20›LDA #PUTREC›STA ICCOM,X›LDA #$80›STA ICBLL,X›LDA #0›STA ICBLH,X›LDA #LOW LINKBF›STA ICBAL,X›LDA #HIGH LINKBF›STA ICBAH,X›JSR CIOV›BMI :NFERR›;›;Close the old file›;›LDA #CLOSE›STA ICCOM,X›JSR CIOV›BMI :NFERR›LDA #0›STA I2OPEN›;›; See if output disk is full & if so get it changed.›;›INC NUMFIL›LDA NUMFIL›CMP MAXFIL›BCC :NF16›LDA #1›STA CRSINH›LDX #0›LDA #PUTCHR›STA ICCOM,X›LDA MSG14L›STA ICBLL,X›STX ICBLH›LDA #LOW MSG14›STA ICBAL,X›LDA #HIGH MSG14›STA ICBAH,X›JSR CIOV›JSR GETMSG›LDA #1›STA NUMFIL›:NF16JSR OPENO;Open new file›LDA #0›STA FILSZ›STA FILSZ+1›RTS›:NFERRJMP IOERR;Failure exit point›EPROC›;›;*******************›;›; OPENO›;›;*******************›;›; Subroutine to open an output file named in OUTFBF›;›PROC›OPENOLDX #$20;IOCB2›LDA #OPEN›STA ICCOM,X›LDA #LOW OUTFBF›STA ICBAL,X›LDA #HIGH OUTFBF›STA ICBAH,X›LDA #OPNOT›STA ICAX1,X›JSR CIOV›BPL :OPN1›JMP IOERR›:OPN1LDA #$FF›STA I2OPEN›RTS›EPROC›;›;›;********************›;›; GINDSK›;›;********************›;›; Subroutine to prompt user to insert the input disk.›;›; No enter parameters.›; Exit DISKID=0 (input disk)›;›GINDSKLDA #1›STA CRSINH›LDX #0›LDA #PUTCHR›STA ICCOM,X›LDA MSG10L›STA ICBLL,X›STX ICBLH›LDA #LOW MSG10›STA ICBAL,X›LDA #HIGH MSG10›STA ICBAH,X›JSR CIOV›JSR GETMSG›LDA #0›STA DISKID›RTS›;›;›;*********************›;›; GOPDSK›;›;*********************›;›; Subroutine to prompt user to insert the output disk.›;›; No enter parameters.›; Exit DISKID=1 (output disk)›;›GOPDSKLDA #1›STA CRSINH›LDX #0›LDA #PUTCHR›STA ICCOM,X›LDA MSG11L›STA ICBLL,X›STX ICBLH›LDA #MSG11&$FF›STA ICBAL,X›LDA #MSG11/256›STA ICBAH,X›JSR CIOV›JSR GETMSG›LDA #1›STA DISKID›RTS›;›;›;*********************›;›; GETMSG›;›;*********************›;›; Subroutine to accept a keyboard message from user.›;›; No enter parameters.›; Exit msg in KBBUF.›;›GETMSGLDX #0›LDA #GETREC›STA ICCOM,X›LDA #$20›STA ICBLL,X›STX ICBLH›LDA #KBBUF&$FF›STA ICBAL,X›LDA #KBBUF/256›STA ICBAH,X›JSR CIOV›RTS›;›;*********************›;›; GBINIT›;›;*********************›;›; Subroutine to set appropriate pointers to initialize›; GETBYT to the start of the selected data source.›;›PROC›GBINITLDA SRCTYP;Get type of source›CMP #'M';Memory?›BNE :GBI1›LDA STARST;Yes, this will be easy›STA OBJPTR›STA STAR›LDA STARST+1›STA OBJPTR+1›STA STAR+1›:GBIM1RTS›;›; Source must be either file or sectors, so we want the›; input disk unless we have 2 drives.›;›:GBI1LDA TWODR›BNE :GBI2›LDA DISKID›BEQ :GBI2›JSR GINDSK;Ask for input disk›:GBI2LDA SRCTYP›CMP #'F'›BNE :GBI10›;›; File input, so we open the file for input.›;›LDX #$10;IOCB1›LDA #CLOSE›STA ICCOM,X›JSR CIOV›LDA #OPEN›STA ICCOM,X›LDA #OPNIN›STA ICAX1,X›LDA #LOW INFLBF›STA ICBAL,X›LDA #HIGH INFLBF›STA ICBAH,X›JSR CIOV›BPL :GBI4›JMP IOERR›:GBI4LDA #0›STA SECCNT;Initialize dsik section count›STA SECCNT+1›LDX #3›:CLRHDSTA HEADER,X;And clear header block›DEX›BPL :CLRHD›JMP :GBI12›;›; Must be sector input (error check already done)›;›:GBI10LDA #0›STA SECTRY›STA SECTRY+1›LDA STARST›STA STAR›LDA STARST+1›STA STAR+1›;›; Now set up buffer pointers for either file or sector›; input. BUFTOP=BIGBUF-1 and OBJPTR=BIGBUF is the›; start condition for GETBYT.›;›:GBI12SEC›LDA #LOW BIGBUF›STA OBJPTR›SBC #1›STA BUFTOP›LDA #HIGH BIGBUF›STA OBJPTR+1›SBC #0›STA BUFTOP+1›CLC›LDA #$FF›STA MORSEG›RTS›EPROC›;›;›;*******************›;›; IOERR›;›;*******************›;›; Routine to bomb the program in event of fatal I/O error›;›IOERRLDX #0›LDA #PUTCHR›STA ICCOM,X›LDA MSG9L;Bad new msg›STA ICBLL,X›STX ICBLH›LDA #LOW MSG9›STA ICBAL,X›LDA #HIGH MSG9›STA ICBAH,X›JSR CIOV›HANGJMP HANG;Loop forever›;›;›;**********************›;›; SETORG›;›;**********************›;›; Subroutine to output an origin-set pseudo-op.›;›; Enter STAR(2)=value to set origin›;›; Exit ORGOP(20) contains the full pseudo-op with EOL.›;›PROC›SETORGLDX #11›LDA #'$'›STA ORGOP,X›INX›LDY #1›:LPLDA STAR,Y›LSR A›LSR A›LSR A›LSR A›JSR NIBASC›STA ORGOP,X›INX›LDA STAR,Y›AND #$0F›JSR NIBASC›STA ORGOP,X›INX›DEY›BPL :LP›LDA #EOL›STA ORGOP,X›LDY #20›:LP2LDA ORGOP,Y›STA LINEBF,Y›DEY›BPL :LP2›JSR RECOUT›:OKRTS›EPROC›;›;**********************›;›; PHFFT›;›;**********************›;›; Subroutine to ring the console bell›;›PHFFTLDX #0›STX ICBLL›STX ICBLH›LDA #PUTCHR›STA ICCOM›LDA #BELL›JSR CIOV›RTS›;›;›; Miscellaneous tables & buffers›;›KBBUFDS 32›SECMAPDS 90›NUMBUFDS 6›;›; NOTE: NUMBUF & LINEBF must be contiguous›;›LINEBFDS 64›INFLBFDS 16›OUTFBFDS 16›DB 'Link file pseudo>***'›LINKBFDB ' LINK '›DB ' ***'›DB 'Origin set pseudo>***'›ORGOPDB ' ORG ',EOL›DB '***'›DB 'Assembly end pseudo>***'›ENDOPDB ' .END $2075',EOL,' '›DB '***'›DB 'Comment insertion flag>'›DB '***'›COMENTDB '1***'›DB 'Line number flag>***'›LNFLAGDB 0,'***'›STR1DB STR1E-STR1-1›DB ';System equates used'›STR1E= *›STR2DB STR2E-STR2-1›DB ';End of system equates'›STR2E= *›DB 'Define Byte pseudo>***'›STR3DB STR3E-STR3-1›DB '.BYTE '›STR3E= *›DB '***'›STR4DB STR4E-STR4-1›DB ';External reference equates'›STR4E= *›STR5DB STR5E-STR5-1›DB ';End of external references'›STR5E= *›STR6DB STR6E-STR6-1›DB ';Zero-page equates'›STR6E= *›STR7DB STR7E-STR7-1›DB ';End of zero-page equates'›STR7E= *›DB '***Max file size (hex)>'›DB '***'›MAXSZDW $4000›DB '***'›DB 'Files/disk+1 (hex)>***'›MAXFILDB 5,'***'›MASKDB 1,2,4,8›DB $10,$20,$40,$80›LABMAPDS 128›LABBASDS 2048›