From c8fb70d56bf05f3301278879ca57a614ba8ece87 Mon Sep 17 00:00:00 2001 From: retrogear Date: Tue, 26 Jul 2016 20:58:28 -0500 Subject: [PATCH] Add files via upload --- ANALYST128XE.txt | 2070 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2070 insertions(+) create mode 100644 ANALYST128XE.txt diff --git a/ANALYST128XE.txt b/ANALYST128XE.txt new file mode 100644 index 0000000..2fb83a5 --- /dev/null +++ b/ANALYST128XE.txt @@ -0,0 +1,2070 @@ + LST ON + SBTL + X6502 + MSB ON + ORG $8000 + SKP 1 +********************************* +* * +* -< THE ANALYST >- * +* * +* 128K VERSION XE * +* * +* 07/26/16 * +* * +********************************* + SKP 1 +*** COMMANDS *** + SKP 1 +; CTRL-F FIND HEX SEQUENCE DEFINED BY F(H) +; G GO EXECUTE IN IMMEDIATE MODE +; H LOAD BYTES FOR HSF F(CTRL-F) BY USING H: +; I DISPLAY/SET PC/INTERNAL A,X,Y,P,S REGISTERS +; J JUMP. EXECUTE JSR INSTRUCTION IN STEP MODE +; CTRL-L CLEAR PRESENT SCREEN AND HOME CURSOR +; L LIST DISASSEMBLY OR LOOP IN TRACE MODE. +; M MOVE BLOCK OF MEMORY +; P SEND OUTPUT TO PRINTER +; R RELOCATE ANALYST TO NEW ADDRESS PAGE +; S ENTER STEP MODE. STEP INSTRUCTION +; T TRACE PROGRAM +; V PRINT ANALYST VERSION# AND ORIGIN ADDRESS. +; CTRL-X MOVE ANALYST TO AUX. DISABLED AFTER USE. +; X SKIP INSTRUCTION DURING STEP. TOGGLE MAIN/AUX +; " DUMP MEMORY IN ASCII +; / SET OR PRINT SUBROUTINE TO JSR IMMED MODE +; & EXIT TO OR FROM DOS / PRODOS +; ? PRINT LAST 16 PC'S EXEC'D DURING TRACE +; @ SET TEXT 40/80 COL SCREEN +; < RANGE DELIMITER +; . RANGE DELIMITER +; : STORE VALUE IN MEMORY +; ! ENTER MINI-ASSEMBLER. ALONE TO EXIT + SKP 1 +*** ROM ZERO PAGE EQUATES *** + SKP 1 +MCSWL EQU $36 +MCSWH EQU $37 +MA1 EQU $3C +MA2 EQU $3E +MA4 EQU $42 + SKP 1 +*** ANALYST EQUATES *** + SKP 1 +PCL EQU $EF LABEL MARKS PAGE 0 +PCH EQU $F0 +BASL EQU $F1 +BASH EQU $F2 LABEL USED AS IDENTIFIER +ZFLG EQU $F3 1 BYTE ID = $AA +A1L EQU $F4 A1L-A5H MUST BE IN ORDER +A1H EQU $F5 FOR MINI-ASSEMBLER +A2L EQU $F6 +A2H EQU $F7 +A3L EQU $F8 +A3H EQU $F9 +A4L EQU $FA +A4H EQU $FB +A5L EQU $FC +A5H EQU $FD +BAS2L EQU $FE +BAS2H EQU $FF LABEL MARKS END OF PAGE 0 +WARMV EQU $0102 WARM REENTRY +XQTS EQU WARMV+6 EXEC AREA FOR STEP, TRACE +YPOKE EQU XQTS+21 +PEEK EQU XQTS+29 +YPEEK EQU XQTS+31 +XQT EQU XQTS+50 18 BYTES +PCBUF EQU XQT+18 32 BYTE PC SAVE AREA. +IN EQU PCBUF+32 KEYIN BUFFER. 38 BYTES. +DOSV EQU $03D0 DOS AND PRODOS WARM ENTRY +AMPERV EQU $03F5 AMPERSAND VECTOR +MLI EQU $BF00 PRODOS INTERFACE + SKP 1 +*** ROM EQUATES *** + SKP 1 +KBD EQU $C000 +INHPAGE2 EQU $C001 AUX $400-7FF SHOWS TEXT +MAINRD EQU $C002 +MAINWR EQU $C004 +CLR80VID EQU $C00C +SET80VID EQU $C00D +KBDSTRB EQU $C010 +RDAUXZP EQU $C016 BMI IF AUXZP +RDPAGE2 EQU $C018 BMI IF INHPAGE2 ON +RDTEXT EQU $C01A BMI IF TEXT MODE +RDSCR EQU $C01C BMI IF DPAGE2 ON +RD80VID EQU $C01F BMI IF 80 COL MODE +SPKR EQU $C030 +TXTSET EQU $C051 +LOWSCR EQU $C054 +HISCR EQU $C055 +PB0 EQU $C061 OPEN APPLE KEY +PB1 EQU $C062 CLOSED APPLE KEY +SWITCH2 EQU $C082 +AUXMOVE EQU $C311 +OUTPORT EQU $FE95 USED TO SET PRINTER +IDROM EQU $E000 = $4C IF ROM PRESENT + SKP 3 +START JMP RESET COLD START +INSDS1 LDX PCL + LDY PCH + JSR CROUT + JSR PRYX2 + JSR OUTSP +INSDST JSR PEEK +INSDS2 LDY #$FF DETERMINE LENGTH OF + STY LMNEM INSTRUCTION. OPCODE IN + TAY ACC. STORED IN LENGTH. + LSR A INVALID = 0 + BCC IEVEN 1 BYTE = 0 + ROR A 2 BYTE = 1 + BCS ERR 3 BYTE = 2 + AND #$87 +IEVEN LSR A + TAX + LDA FMT1,X + BCC RTMSKZ + LSR A + LSR A + LSR A + LSR A +RTMSKZ AND #$0F + CMP #$0F + BNE GETFMT +ERR LDY #$FF BAD OPCODE + STY ERRFLG + INY + STY LMNEM + STY RMNEM + STY FORMAT + STY LENGTH +RTS1 RTS +GETFMT TAX + LDA FMT2,X + STA FORMAT + AND #$03 + STA LENGTH + LDA TFLG BYPASS PRINT FORMATTING + BNE RTS1 IN TRACE + TYA + AND #$8F + PHA TEMP STORAGE + TYA + LDX #31 +GETFMT2 DEX + BMI MNNDX + CMP OPC65C,X MAKE SUBSTITUTION IF + BNE GETFMT2 65C02 OPCODE. + LDA REPL65C,X +MNNDX PLX + LDY #$03 + CPX #$8A + BEQ MNNDX3 +MNNDX1 LSR A + BCC MNNDX3 + LSR A +MNNDX2 LSR A + ORA #$20 + DEY + BNE MNNDX2 + INY +MNNDX3 DEY + BNE MNNDX1 + RTS +INSTDSP JSR INSDS1 + PHA +PRNTOP JSR YPEEK + JSR PRBYTE + LDX #$01 +PRNTBL JSR PRBLNK + CPY LENGTH + INY + BCC PRNTOP + LDX #$03 + CPY #$03 + BCC PRNTBL + PLA + TAY + LDA LMNEM + BEQ PRMN1 + LDA MNEML,Y + STA LMNEM + LDA MNEMR,Y + STA RMNEM +PRMN1 LDA #$00 + LDY #$05 +PRMN2 ASL RMNEM + ROL LMNEM + ROL A + DEY + BNE PRMN2 + ADC #$BF + JSR COUT + DEX + BNE PRMN1 + JSR OUTSP + LDY LENGTH + LDX #$05 +PRADR1 CPX #$02 + BEQ PRADR5 +PRADR2 ASL FORMAT + BCC PRADR3 + LDA CHAR1,X + JSR COUT + LDA CHAR2,X + BEQ PRADR3 + JSR COUT +PRADR3 DEX + BPL PRADR1 + RTS +PRADR4 DEY + BMI PRADR2 + JSR PRBYTE +PRADR5 LDA FORMAT + CMP #$E8 + JSR YPEEK + BCC PRADR4 + JSR PCADJA + TAX + INX + BNE PRNTYX + INY +PRNTYX TYA +PRNTAX JSR PRBYTE + TXA + JMP PRBYTE +PRBLNK3 LDX #3 +PRBLNK JSR OUTSP PRINT X SPACES + DEX + BNE PRBLNK + RTS +PCADJ SEC UPDATE PC BY LENGTH+1 +PCADJLP LDA LENGTH UPDATE PC BY LENGTH +PCADJAP JSR PCADJA UPDATE PC BY ACC + STA PCL + STY PCH + RTS +PCADJL LDA LENGTH SET Y,A = PC+LENGTH +PCADJA LDY PCH SET Y,A = PC+ACC + TAX + BPL PCADJ2 + DEY +PCADJ2 ADC PCL + BCC RTS2 + INY +RTS2 RTS +STEP DEC YSAV F(S) +STEPL TXA + BEQ STEPZ + JSR SETBREAK FIRST TIME + LDX #1 + BNE SSTEP ALWAYS TAKEN +STEPZ JSR KYWAIT + BNE STEP1 + INC YSAV CTRL-C = EXIT TO NEXTITM + JMP ZSWAPE VIA ZSWAPE RTS +STEP1 CPY #$CA + BNE STEP2 + LDA JFLG J = SINGLE STEP + BEQ SSTEP IF NO JSR, ELSE + JMP TRCPCS EXECUTE SUBROUTINE +STEP2 CPY #$CC L = LOOP. SET BREAK + BNE STEP2A POINT AFTER INSTRUCTION + JSR PCADJL TO BE EXECUTED NEXT + STA BRKADDR AND ENTER TRACE. + STY BRKADDR+1 + JMP STEPT +STEP2A LDA JFLG SPC = SINGLE STEP IF + BNE STEP3 NOT JSR, ELSE IGNORE + CPY #$A0 + BEQ SSTEP +STEP3 CPY #$D3 S OR OPEN APPLE = + BEQ SSTEP SINGLE STEP ALWAYS + TYA + BEQ SSTEPW = 0 FOR OPEN APPLE. + CPY #$D4 T = ENTER TRACE MODE + BNE STEP4 + LDY #$FF +STEPT STY TFLG SET TRACE MODE FLAG + STY PCFLG ENABLE PC PRINTING + JMP STRACE AND ENTER TRACE. +STEP4 CPY #$D8 X = SKIP NEXT INSTRUCTION + BNE STEP5 + STZ JFLG ENABLE SPC IF SKP WHILE + STZ ERRFLG JSR DISPLAYED ACTIVE. + JSR PCADJ CLR IN CASE SKIP ERROR. + JMP JRTSX +STEP5 CPY #$C0 @ = TEXT MODE + BNE STEPL LOOP BACK FOR INPUT + JSR TEXT +SSTEPW JSR FWAIT PAUSE TO RELEASE O/A KEY +SSTEP JSR A1PC +SSTEPT JSR CLEARDSP TRACE RE-ENTRY TO STEP + JSR INSTDSP + JSR PRBLNK3 + JSR PEEK + AND #$0F + CMP #$01 SEE IF ZERO PAGE IND + BNE SSTEPZ + LDA #$A8 '(' + JSR COUT PRINT ABSOLUTE VALUE + JSR PEEK IN PARENTHESIS + AND #$10 + BNE INDY TAKEN FOR (NN),Y. + LDX XREG FOR (NN,X). +INDY TXA X=0 FOR (NN),Y + STA TEMP1 + LDY #1 + JSR YPEEK + CLC + ADC TEMP1 + PHA + JSR ZSWAP GET PROGRAM PAGE 0 AND + PLA SAVE POINTER ADDRESS ON + TAX STACK. + LDA $01,X + PHA + LDA $00,X + PHA + JSR ZSWAP RESTORE ANALYST PAGE 0 + PLA AND RECOVER POINTER ADDR. + TAX + PLA + JSR PRNTAX + LDA #$A9 ')' + JSR COUT +SSTEPZ JMP TSTEP +PRNTPC LDA #$FF PRINT PC AT TOP OF SCREEN + STA CV BY FORCING CROUT TO INC + JSR CROUT CV TO 0 (NEED FOR 80 COL) + LDA #29 + STA CH + LDA PROMPT + JSR COUT + LDA PCH + LDX PCL + JMP PRNTAX +TRACEPC LDX PCPNT SAVE PC TO BE EXEC'D + LDA PCH IN LIST BUFFER. + STA PCBUF,X + INX + LDA PCL + STA PCBUF,X + INX + CPX #32 + BCC PNTINC + LDX #0 +PNTINC STX PCPNT + LDA PB0 + BPL TRCPC1 + LDA PCFLG O/A TOGGLES PRINT PC + EOR #$FF ON/OFF + STA PCFLG + JSR FWAIT PAUSE TO RELEASE O/A KEY +TRCPC1 LDA PCFLG + BEQ TRCPC2 BYPASS PRINTING PC. + INC COUNTER PRINT PC + BNE TRCPC2 EVERY 256 INSTRUCTIONS + LDA PROMPT FLASHING '$' FOR TRACE + EOR #$04 ACTIVITY. $A4->$A0->$A4 + STA PROMPT + JSR PRNTPC +TRCPC2 LDA JFLG + BEQ TRACE5 + LDA PCH + CMP #$C0 + BCC TRCPCD + LDY ROMFLG + BNE TRCPCD + CMP #$D0 + BCC TRCPCI + LDY IDROM JSR ROM $C000-FFFF IN + CPY #$4C IMMEDIATE MODE UNLESS + BEQ TRCPCI ROM FLAG SET <> 0. +TRCPCD CMP DOSCALL+1 TRACE THRU JSR UNLESS = + BNE TRACE5 DOS SUBROUTINE SPECIFIED + LDA PCL BY F(/). + CMP DOSCALL + BNE TRACE5 +TRCPCI LDA PCFLG EXEC JSR IMMEDIATE. DON'T + BEQ TRCPCS PRINT IF O/A TURNED OFF. + JSR SPROMPT '#' DENOTES JSR IMMED. + JSR PRNTPC PRINT EXEC SUBROUTINE + JSR DPROMPT '$' PROMPT + LDA #$FF FORCE PC PRINTING + STA COUNTER AFTER JSR IMMED. +TRCPCS LDA PCL SEE IF PC = $BF00 + BNE TRCPCG + LDA PCH + CMP # TRACE ENTRY POINT + STZ DSPTOP FOR STEP -> TRACE + JSR DPROMPT '$' PROMPT + JSR CLEARDSP +TRACE5 LDX #1 IF PC = A4 THEN ENTER STEP +TRACE6 LDA PCL,X + CMP BRKADDR,X + BNE TRACE7 + DEX + BPL TRACE6 + JSR SETBREAK CLEAR OLD BREAKPOINT + BRA TRACES +TRACE7 LDA PB1 BACK TO STEP MODE IF + BMI TRACES CLOSED APPLE PRESSED + JMP TRACE8 +TRACES STA KBDSTRB + STZ TFLG CLEAR TRACE FLAG + STZ DSPTOP RESET DISPLAY TO TOP + LDA RDTEXT SEE IF GRAPHICS MODE + BMI TRACES2 + JSR TEXT GRAPHICS -> TEXT +TRACES2 JSR STPRMPT PROMPT BACK TO OLD '#' + DEC YSAV + LDY YSAV + LDA #$D3 PUT 'S' INTO INPUT BUFFER + STA IN,Y + JMP SSTEPT RE-ENTER STEP MODE +NBRNCH JSR SAVE ALL OTHER OPCODES + BRA UPDPC +BRANCH JSR SAVE BRANCH WITH COND. MET + CLC + LDY #$01 + JSR YPEEK + JSR PCADJAP +UPDPC SEC +PCINC JSR PCADJLP +NEWPC LDA TFLG + BNE TRACEBY BYPASSES NEXTITM +NXTPC JSR CROUT + JMP REGDSP +TRACEBY JMP TRACEPC +XJMPATX INX + BNE XJMPAT +XJSR STA JFLG OK FOR F(J) + INC DSPTOP + CLC + JSR PCADJL SET Y,A = RTS ADDR + PHA + LDX SPNT + TYA + STA STACK,X + DEX + PLA + STA STACK,X + DEX + STX SPNT + LDY #$02 +XJMP CLC +XJMPAT JSR YPEEK + PHA + DEY + JSR YPEEK + STA PCL + PLA + STA PCH + BCC NEWPC + DEX + BNE XJMP + LDA XREG + CLC + JSR PCADJAP + LDY #1 + BRA XJMP +TRACE8 JSR INSDST +TSTEP LDA ERRFLG IF BAD OPCODE THEN BRK + BNE XBRK + STZ JFLG DISALLOW F(J) IF NO JSR + JSR PEEK GET OPCODE + LDY LENGTH + CPY #2 CHECK ALL 3-BYTE INST + BEQ TSTEP3 + JMP TSTEP4 +TSTEP3 CMP #$20 + BEQ XJSR + CMP #$7C + BEQ XJMPATX + CMP #$4C + BEQ XJMP + CMP #$6C + BEQ XJMPAT + PHA SAVE OPCODE. + JSR YPEEK GET ADDRESS HI-BYTE. + CMP #$01 HANDLE 3-BYTE $100 REF + BNE TSTEP3X SPECIAL. + PLA ADJ STACK. + LDA STACKLOC+2 SUBSTITUTE PSUEDO-STACK + BRA XQSTK + DS 8,0 +XQST1 JSR YPEEK +XQSTK STA XQTS+3,Y + DEY + BPL XQST1 + JSR RESTORE + JMP XQTS+3 EXEC IN ANALYST R/W MODE +XBRK STZ DSPTOP + STZ TFLG + JSR CLEARDSP + JSR INSTDSP + JSR CROUT + JSR RGDSP1 + JSR BELL + JMP ZSWAPE EXIT VIA NEXTITM +TSTEP3X CMP #$C0 $C002-C005, $C008-C009 + BNE TSTEP5 AUX R/W SWITCHES HANDLE + DEY SPECIAL. + JSR YPEEK + INY + CMP #$02 + BCC TSTEP5 + CMP #$04 + BCC TSTEPRD + CMP #$06 + BCC TSTEPWR + CMP #$08 + BCC TSTEP5 + CMP #$0A + BCS TSTEP5 + STA TEMP3 + ROR A + ROR A + EOR RDAUXZP + BPL STOUT2 NO CHANGE IN ZP STATE. + JSR ZSWAP RESTORE PROGRAM ZP. + LDA TEMP3 NEW ZP STATE + LSR A ODD/EVEN 9/8 + BCS ODDNEW + LDA #9 NEW = 8 + DFB $2C +ODDNEW LDA #8 NEW = 9 + STA TEMP2 OLD STATE + LDX #0 COPY XQTS ACROSS +STKLOOP LDY TEMP2 + STA $C000,Y OLD ZP + LDA $0100,X + LDY TEMP3 + STA $C000,Y NEW ZP + STA $0100,X + INX + BEQ STKOUT + CPX #>IN+12 + BNE STKLOOP + TSX COPY ANALYST STACK ACROSS + BRA STKLOOP +TSTEPRD STA XQTS+44 SET PROGRAM READ STATE. + BRA STOUT2 +TSTEPWR STA XQTS+47 SET PROGRAM WRITE STATE. + BRA STOUT2 +STKOUT JSR ZSWAP PUT ANALYST ZP BACK. +STOUT2 PLA PULL OPC TO ADJ STACK +UPDPCGO JMP UPDPC +TSTEP4 CPY #1 + BNE LEN0 + PHA SAVE OPCODE +TSTEP5 LDA #$EA + STA XQTS+4 + STA XQTS+5 + PLA OPCODE + CMP #$80 + BNE NBRA + ORA #$10 +NBRA AND #$1F + EOR #$14 + CMP #$04 = BRANCH OFFSET + BEQ XQ2 TAKEN IF BRANCH OPCODE +XQ1 JSR YPEEK Y = LENGTH +XQ2 STA XQTS+3,Y XQT BCS BRNCH (B0 04) + DEY NOP + BPL XQ1 JMP NBRNCH (CCLR) + JSR RESTORE BRNCH JMP BRANCH (CSET) + JMP XQTS +XTSX LDX SPNT + STX XREG +XTXS LDX XREG + STX SREF +UPDSPNT STX SPNT UPDATE SPNT + BRA UPDPCGO +LEN0 CMP #$60 + BEQ XRTS + CMP #$BA + BEQ XTSX + CMP #$9A + BEQ XTXS + CMP #$40 + BEQ XBRKGO BRK FOR RTI INSTRUCTION + CMP #$00 + BNE PHCHECK +XBRKGO JMP XBRK +PHCHECK PHA SAVE OPCODE + CMP #$5A + BCC TSTEP6 + TAX + AND #$1F + CMP #$1A + BEQ STKOPC PHX,PLX,PHY,PLY + TXA +TSTEP6 AND #$9F + CMP #$08 PHA,PLA,PHP,PLP + BNE TSTEP5 +STKOPC LDX SPNT STACK OPCODES + PLA OPCODE + TAY + AND #$10 + BEQ APCODE + TYA + ASL A + BCS OPCX + ASL A + ASL A + BCS XPLY + LDA YREG XPHY + BRA PUSH +XPLY JSR PULL + STA YREG +UPDSTACK BRA UPDSPNT +OPCX ASL A + ASL A + BCS XPLX + LDA XREG XPHX + BRA PUSH +XPLX JSR PULL + STA XREG + BRA UPDSTACK +APCODE TYA + ASL A + ASL A + BMI PULLAP + BCC XPHP + LDA ACC XPHA + BRA PUSH +XPHP LDA STATUS +PUSH STA STACK,X + DEX + BNE UPDSTACK +PULLAP BCC XPLP + JSR PULL XPLA +ACCLOC STA ACC + BRA UPDSTACK +XPLP JSR PULL + STA STATUS + BRA UPDSTACK +XRTS LDX SPNT + INX +STACKLOC LDA STACK,X + STA PCL + INX + LDA STACK,X + STA PCH + STX SPNT + DEC DSPTOP + JMP PCINC +PULL INX + LDY STATUS PULL FROM STACK AFFECTS + PHY N & Z FLAGS + PLP + LDA STACK,X + PHP UPDATE N & Z + PLY + STY STATUS + RTS +YPOKEPC PHA EXECUTE STA (PCL),Y + LDA PCL + STA A3L + LDA PCH + STA A3H + PLA + JMP YPOKE +* +* XQTS IMAGE AT $102-139. INSTRUCTIONS WITH '@' ARE +* CHANGEABLE IN XQTS AREA TO SET MAIN/AUX R/W STATE. +* +INITBL JSR XQTS+36 WARMV. REAL-TIME REENTRY + JMP REENTER BY JSR $102. + JSR XQTS+43 XQTS + NOP + NOP + NOP + JMP XQTS+15 + JSR XQTS+36 + JMP BRANCH + JSR XQTS+36 XQTS+15 + JMP NBRNCH + JSR XQTS+43 YPOKE + STA (A3L),Y + JMP XQTS+36 + LDY #0 PEEK + JSR XQTS+43 YPEEK + LDA (PCL),Y + STA MAINRD @ XQTS+36. SET ANALYST + STA MAINWR @ STATE + RTS + STA MAINRD @ XQTS+43. SET PROGRAM + STA MAINWR @ STATE + RTS +* +SETBREAK LDX #1 SET BREAKPOINT TO A4 + LDA BRKADDR+1 IF GIVEN, ELSE $FFFF. + BEQ SETBRK2 BREAKPOINT GIVEN + LDA #$FF +SETBRK1 STA BRKADDR,X CLEAR OLD BREAKPOINT + DEX + BPL SETBRK1 + RTS +SETBRK2 LDA A4L,X SET BREAKPOINT + STA BRKADDR,X + DEX + BPL SETBRK2 + RTS +LOAD LDA XQLOC1+1 F(H) + LDY XQLOC1+2 SETUP A3 = XQT+1 FOR HSF + BRA A3SET BUFFER (XQT=BYTE COUNT) +SETRG1 JSR A1PC + JSR SAVEPC +SETRG2 LDA ACCLOC+1 SETUP REGS FOR F(:) + LDY ACCLOC+2 +A3SET STA A3L + STY A3H + RTS +SETREG TXA F(I) SET OR DISPLAY REGS. + BNE SETRG1 TAKEN IF PC GIVEN. + LDY YSAV + LDA IN,Y + CMP #$8D + BNE SETRG2 + LDA PCREG I DISPLAYS REGS. + STA PCL + LDA PCREG+1 + STA PCH +REGDSP JSR RGDSP1 + JMP INSTDSP WILL RTS TO NEXTITM + DS 3,0 +RGDSP1 LDX #0 +RDSP1 LDA RTBL,X + JSR COUT + LDA #$BD + JSR COUT + LDA ACC,X + JSR PRBYTE + JSR OUTSP + INX + CPX #3 + BCC RDSP1 + LDX #7 +PRFLG LDA CHAR3,X PRINT 'NV-BDIZC' + JSR COUT + DEX + BPL PRFLG + JSR CROUT + LDA #$C1 PRINT ACC IN BINARY + JSR COUT + JSR OUTEQ + LDA ACC + JSR BNDSP + JSR PRBLNK3 + LDA #$D0 PRINT STATUS IN BINARY + JSR COUT + JSR OUTEQ + LDA STATUS + JSR BNDSP + JSR CROUT + LDA #$D3 + JSR COUT + JSR OUTEQ + LDA SPNT + JSR PRBYTE + LDA #$BA + JSR COUT + LDA #$D8 + JSR COUT + JSR COUT + LDY #10 + LDX SPNT +PRNTSTK JSR OUTSP PRINT STACK BYTES FROM + CPX SREF SPNT TO SREF UP TO 10 + BEQ SAVEPC MAX. + INX + LDA STACK,X + JSR PRBYTE + DEY + BNE PRNTSTK +SAVEPC LDA PCL + STA PCREG + LDA PCH + STA PCREG+1 + RTS +BNDSP LDX #$08 INDEX FOR 8 BITS +NEXTBIT ASL A + PHA + BCS BIT1 + LDA #$30 '0' + DFB $2C SKIP NEXT INSTRUCTION +BIT1 LDA #$31 '1' + JSR COUT + PLA + DEX + BNE NEXTBIT + RTS +BELL LDY #$38 DURATION +BELL2 LDA #$2B FREQUENCY + JSR WAIT + LDA SPKR + DEY + BNE BELL2 + RTS +COUTZ JMP (CSWL) +VIDOUT BIT #$60 + BEQ CTRLCHAR + TAY + CMP #$60 + BCS VID1 + CMP #$40 + BCC VID1 + AND #$BF +VID1 LDY CH + BIT RD80VID + BPL VID3 + PHA + TYA + LSR A + BCS VID2 + STA HISCR +VID2 TAY + PLA +VID3 STA (BASL),Y + STA LOWSCR + LDY CH + INY + CPY WNDWDTH + BCS CR + STY CH +VIDRTS RTS +BACKSPC DEC CH + BPL VIDRTS + LDY WNDWDTH + DEY + STY CH +UP LDA CV + DEC A + CMP #0 + BMI VIDRTS +VTABVGO JMP VTABV +CTRLCHAR ORA #$80 + CMP #$88 + BEQ BACKSPC + CMP #$8D + BNE VIDRTS +CR LDA #$00 + STA CH + INC CV + LDA CV + CMP #24 + BCC VTABVGO + DEC CV + LDX #0 SCROLL + TXA + JSR VTABZ + BRA SCRL5 +SCRL1 LDY BASH + STY BAS2H + LDY BASL + STY BAS2L + TXA + JSR VTABZ + PHX + LDX WNDWDTH + LDY #0 +SCRL2 BIT RD80VID + BPL SCRL3 + STA HISCR + LDA (BASL),Y + STA (BAS2L),Y + DEX + BEQ SCRL4 + STA LOWSCR +SCRL3 LDA (BASL),Y + STA (BAS2L),Y + INY + DEX + BNE SCRL2 +SCRL4 STA LOWSCR + PLX +SCRL5 INX + CPX #24 + BCC SCRL1 + LDA #$00 + JSR CLEOLZ + JMP VTAB +HOME LDA #0 + STA CH + STA CV +CLS1 PHA + JSR VTABZ + LDA #0 + JSR CLEOLZ + PLA + INC A + CMP #24 + BCC CLS1 +VTAB LDA CV +VTABV STA CV +VTABZ PHA + LSR A + AND #$03 + ORA #$04 + STA BASH + PLA + AND #$18 + BCC BSCLC2 + ADC #$7F +BSCLC2 STA BASL + ASL A + ASL A + ORA BASL + STA BASL + RTS +CLREOL LDA CH +CLEOLZ BIT RD80VID + BPL CLEOL4 + PHA CLREOL 80 COL + SEC + SBC WNDWDTH + TAX + PLA + LSR A + TAY + PHP + LDA #$A0 + PLP + BCS CLEOL8B +CLEOL8A STA HISCR + STA (BASL),Y + INX + BEQ CLEOL8C +CLEOL8B STA LOWSCR + STA (BASL),Y + INY + INX + BNE CLEOL8A +CLEOL8C STA LOWSCR + RTS +CLEOL4 TAY + SEC + SBC WNDWDTH + TAX + LDA #$A0 +CLEOL4A STA (BASL),Y + INY + INX + BNE CLEOL4A + RTS +CLEARDSP LDX #6 CLEAR DISPLAY WINDOW +CLRDSP1 LDA DSPTOP + BPL CLRDSP2 HOLD TOP OF DISPLAY + LDA #0 0 <= TOP <= 18. +CLRDSP2 CMP #18 + BCC CLRDSP3 + LDA #18 +CLRDSP3 STA DSPTOP + STA CV CLEAR 6 LINE DISPLAY + DEC CV FROM DSPTOP DOWN AND + TXA SET CV SO INSTDSP WILL + BEQ RTS4A PRINT AT DSPTOP UPON +CLRDSP4 JSR CROUT EXIT. + PHX + JSR CLREOL + PLX + DEX + BNE CLRDSP4 + BEQ CLRDSP1 +RTS4A RTS +FWAIT LDA #$FF +WAIT SEC +WAIT2 PHA +WAIT3 SBC #$01 + BNE WAIT3 + PLA + SBC #$01 + BNE WAIT2 + RTS +NXTA4 INC A4L INCREMENT A4 + BNE NXTA1 + INC A4H +NXTA1 LDA A1L + CMP A2L + LDA A1H + SBC A2H + INC A1L + BNE RTS4B + INC A1H +RTS4B RTS CARRY SET IF A1 >= A2 +CTRLC LDY KBD CHECK FOR CTRL-C + BPL CTLCRTS + STY KBDSTRB + CPY #$93 CTRL-S = PAUSE + BNE CTLC +KYWAIT LDY PB0 F(S) ENTRY POINT + BMI KYWT2 + LDY KBD + BPL KYWAIT + STY KBDSTRB + DFB $2C +KYWT2 LDY #0 0 = OPEN APPLE PRESSED +CTLC CPY #$83 +CTLCRTS RTS Z SET FOR CTRL-C. +RDKEY STY YSAV1 + LDY RDSCR + PHP + LDY RDPAGE2 + PHP + STA INHPAGE2 + STA LOWSCR + PHX + LDA CH + BIT RD80VID + BPL KEY2 + LSR A + BCS KEY2 + STA HISCR +KEY2 TAY + LDA (BASL),Y + PHA + EOR #$80 + BIT #$20 + BNE KEY3 + EOR #$40 +KEY3 STA (BASL),Y +KEY4 LDX KBD + BPL KEY4 + STA KBDSTRB + PLA + STA (BASL),Y + STA LOWSCR + TXA + JMP ENDHOOK +NOTCR LDA IN,X + JSR COUT + CMP #$88 + BEQ BCKSPC + CPX #34 BEEP ON LAST 4 CHAR. + BCC NOTCR1 + JSR BELL +NOTCR1 INX + CPX #38 38 CHARACTERS ALLOWED + BCC NXTCHAR + LDA #$DC + JSR COUT +GETLNZ JSR CROUT + LDA PROMPT + JSR COUT + LDX #$01 +BCKSPC TXA + BEQ GETLNZ + DEX +NXTCHAR JSR RDKEY + CMP #$95 + BEQ NXTCHAR IGNORE '->' + CMP #$FF + BNE NOTDEL + LDA #$88 DELETE KEY = BACKSPACE +NOTDEL CMP #$88 + BNE CAPTST + PHA + JSR COUT BACKSPACE + JSR OUTSP DELETE CHARACTER + PLA BACKSPACE +CAPTST CMP #$E0 + BCC ADDINP + AND #$DF +ADDINP STA IN,X + CMP #$8D + BNE NOTCR +CROUT LDA #$8D + BNE COUTGO +OUTSP LDA #$A0 + BNE COUTGO +PRA1 JSR CROUT + LDY A1H + LDX A1L +PRYX2 JSR PRNTYX + LDY #$00 + LDA #$AD +COUTGO JSR COUT +PRA1RTS RTS +ASC SEC F(") +XAM ROR A CARRY INTO BIT 7 + STA A3H + BRA XAM1 +MOD8CHK LDA A1L + AND #$07 + BNE DATAOUT +XAM1 JSR CTRLC F(.) A1.A2 HEX OR ASC + BEQ PRA1RTS + JSR PRA1 +DATAOUT JSR OUTSP + LDA A1H SEE IF ZERO PAGE + BEQ XAMZ + DEC A SEE IF $01NN + BNE XAM2 + LDA A1L GET $01NN FROM STACK,NN + TAX + LDA STACK,X + BRA XAM3 +XAMZ LDA A1L + SEC + SBC #PCL + BCC XAM2 TAKEN IF A1L < PCL + TAX ELSE GET FROM ZBUF + LDA ZBUF,X + BRA XAM3 +XAM2 JSR A1PCX + JSR PEEK +XAM3 LDX A3H + BPL XAM4 + ORA #$80 XAM IN ASC + CMP #$A0 + BCS PRASC TAKEN IF NORM. OR LCASE + LDA #$A0 SPACE FOR CTRL OR INV +PRASC JSR COUT + BRA XAM5 +XAM4 JSR PRBYTE XAM IN HEX +XAM5 JSR NXTA1 + BCC MOD8CHK CARRY CLEAR IF A1 ZFLG:AA + STA ZFLG +RST2 JSR INITXQTS + STZ TFLG + STZ JFLG +TXTMON JSR TEXT + JSR HOME + JSR PRTITLE +MONZ STZ ERRFLG + DEC BRKADDR+1 INSURE BRKPOINT CLEARED + JSR CHKVID MATCH HOOKS W/DISPLAY MODE + JSR STPRMPT + JSR GETLNZ +PARSE JSR ZMODE + STZ DSPTOP DISPLAY AT TOP +NXTITM JSR GETNUM HANDLE HEX DIGS TO 1ST + STY YSAV NON-HEX CHAR+1 (Y=INDX) + LDY #SUBTBL-CHRTBL +CHRSRCH DEY ACC = F(ACC) + BMI SYNERR + CMP CHRTBL,Y + BNE CHRSRCH + PHY + JSR TOSUB + PLY + BEQ MONZ 0 = OFFSET FOR F(CR) +NEXTITM LDY YSAV + BRA NXTITM +SYNERR JSR BELL + BRA MONZ +DIG LDX #$03 HEX DIGIT NOW IN ACC LO + ASL A NIBBLE. KEYS 0-9=00-09 + ASL A KEYS A-F=FA-FF. MOVE + ASL A LO NIBBLE TO HI NIBBLE + ASL A +NXTBIT ASL A 4 BIT HEX DIG. INTO A2L + ROL A2L A2L TO A2H + ROL A2H + DEX + BPL NXTBIT +NXTBAS LDA MODE + BNE NXTBS2 IF MODE=0 COPY + LDA A2H,X A2 TO A1 & A3 + STA A1H,X + STA A3H,X +NXTBS2 INX + BEQ NXTBAS + BNE NXTCHR +GETNUM LDX #0 + STX A2L + STX A2H +NXTCHR LDA IN,Y F(ACC) = ACC EOR $B0 + INY ADC $88 (CARRY SET) + EOR #$B0 KEYS 0-9=$00-09 + CMP #$0A + BCC DIG TAKEN IF KEYS 0-9 + ADC #$88 KEYS A-F=$FA-FF + CMP #$FA + BCS DIG TAKEN IF KEYS A-F + RTS +TOSUB TYA # OF FUNCTION (START=0) + ASL A MULT BY 2 + TAY + LDA SUBTBL+1,Y + PHA + LDA SUBTBL,Y + PHA + LDA MODE OLD MODE FOR F(CR)&F( ) +ZMODE LDY #$00 + STY MODE + RTS RTS TO SUBROUTINE +EXECJSR LDA JFLG F(J) + BNE GOJSR 'J' WITH NO JSR? +ERRJ JMP BELL RTS TO NEXTITM VIA BELL. +GOJSR LDY YSAV GET # OF PARM BYTES + JSR GETNUM + DEY + STY YSAV + LDA A2H + BNE ERRJ + LDA A2L + CMP #10 + BCS ERRJ ONLY 9 PARM BYTES MAX + TAY SAVE BYTE COUNT +GOPC LDX #17 +XQINIT2 LDA INITBL2,X FILL DUMMY BLOCK + STA XQT,X + DEX + BPL XQINIT2 + LDA PCL MOVE JSR ADDR TO XQT +XQLOC1 STA XQT+1 + LDA PCH + STA XQT+2 + LDX SPNT SET PC = PARM LIST - 1 + INX + LDA STACK,X + STA PCL + INX + LDA STACK,X + STA PCH + STX SPNT + TYA GET PARM BYTES + TAX + BEQ MVPRM1 NO PARM BYTES TO MOVE +MOVPARM JSR YPEEK MOVE PARM LIST TO DUMMY + STA XQT+2,Y + DEY + BNE MOVPARM +MVPRM1 INX + TXA ADJ PC TO POINT TO INST + CLC FOLLOWING PARM LIST + JSR PCADJAP + JMP XQJ EXECUTE JSR IMMED. MODE +INITBL2 JSR $0000 DUMMY BLOCK FOR F(J) + NOP 9 NOP'S FOR PARM BYTES + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + JSR XQTS+36 RESTORE ANALYST R/W + JMP JRTS +JRTS JSR SAVE + JSR CHKVID + LDA JFLG + BEQ JRTS3 DURING 'G0' W/O BREAK + STZ JFLG + LDA TFLG + BEQ JRTS2 DURING 'STEP' + JMP TRACE5 DURING TRACE IMMEDIATE +JRTS2 DEC DSPTOP UPDATE REGDSP AFTER JSR. +JRTSX JSR CLEARDSP 'SKIP' ENTERS HERE + JMP NXTPC +JRTS3 RTS RTS TO NEXTITM. +FIND LDA #$FF F(CTRL-F) A4 ALONE EXITS + JMP STPRMPT VIA NEXTITM +MINI2 JSR GETNUM + CMP #$93 F(:) +A1TOPC BNE ERROR + TXA + BEQ ERROR + JSR A1PCLP +RDMNEM LDA #$03 INDEX FOR 3 CHAR MNEM + STA A1H +RDMNEM2 JSR CHARIN + ASL A + SBC #$BE + CMP #$C2 LESS THAN 'A' + BCC ERROR NOT ASC LETTER SO ERR + ASL A + ASL A + LDX #$04 INDEX FOR 5 BITS +RDMNEM3 ASL A MOVE 5 BIT LETTER CODE + ROL A4L (* 3 LETTERS) INTO A4. + ROL A4H 26 LETTERS REQ. 5 BITS + DEX + BPL RDMNEM3 + DEC A1H + BEQ RDMNEM3 + BPL RDMNEM2 + LDX #$05 INDEX FOR 6 FORMAT BITS +RDFMT JSR CHARIN + STY YSAV + CMP CHAR1,X + BNE RDFMT2 + JSR CHARIN + CMP CHAR2,X + BEQ RDADDR + LDA CHAR2,X + BEQ RDFMT3 + CMP #$A4 + BEQ RDFMT3 + LDY YSAV +RDFMT2 CLC +RDFMT3 DEY +RDADDR ROL A5L + CPX #$03 + BNE RDADDR3 + JSR GETNUM + LDA A2H + BEQ RDADDR2 + INX +RDADDR2 STX YSAV1 + LDX #$03 + DEY +RDADDR3 STX A1H + DEX + BPL RDFMT + LDA A5L + ASL A + ASL A + ORA YSAV1 + CMP #$20 + BCS RDADDR4 + LDX YSAV1 + BEQ RDADDR4 + ORA #$80 +RDADDR4 STA A5L + STY YSAV + LDA IN,Y + CMP #$8D + BEQ DISAS + JMP A1TOPC +DISAS JMP DSS +CHARIN LDA IN,Y + INY + CMP #$A0 + BEQ CHARIN +ENDMINI RTS +RELOC LDA STARTLOC+1 F(R) + STA PCH + STZ PCL MAKE SURE ANALYST IS + JSR PEEK BEING READ FOR MOVE + CMP #$4C BY PEEKING START BYTE. + BNE ENDMINI DO NOT RELOCATE! + LDA A1H + STA A4H + PHA + STZ A4L + LDA STARTLOC+1 + STA A1H + STA A5L + STZ A1L + LDA AUXV+2 LOCATION OF 'AUXLOAD' + STA A2H WHICH MARKS END. + LDA AUXV+1 + STA A2L + LDA A1H CALC DIFFERENCE BETWEEN + SEC OLD & NEW ORG + SBC A4H + STA A5H + LDA #AUXV-SUBTBL + LSR A DIVIDE BY 2 + TAY # OF WORDS + LDX #$FF +RELOC2 INX CONVERT SUBTBL WORDS + INX + LDA SUBTBL,X + SEC + SBC A5H + STA SUBTBL,X + DEY + BNE RELOC2 + LDA #$60 PUT IN RTS TO DISABLE + STA AUXV AUX LOADER. NOT MOVED. + JSR MOVE NEW ORG 80 +CHK80 BCC SET40 80 -> 40 +RTS7 RTS +SETVID LDY YSAV F(@) + LDA IN,Y + INC YSAV + CMP #$B4 '4' + BEQ SET40 + CMP #$B8 '8' + BEQ SET80 + DEC YSAV @ ALONE +TEXT LDA OUTVECT + STA CSWL + LDA OUTVECT+1 + STA CSWH + STA INHPAGE2 FOR AUX TO DISPLAY TEXT. + STA TXTSET + LDA RD80VID SET 40 OR 80 COL + BPL SET40 TEXT BASED ON RD80VID +SET80 LDA #$FF + STA FLG8 + LDA #80 + STA WNDWDTH + BIT RD80VID + BMI SET8D + STA SET80VID + LDA #$00 +SET8A PHA + JSR VTABZ + LDY #$00 +SET8B LDA (BASL),Y + TAX + PHY + TYA + LSR A + TAY + BCS SET8C + STA HISCR +SET8C TXA + STA (BASL),Y + PLY + STA LOWSCR + INY + CPY #$28 + BCC SET8B + TYA + JSR CLEOLZ + PLA + INC A + CMP #$18 + BCC SET8A +SET8D BRA SETDONE +SET40 STZ FLG8 + BIT RD80VID + BPL SET4D + STA CLR80VID + LDA #$00 +SET4A PHA + JSR VTABZ + LDY #$27 +SET4B TYA + LSR A + PHY + TAY + BCS SET4C + STA HISCR +SET4C LDA (BASL),Y + PLY + STA LOWSCR + STA (BASL),Y + DEY + BPL SET4B + PLA + INC A + CMP #$18 + BCC SET4A +SET4D LDA #40 + STA WNDWDTH +SETDONE JMP VTAB +HELP LDY #0 F(?) LIST LAST 16 PC +HLP2 LDA PCBUF,Y ADDRESSES EXECUTED + INY DURING TRACE. + LDX PCBUF,Y + INY + JSR PRNTAX + CPY PCPNT + BNE HLP3 + LDA #$BC + JSR COUT +HLP3 JSR CROUT + CPY #32 + BCC HLP2 + RTS +PRTITLE LDX #$00 F(V). PRINT TITLE +TITLLOC LDA TITLE,X + BEQ PRADDR + JSR COUT + INX + BRA TITLLOC +PRADDR LDA STARTLOC+1 PRINT ORIGIN ADDRESS + JSR PRBYTE + LDA #0 + JSR PRBYTE + JMP CROUT + SKP 1 +*** PROGRAM DATA AREA *** + SKP 1 +TITLE DFB $8D + ASC "ANALYST 128XE" + DFB $8D TITLE MARKS START OF PDA + ASC "ORG = " +BANKORG ASC "$" + DFB $00 +DOSTR ASC "3F5<3D0G" + DFB $8D +MNEML DFB 28,138 + DFB 28,35,93,139,27,161,157,138 + DFB 29,35,157,139,29,161,28,41 + DFB 25,174,105,168,25,35,36,83 + DFB 27,35,36,83,25,161,173,26 + DFB 165,91,165,172,139,138,174,174 + DFB 168,173,41,138,124,139,21,156 + DFB 109,156,165,105,41,83,132,19 + DFB 52,17,165,105,35,160 +MNEMR DFB 216,98 + DFB 90,72,38,98,148,136,84,68 + DFB 200,84,104,68,232,148,196,180 + DFB 8,132,116,180,40,110,116,244 + DFB 204,74,114,242,164,138,6,170 + DFB 118,162,116,198,116,116,68,104 + DFB 178,50,178,114,34,114,26,26 + DFB 38,38,114,114,136,200,196,202 + DFB 38,72,68,68,162,200 +CHAR1 DFB 172,169,172,163,168,164 +CHAR2 DFB 217,0,216,164,164,0 +CHAR3 ASC "CZIDB-VN" +RTBL ASC "AXY" +FMT2 DFB 0,33,129,130,90,73,89,77 + DFB 145,146,134,74,133,157 +FMT1 DFB 240,34,0,51,93,130,0,147 + DFB 243,34,0,51,93,136,0,153 + DFB 240,47,0,51,93,143,0,159 + DFB 240,34,0,59,93,136,0,148 + DFB 253,34,0,51,93,200,0,147 + DFB 17,34,0,51,93,200,0,169 + DFB 241,34,0,51,93,143,0,159 + DFB 241,34,0,51,93,143,0,159 + DFB 38,49,135,154 +OPC65C DFB 18,50,82,114 + DFB 146,178,210,242,58,26,137,28 + DFB 20,122,90,156,100,158,116,124 + DFB 60,52 + DFB 76,164,172,180,188,196,204,228 + DFB 236 +REPL65C DFB 17,49,81,113,145,177 + DFB 209,241,194,226,52,164,172,196 + DFB 228,92,92,92,92,124,60,52 + DFB 124,160,160,160,160,192,192 + DFB 224,224 +CHRTBL DFB 198,152,249,177,241,3 + DFB 236,6,149,5 + DFB 0,147,2,167,153 + DFB 155,154,239,233,1,191 + DFB 168,237,159,235,197 +SUBTBL DW BL1-1 F(CR) MUST BE 1ST IN TBL + DW HELP-1 F(?) LIST PC'S TRACED + DW SETVID-1 F(@) SWITCH 40/80 COL + DW AUXV-1 F(CTRL-X) MOVE TO AUX + DW AUXRW-1 F(X) MAIN/AUX $200-BFFF + DW EXECJSR-1 F(J) EXECUTE JSR + DW STEP-1 F(S) STEP + DW MOVE-1 F(M) MOVE + DW LT-1 F(<) COPY A2 TO A4 & A5 + DW LIST-1 F(L) LIST DISASSEMBLY + DW GO-1 F(G) GO + DW SETMODE-1 F(:) STORE + DW SETREG-1 F(I) SET INTERNAL PC/REG + DW SETMODE-1 F(.) XAM + DW BLANK-1 F( ) HANDLE SPACES + DW ASC-1 F(") DUMP IN ASCII + DW MINI-1 F(!) MINI-ASSEMBLER + DW PRTITLE-1 F(V) PRINT TITLE + DW SETPRNT-1 F(P) TO PRINTER + DW LOAD-1 F(H) LOAD FOR HSF + DW FIND-1 F(CTRL-F) HEX SEQ. FIND + DW SETDOS-1 F(/) SET DOS CALL JSR #. + DW TRACE-1 F(T) TRACE + DW EXDOS-1 F(&) EXIT TO DOS + DW RELOC-1 F(R) RELOCATOR + DW HOME-1 F(CTRL-L) CLEAR SCREEN +OUTVECT DW VIDOUT +STARTLOC DW START + SKP 1 +* DYNAMIC PROGRAM AREA * + SKP 1 +AUXV JMP AUXLOAD F(CTRL-X) ONE TIME VECTOR +CSWL DS 1 ADDR. OF OUTPUT ROUTINE +CSWH DS 1 +TFLG DS 1 <>0 = CANCEL COUT FOR TRC +JFLG DS 1 SET TO ALLOW F(J) +DOSCALL DW MLI ROUTINE TO JSR IMMED. +ERRFLG DS 1 SET FOR BAD OPCODE +PCREG DS 2,0 +ACC DFB 0 DON'T CHANGE ORDER +XREG DFB 0 OF ACC TO SPNT +YREG DFB 0 +STATUS DFB 0 +SPNT DFB $FF +SREF DFB $FF STACK REF SET BY TXS OPC +LMNEM DS 1 +RMNEM DS 1 +LENGTH DS 1 +FORMAT DS 1 +MODE DS 1 +FLG8 DS 1 FF = 80 COL, 0 = 40 COL +WNDWDTH DS 1 +PROMPT DS 1 +CH DS 1 +CV DFB 0 +DSPTOP DS 1 TOP OF DISPLAY FOR STEP +YSAV DS 1 +YSAV1 DS 1 +PCPNT DFB 0 INDEX TO PCBUF +BRKADDR DS 2,255 BREAK FOR STEP,TRACE,LIST +TEMP1 DS 1 FOR INSTDSP AND STEP. +TEMP2 DS 1 FOR STEP. +TEMP3 DS 1 FOR STEP. +PCFLG DS 1 PRNTPC ON/OFF FOR TRACE +COUNTER DS 1 FOR TRACE +ZBUF DS $100-PCL PAGE ZERO STORAGE BUFFER +PAGEFIL EQU >* + DS $FF-PAGEFIL +ROMFLG DFB 0 1 = TRACE JSR ROM $D000-FFFF +STACK DS $100,0 MUST BE ON PAGE BOUNDARY +AUXLOAD LDA #>START F(CTRL-X) MOVE ANALYST + STA MA1 TO AUX. THIS CODE NOT + STA MA4 RELOCATEABLE. + LDA #AUXLOAD + STA MA2 + LDA #