P. 1
SYM Monitor Listing

SYM Monitor Listing

5.0

|Views: 308|Likes:
Publicado porMoe B. Us
SYM-1 SUPERMON AND AUDIO CASSETTE INTERFACE SOURCES COMBINED AND CONVERTED TO TELEMARK ASSEMBLER (TASM) V3.1
SYM-1 SUPERMON AND AUDIO CASSETTE INTERFACE SOURCES COMBINED AND CONVERTED TO TELEMARK ASSEMBLER (TASM) V3.1

More info:

Published by: Moe B. Us on Apr 03, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

08/25/2015

pdf

text

original

SYM-1 SUPERMON AND AUDIO CASSETTE INTERFACE SOURCES

COMBINED AND CONVERTED TO TELEMARK ASSEMBLER (TASM) V3.1
0002 0000 ;
0003 0000 ;*****
0004 0000 ;***** COPYRI!T 1"#" SYNERTEK SYSTEMS CORPORATION
000$ 0000 ;***** VERSION 2 4%13%#" &SY1.1&
000' A'00 *()A'00 ;SYS RAM (EC!OED AT TOP OF MEM)
000# A'00 SCPBUF .BLOCK )20 ;SCOPE BUFFER LAST 32 C!ARS
000* A'20 RAM (* ;DEFAULT BLK FILLS STARTIN !ERE
000" A'20 +TABLE .BLOCK )10 ; *+UMPS - ABS ADDR, LO !I ORDER
0010 A'30 TAPDEL .BLOCK 1 ;K! TAPE DELAY
0011 A'31 KMBDRY .BLOCK 1 ;KIM TAPE READ BOUNDARY
0012 A'32 !SBDRY .BLOCK 1 ;!S TAPE READ BOUNDARY
0013 A'33 SCR3 .BLOCK 1 ;RAM SCRATC! LOCS 3-F
0014 A'34 SCR4 .BLOCK 1
001$ A'3$ TAPET1 .BLOCK 1 ;!S TAPE 1%2 BIT TIME
001' A'3' SCR' .BLOCK 1
001# A'3# SCR# .BLOCK 1
001* A'3* SCR* .BLOCK 1
001" A'3" SCR" .BLOCK 1
0020 A'3A SCRA .BLOCK 1
0021 A'3B SCRB .BLOCK 1
0022 A'3C TAPET2 .BLOCK 1 ;!S TAPE 1%2 BIT TIME
0023 A'3D SCRD .BLOCK 1
0024 A'3E RC (SCRD
002$ A'3E SCRE .BLOCK 1
002' A'3F SCRF .BLOCK 1
002# A'40 DISBUF .BLOCK $ ;DISPLAY BUFFER
002* A'4$ RDI .BLOCK 1 ;RI!T MOST DIIT OF DISPLAY
002" A'4' .BLOCK 3 ;NOT USED
0030 A'4" PARNR .BLOCK 1 ;NUMBER OF PARMS RECEIVED
0031 A'4A ;
0032 A'4A ; 3 1' BIT PARMS, LO !I ORDER
0033 A'4A ; PASSED TO E-ECUTE BLOCKS
0034 A'4A ;
003$ A'4A P3L .BLOCK 1
003' A'4B P3! .BLOCK 1
003# A'4C P2L .BLOCK 1
003* A'4D P2! .BLOCK 1
003" A'4E P1L .BLOCK 1
0040 A'4F P1! .BLOCK 1
0041 A'$0 PADBIT .BLOCK 1 ;PAD BITS FOR CARRIAE RETURN
0042 A'$1 SDBYT .BLOCK 1 ;SPEED BYTE FOR TERMINAL I%O
0043 A'$2 ERCNT .BLOCK 1 ; ERROR COUNT (MA- )FF)
0044 A'$3 ; BIT # ( EC!O %NO EC!O, BIT ' ( CTL O TOLE S.
004$ A'$3 TEC!O .BLOCK 1 ;TERMINAL EC!O LA
004' A'$4 ; BIT# (CRT IN, ' (TTY IN, $ ( TTY OUT, 4 ( CRT OUT
004# A'$4 TOUTFL .BLOCK 1 ;OUTPUT FLAS
004* A'$$ KS!FL .BLOCK 1 ;KEYBOARD S!IFT FLA
004" A'$' TV .BLOCK 1 ;TRACE VELOCITY (0(SINLE STEP)
00$0 A'$# LSTCOM .BLOCK 1 ;STORE LAST MONITOR COMMAND
00$1 A'$* MA-RC .BLOCK 1 ;MA-IMUM REC LENT! FOR MEM DUMP
00$2 A'$" ;
00$3 A'$" ; USER RE/S FOLLO.
00$4 A'$" ;
00$$ A'$" PCLR .BLOCK 1 ;PRO CTR
00$' A'$A PC!R .BLOCK 1
00$# A'$B SR .BLOCK 1 ;STACK
00$* A'$C FR .BLOCK 1 ;FLAS
00$" A'$D AR .BLOCK 1 ;ARE
00'0 A'$E -R .BLOCK 1 ;-RE
00'1 A'$F YR .BLOCK 1 ;YRE
00'2 A''0 ;
00'3 A''0 ; I%O VECTORS FOLLO.
00'4 A''0 ;
00'$ A''0 INVEC .BLOCK 3 ;IN C!AR
00'' A''3 OUTVEC .BLOCK 3 ;OUT C!AR
00'# A''' INSVEC .BLOCK 3 ;IN STATUS
00'* A''" URSVEC .BLOCK 3 ;UNRECONI0ED SYNTA- VECTOR
00'" A''C URCVEC .BLOCK 3 ;UNRECONI0ED CMD%ERROR VECTOR
00#0 A''F SCNVEC .BLOCK 3 ;SCAN ON-BOARD DISPLAY
00#1 A'#2 ;
00#2 A'#2 ; TRACE, INTERRUPT VECTORS
00#3 A'#2 ;
00#4 A'#2 E-EVEC .BLOCK 2 ; E-EC CMD ALTERNATE INVEC
00#$ A'#4 TRCVEC .BLOCK 2 ;TRACE
00#' A'#' UBRKVC .BLOCK 2 ;USER BRK AFTER MONITOR
00## A'#* UBRKV (UBRKVC
00#* A'#* UIR1VC .BLOCK 2 ;USER NON-BRK IR1 AFTER MONITOR
00#" A'#A UIR1V (UIR1VC
00*0 A'#A NMIVEC .BLOCK 2 ;NMI
00*1 A'#C RSTVEC .BLOCK 2 ;RESET
00*2 A'#E IR1VEC .BLOCK 2 ;IR1
00*3 A'*0 ;
00*4 A'*0 ;
00*$ A'*0 ;I%O RE DEFINITIONS
00*' A'*0 PADA ()A400 ;KEYBOARD%DISPLAY
00*# A'*0 PBDA ()A402 ;SERIAL I%O
00** A'*0 OR3A ()AC01 ;.P, DBON, DBOFF
00*" A'*0 DDR3A (OR3A22 ;DATA DIRECTION FOR SAME
00"0 A'*0 OR1B ()A000
00"1 A'*0 DDR1B ()A002
00"2 A'*0 PCR1 ()A00C ; POR%TAPE REMOTE
00"3 A'*0 ;
00"4 A'*0 ; MONITOR MAINLINE
00"$ A'*0 ;
00"' *000 *()*000
00"# *000 4C #C *B MONITR +MP MONENT ;INIT S, CLD, ET ACCESS
00"* *003 20 FF *0 .ARM +SR ETCOM ;ET COMMAND 2 PARMS (0-3)
00"" *00' 20 4A *1 +SR DISPAT ;DISPATC! CMD,PARMS TO E-EC BLKS
0100 *00" 20 #1 *1 +SR ERMS ;DISP ER MS IF CARRY SET
0101 *00C 4C 03 *0 +MP .ARM ;AND CONTINUE
0102 *00F ;
0103 *00F ; TRACE AND INTERRUPT ROUTINES
0104 *00F ;
010$ *00F 0* IR1BRK P!P ;IR1 OR BRK 3
010' *010 4* P!A
010# *011 *A T-A
010* *012 4* P!A
010" *013 BA TS-
0110 *014 BD 04 01 LDA )0104,- ;PICK UP FLAS
0111 *01# 2" 10 AND 4)10
0112 *01" F0 0# BE1 DETIR1
0113 *01B '* PLA ;BRK
0114 *01C AA TA-
011$ *01D '* PLA
011' *01E 2* PLP
011# *01F 'C F' FF +MP ()FFF')
011* *022 '* DETIR1 PLA ;IR1 (NON BRK)
011" *023 AA TA-
0120 *024 '* PLA
0121 *02$ 2* PLP
0122 *02' 'C F* FF +MP ()FFF*)
0123 *02" 20 *' *B SVIR1 +SR ACCESS ;SAVE RES AND DISPLAY CODE
0124 *02C 3* SEC
012$ *02D 20 '4 *0 +SR SAVINT
012' *030 A" 31 LDA 4/1/
012# *032 4C $3 *0 +MP IDISP
012* *03$ 0* USRENT P!P ;USER ENTRY
012" *03' 20 *' *B +SR ACCESS
0130 *03" 3* SEC
0131 *03A 20 '4 *0 +SR SAVINT
0132 *03D EE $" A' INC PCLR
0133 *040 D0 03 BNE *2$
0134 *042 EE $A A' INC PC!R
013$ *04$ A" 33 LDA 4/3/
013' *04# 4C $3 *0 +MP IDISP
013# *04A 20 *' *B SVBRK +SR ACCESS
013* *04D 1* CLC
013" *04E 20 '4 *0 +SR SAVINT
0140 *0$1 A" 30 LDA 4/0/
0141 *0$3 ; INTRPT CODES 0 ( BRK
0142 *0$3 ; 1 ( IR1
0143 *0$3 ; 2 ( NMI
0144 *0$3 ; 3 ( USER ENTRY
014$ *0$3 4* IDISP P!A ;OUT PC, INTRPT CODE (FROM A)
014' *0$4 20 D3 *0 +SR DBOFF ;STOP NMI/S
014# *0$# 20 4D *3 +SR CRLF
014* *0$A 20 3# *3 +SR OPCCOM
014" *0$D '* PLA
01$0 *0$E 20 4# *A +SR OUTC!R
01$1 *0'1 4C 03 *0 +MP .ARM
01$2 *0'4 *D $D A' SAVINT STA AR ;SAVE USER RES AFTER INTRPT
01$3 *0'# *E $E A' ST- -R
01$4 *0'A *C $F A' STY YR
01$$ *0'D BA TS-
01$' *0'E D* CLD
01$# *0'F BD 04 01 LDA )104,-
01$* *0#2 '" FF ADC 4)FF
01$" *0#4 *D $" A' STA PCLR
01'0 *0## BD 0$ 01 LDA )10$,-
01'1 *0#A '" FF ADC 4)FF
01'2 *0#C *D $A A' STA PC!R
01'3 *0#F BD 03 01 LDA )103,-
01'4 *0*2 *D $C A' STA FR
01'$ *0*$ BD 02 01 LDA )102,-
01'' *0** "D 0$ 01 STA )10$,-
01'# *0*B BD 01 01 LDA )101,-
01'* *0*E "D 04 01 STA )104,-
01'" *0"1 E* IN-
01#0 *0"2 E* IN-
01#1 *0"3 E* IN-
01#2 *0"4 "A T-S
01#3 *0"$ E* IN-
01#4 *0"' E* IN-
01#$ *0"# *E $B A' ST- SR
01#' *0"A '0 RTS
01## *0"B 20 *' *B SVNMI +SR ACCESS ;TRACE IF TV NE 0
01#* *0"E 3* SEC
01#" *0"F 20 '4 *0 +SR SAVINT
01*0 *0A2 20 D3 *0 +SR DBOFF ;STOP NMI/S
01*1 *0A$ AD $' A' LDA TV
01*2 *0A* D0 0$ BNE TVN0
01*3 *0AA A" 32 LDA 4/2/
01*4 *0AC 4C $3 *0 +MP IDISP
01*$ *0AF 20 3# *3 TVN0 +SR OPCCOM ;TRACE .IT! DELAY
01*' *0B2 AD $D A' LDA AR
01*# *0B$ 20 4A *3 +SR OBCRLF ;DISPLAY ACC
01** *0B* 20 $A *3 +SR DELAY
01*" *0BB "0 10 BCC TRACON ;STOP IF KEY ENTERED
01"0 *0BD 4C 03 *0 +MP .ARM
01"1 *0C0 20 *' *B TRCOFF +SR ACCESS ;DISABLE NMIS
01"2 *0C3 3* SEC
01"3 *0C4 20 '4 *0 +SR SAVINT
01"4 *0C# 20 D3 *0 +SR DBOFF
01"$ *0CA 'C #4 A' +MP (TRCVEC) ;AND O TO SPECIAL TRACE
01"' *0CD 20 E4 *0 TRACON +SR DBON ;ENABLE NMI/S
01"# *0D0 4C FD *3 +MP O1ENT23 ;AND RESUME (NO .RITE PROT)
01"* *0D3 AD 01 AC DBOFF LDA OR3A ;PULSE DEBU OFF
01"" *0D' 2" DF AND 4)DF
0200 *0D* 0" 10 ORA 4)10
0201 *0DA *D 01 AC STA OR3A
0202 *0DD AD 03 AC LDA DDR3A
0203 *0E0 0" 30 ORA 4)30
0204 *0E2 D0 0F BNE DBNE.-3 ;RELEASE FLIP FLOP SO KEY .ORKS
020$ *0E4 AD 01 AC DBON LDA OR3A ;PULSE DEBU ON
020' *0E# 2" EF AND 4)EF
020# *0E" 0" 20 ORA 4)20
020* *0EB *D 01 AC STA OR3A
020" *0EE AD 03 AC LDA DDR3A
0210 *0F1 0" 30 ORA 4)30
0211 *0F3 *D 03 AC STA DDR3A
0212 *0F' AD 03 AC DBNE. LDA DDR3A ;RELEASE FLIP FLOP
0213 *0F" 2" CF AND 4)CF
0214 *0FB *D 03 AC STA DDR3A
021$ *0FE '0 RTS
021' *0FF ;
021# *0FF ; ETCOM - ET COMMAND AND 0-3 PARMS
021* *0FF ;
021" *0FF 20 4D *3 ETCOM +SR CRLF
0220 *102 A" 2E LDA 4/./ ;PROMPT
0221 *104 20 4# *A +SR OUTC!R
0222 *10# 20 1B *A ETC1 +SR INC!R
0223 *10A F0 F3 BE1 ETCOM ;CARRIAE RETURN3
0224 *10C C" #F CMP 4)#F ;DELETE3
022$ *10E F0 F# BE1 ETC1
022' *110 C" 00 CMP 40 ;NULL3
022# *112 F0 F3 BE1 ETC1
022* *114 ; L,S,U NEED TO BE !AS!ED 2 BYTES TO ONE
022" *114 C" $3 CMP 4/S/
0230 *11' F0 1B BE1 !AS!US
0231 *11* C" $$ CMP 4/U/
0232 *11A F0 1# BE1 !AS!US
0233 *11C C" 4C CMP 4/L/
0234 *11E F0 0F BE1 !AS!L
023$ *120 *D $# A' STOCOM STA LSTCOM
023' *123 20 42 *3 +SR SPACE
023# *12' 20 0* *2 +SR PS!OVE ;0ERO PARMS
023* *12" 20 0* *2 +SR PS!OVE
023" *12C 4C 20 *2 +MP PARM ;AND O ET PARMS
0240 *12F A" 01 !AS!L LDA 4)01 ;!AS! LOAD CMDS TO ONE BYTE
0241 *131 10 02 BPL !AS!US22
0242 *133 0A !AS!US ASL A ;!AS! /USER/ CMDS TO ONE BYTE A
0243 *134 0A ASL A ;U0 ( )14 T!RU U1# ()1B
0244 *13$ *D $# A' STA LSTCOM
024$ *13* 20 1B *A +SR INC!R ;ET SECOND
024' *13B F0 C2 BE1 ETCOM
024# *13D 1* CLC
024* *13E 'D $# A' ADC LSTCOM
024" *141 2" 0F AND 4)0F
02$0 *143 0" 10 ORA 4)10
02$1 *14$ 10 D" BPL STOCOM
02$2 *14# FF FF FF .DB )FF,)FF,)FF ;NOT USED
02$3 *14A ;
02$4 *14A ;DISPATC! TO E-EC BLK 0PARM, 1PARM, 2PARM, OR 3PARM
02$$ *14A ;
02$' *14A C" 0D DISPAT CMP 4)0D ;C%R IF OK ELSE URSVEC
02$# *14C D0 20 BNE !IPN
02$* *14E AD $# A' LDA LSTCOM
02$" *1$1 AE 4" A' LD- PARNR
02'0 *1$4 D0 03 BNE M12
02'1 *1$' 4C "$ *3 +MP B0PARM ;0 PARM BLOCK
02'2 *1$" E0 01 M12 CP- 4)01
02'3 *1$B D0 03 BNE M13
02'4 *1$D 4C DA *4 +MP B1PARM ;1 PARM BLOCK
02'$ *1'0 E0 02 M13 CP- 4)02
02'' *1'2 D0 03 BNE M14
02'# *1'4 4C 1" *' +MP B2PARM ;2 PARM BLOCK
02'* *1'# E0 03 M14 CP- 4)03
02'" *1'" D0 03 BNE !IPN
02#0 *1'B 4C 14 *# +MP B3PARM ;3 PARM BLOCK
02#1 *1'E 'C 'A A' !IPN +MP (URSVEC21) ;ELSE UNREC SYNTA- VECTOR
02#2 *1#1 ;
02#3 *1#1 ; ERMS - PRINT ACC IN !E- IF CARRY SET
02#4 *1#1 ;
02#$ *1#1 "0 44 ERMS BCC M1$
02#' *1#3 4* P!A
02## *1#4 20 4D *3 +SR CRLF
02#* *1## A" 4$ LDA 4/E/
02#" *1#" 20 4# *A +SR OUTC!R
02*0 *1#C A" $2 LDA 4/R/
02*1 *1#E 20 4# *A +SR OUTC!R
02*2 *1*1 20 42 *3 +SR SPACE
02*3 *1*4 '* PLA
02*4 *1*$ 4C FA *2 +MP OUTBYT
02*$ *1** ;
02*' *1** ; SAVER - SAVE ALL RE/S 2 FLAS ON STACK
02*# *1** ; RETURN .IT! F,A,-,Y UNC!ANED
02** *1** ; STACK !AS FLAS,A,-,Y, PUS!ED
02*" *1** 0* SAVER P!P
02"0 *1*" 4* P!A
02"1 *1*A 4* P!A
02"2 *1*B 4* P!A
02"3 *1*C 0* P!P
02"4 *1*D 4* P!A
02"$ *1*E *A T-A
02"' *1*F 4* P!A
02"# *1"0 BA TS-
02"* *1"1 BD 0" 01 LDA )010",-
02"" *1"4 "D 0$ 01 STA )010$,-
0300 *1"# BD 0# 01 LDA )010#,-
0301 *1"A "D 0" 01 STA )010",-
0302 *1"D BD 01 01 LDA )0101,-
0303 *1A0 "D 0# 01 STA )010#,-
0304 *1A3 BD 0* 01 LDA )010*,-
030$ *1A' "D 04 01 STA )0104,-
030' *1A" BD 0' 01 LDA )010',-
030# *1AC "D 0* 01 STA )010*,-
030* *1AF "* TYA
030" *1B0 "D 0' 01 STA )010',-
0310 *1B3 '* PLA
0311 *1B4 AA TA-
0312 *1B$ '* PLA
0313 *1B' 2* PLP
0314 *1B# '0 M1$ RTS
031$ *1B* ; RESTORE E-CEPT A,F
031' *1B* 0* RES-AF P!P
031# *1B" BA TS-
031* *1BA "D 04 01 STA )0104,-
031" *1BD 2* PLP
0320 *1BE ; RESTORE E-CEPT F
0321 *1BE 0* RES-F P!P
0322 *1BF '* PLA
0323 *1C0 BA TS-
0324 *1C1 "D 04 01 STA )0104,-
032$ *1C4 ; RESTORE ALL 1005
032' *1C4 '* RESALL PLA
032# *1C$ A* TAY
032* *1C' '* PLA
032" *1C# AA TA-
0330 *1C* '* PLA
0331 *1C" 2* PLP
0332 *1CA '0 RTS
0333 *1CB ;
0334 *1CB ; MONITOR UTILITIES
033$ *1CB ;
033' *1CB C" 20 ADVCK CMP 4)20 ;SPACE3
033# *1CD F0 02 BE1 M1
033* *1CF C" 3E CMP 4/6/ ;F.D ARRO.3
033" *1D1 3* M1 SEC
0340 *1D2 '0 RTS
0341 *1D3 20 FA *2 OBCMIN +SR OUTBYT ;OUT BYTE, OUT COMMA, IN BYTE
0342 *1D' 20 3A *3 COMINB +SR COMMA ;OUT COMMA, IN BYTE
0343 *1D" 20 1B *A INBYTE +SR INC!R
0344 *1DC 20 #$ *2 +SR ASCNIB
034$ *1DF B0 14 BCS OUT4
034' *1E1 0A ASL A
034# *1E2 0A ASL A
034* *1E3 0A ASL A
034" *1E4 0A ASL A
03$0 *1E$ *D 33 A' STA SCR3
03$1 *1E* 20 1B *A +SR INC!R
03$2 *1EB 20 #$ *2 +SR ASCNIB
03$3 *1EE B0 11 BCS OUT2
03$4 *1F0 0D 33 A' ORA SCR3
03$$ *1F3 1* OOD CLC
03$' *1F4 '0 RTS
03$# *1F$ C" 3A OUT4 CMP 4/7/ ;COLON 3
03$* *1F# D0 0$ BNE OUT1
03$" *1F" 20 1B *A +SR INC!R
03'0 *1FC D0 F$ BNE OOD ;CARRIAE RETURN3
03'1 *1FE B* OUT1 CLV
03'2 *1FF $0 03 BVC CRC!K
03'3 *201 2C 04 *2 OUT2 BIT CRC!K
03'4 *204 C" 0D CRC!K CMP 4)0D ;C!ECK FOR C%R
03'$ *20' 3* SEC
03'' *20# '0 RTS
03'# *20* A2 10 PS!OVE LD- 4)10 ;PUS! PARMS DO.N
03'* *20A 0E 4A A' PRM10 ASL P3L
03'" *20D 2E 4B A' ROL P3!
03#0 *210 2E 4C A' ROL P2L
03#1 *213 2E 4D A' ROL P2!
03#2 *21' 2E 4E A' ROL P1L
03#3 *21" 2E 4F A' ROL P1!
03#4 *21C CA DE-
03#$ *21D D0 EB BNE PRM10
03#' *21F '0 RTS
03## *220 20 ** *1 PARM +SR SAVER ;ET PARMS - RETURN ON C%R OR ERR
03#* *223 A" 00 LDA 40
03#" *22$ *D 4" A' STA PARNR
03*0 *22* *D 33 A' STA SCR3
03*1 *22B 20 0* *2 PM1 +SR PS!OVE
03*2 *22E 20 1B *A PARFIL +SR INC!R
03*3 *231 C" 2C CMP 4/,/ ;VALID DELIMETERS - ,
03*4 *233 F0 04 BE1 M21
03*$ *23$ C" 2D CMP 4/-/
03*' *23# D0 11 BNE M22
03*# *23" A2 FF M21 LD- 4)FF
03** *23B *E 33 A' ST- SCR3
03*" *23E EE 4" A' INC PARNR
03"0 *241 AE 4" A' LD- PARNR
03"1 *244 E0 03 CP- 4)03
03"2 *24' D0 E3 BNE PM1
03"3 *24* F0 1D BE1 M24
03"4 *24A 20 #$ *2 M22 +SR ASCNIB
03"$ *24D B0 1* BCS M24
03"' *24F A2 04 LD- 44
03"# *2$1 0E 4A A' M23 ASL P3L
03"* *2$4 2E 4B A' ROL P3!
03"" *2$# CA DE-
0400 *2$* D0 F# BNE M23
0401 *2$A 0D 4A A' ORA P3L
0402 *2$D *D 4A A' STA P3L
0403 *2'0 A" FF LDA 4)FF
0404 *2'2 *D 33 A' STA SCR3
040$ *2'$ D0 C# BNE PARFIL
040' *2'# 2C 33 A' M24 BIT SCR3
040# *2'A F0 03 BE1 M2$
040* *2'C EE 4" A' INC PARNR
040" *2'F C" 0D M2$ CMP 4)0D
0410 *2#1 1* CLC
0411 *2#2 4C B* *1 +MP RES-AF
0412 *2#$ C" 0D ASCNIB CMP 4)0D ;C%R3
0413 *2## F0 1" BE1 M2"
0414 *2#" C" 30 CMP 4/0/
041$ *2#B "0 0C BCC M2'
041' *2#D C" 4# CMP 4//
041# *2#F B0 0* BCS M2'
041* *2*1 C" 41 CMP 4/A/
041" *2*3 B0 0* BCS M2#
0420 *2*$ C" 3A CMP 4/7/
0421 *2*# "0 0' BCC M2*
0422 *2*" C" 30 M2' CMP 4/0/
0423 *2*B 3* SEC ;CARRY SET - NON !E-
0424 *2*C '0 RTS
042$ *2*D E" 3# M2# SBC 4)3#
042' *2*F 2" 0F M2* AND 4)0F
042# *2"1 1* CLC
042* *2"2 '0 M2" RTS
042" *2"3 EE 4A A' INCP3 INC P3L ;INCREMENT P3 (1' BITS)
0430 *2"' D0 03 BNE *2$
0431 *2"* EE 4B A' INC P3!
0432 *2"B '0 RTS
0433 *2"C AE 4D A' P2SCR LD- P2! ;MOVE P2 TO FE,FF
0434 *2"F *' FF ST- )FF
043$ *2A1 AE 4C A' LD- P2L
043' *2A4 *' FE ST- )FE
043# *2A' '0 RTS
043* *2A# AE 4B A' P3SCR LD- P3! ;MOVE P3 TO FE,FF
043" *2AA *' FF ST- )FF
0440 *2AC AE 4A A' LD- P3L
0441 *2AF *' FE ST- )FE
0442 *2B1 '0 RTS
0443 *2B2 E' FE INCCMP INC )FE ;INCREM FE,FF, COMPARE TO P3
0444 *2B4 D0 14 BNE COMPAR
044$ *2B' E' FF INC )FF
044' *2B* D0 10 .RAP BNE COMPAR ;TEST TO .RAP AROUND
044# *2BA 2C BD *2 BIT E-.RAP
044* *2BD '0 E-.RAP RTS
044" *2BE A$ FE DECCMP LDA )FE ;DECREM FE,FF AND COMPARE TO P3
04$0 *2C0 D0 0' BNE M32
04$1 *2C2 A$ FF LDA )FF
04$2 *2C4 F0 F2 BE1 .RAP
04$3 *2C' C' FF DEC )FF
04$4 *2C* C' FE M32 DEC )FE
04$$ *2CA 20 ** *1 COMPAR +SR SAVER ;COMPARE FE,FF TO P3
04$' *2CD A$ FF LDA )FF
04$# *2CF CD 4B A' CMP P3!
04$* *2D2 D0 0$ BNE E-ITCP
04$" *2D4 A$ FE LDA )FE
04'0 *2D' CD 4A A' CMP P3L
04'1 *2D" B* E-ITCP CLV
04'2 *2DA 4C BE *1 +MP RES-F
04'3 *2DD 0* C!KSAD P!P ;1' BIT CKSUM IN SCR',#
04'4 *2DE 4* P!A
04'$ *2DF 1* CLC
04'' *2E0 'D 3' A' ADC SCR'
04'# *2E3 *D 3' A' STA SCR'
04'* *2E' "0 03 BCC M33
04'" *2E* EE 3# A' INC SCR#
04#0 *2EB '* M33 PLA
04#1 *2EC 2* PLP
04#2 *2ED '0 RTS
04#3 *2EE AD $" A' OUTPC LDA PCLR ;OUTPUT PC
04#4 *2F1 AE $A A' LD- PC!R
04#$ *2F4 4* OUT-A! P!A
04#' *2F$ *A T-A
04## *2F' 20 FA *2 +SR OUTBYT
04#* *2F" '* PLA
04#" *2FA 4* OUTBYT P!A ;OUTPUT 2 !E- DIS FROM A
04*0 *2FB 4* P!A
04*1 *2FC 4A LSR A
04*2 *2FD 4A LSR A
04*3 *2FE 4A LSR A
04*4 *2FF 4A LSR A
04*$ *300 20 44 *A +SR NBASOC
04*' *303 '* PLA
04*# *304 20 44 *A +SR NBASOC
04** *30# '* PLA
04*" *30* '0 RTS
04"0 *30" 2" 0F NIBASC AND 4)0F ;NIBBLE IN A TO ASCII IN A
04"1 *30B C" 0A CMP 4)0A ;LINE FEED
04"2 *30D B0 04 BCS NIBALF
04"3 *30F '" 30 ADC 4)30
04"4 *311 "0 02 BCC E-ITNB
04"$ *313 '" 3' NIBALF ADC 4)3'
04"' *31$ '0 E-ITNB RTS
04"# *31' 20 4D *3 CRLFS0 +SR CRLF ;PRINT CRLF, FF, FE
04"* *31" A' FF LD- )FF
04"" *31B A$ FE LDA )FE
0$00 *31D 4C F4 *2 +MP OUT-A!
0$01 *320 A" 3F OUT1M LDA 4/3/
0$02 *322 4C 4# *A +MP OUTC!R
0$03 *32$ 20 3A *3 OCMCK +SR COMMA ;OUT COMMA, CKSUM LO
0$04 *32* AD 3' A' LDA SCR'
0$0$ *32B 4C FA *2 +MP OUTBYT
0$0' *32E A" 00 0ERCK LDA 40 ;INIT C!ECKSUM
0$0# *330 *D 3' A' STA SCR'
0$0* *333 *D 3# A' STA SCR#
0$0" *33' '0 RTS
0$10 *33# 20 EE *2 OPCCOM +SR OUTPC ;PC OUT, COMMA OUT
0$11 *33A 4* COMMA P!A ;COMMA OUT
0$12 *33B A" 2C LDA 4/,/
0$13 *33D D0 0' BNE SPCP3
0$14 *33F 20 42 *3 SPC2 +SR SPACE ;2 SPACES OUT
0$1$ *342 4* SPACE P!A ;1 SPACE OUT
0$1' *343 A" 20 LDA 4)20 ;SPACE
0$1# *34$ 20 4# *A SPCP3 +SR OUTC!R
0$1* *34* '* PLA
0$1" *34" '0 RTS
0$20 *34A 20 FA *2 OBCRLF +SR OUTBYT ;BYTE OUT, CRLF OUT
0$21 *34D 4* CRLF P!A
0$22 *34E A" 0D LDA 4)0D
0$23 *3$0 20 4# *A +SR OUTC!R
0$24 *3$3 A" 0A LDA 4)0A ;LINE FEED
0$2$ *3$$ 20 4# *A +SR OUTC!R
0$2' *3$* '* PLA
0$2# *3$" '0 RTS
0$2* *3$A AE $' A' DELAY LD- TV ;DELAY DEPENDS ON TV
0$2" *3$D 20 ** *1 DL1 +SR SAVER
0$30 *3'0 A" FF LDA 4)FF
0$31 *3'2 *D 3" A' STA SCR"
0$32 *3'$ *D 3* A' STA SCR*
0$33 *3'* 0E 3* A' DLY1 ASL SCR* ;(SCR",*)(FFFF-2**-
0$34 *3'B 2E 3" A' ROL SCR"
0$3$ *3'E CA DE-
0$3' *3'F D0 F# BNE DLY1
0$3# *3#1 20 03 *" DLY2 +SR I+SCNV ;SCAN DISPLAY
0$3* *3#4 20 *' *3 +SR INSTAT ;SEE IF KEY DO.N
0$3" *3## B0 0A BCS DLY0
0$40 *3#" EE 3* A' INC SCR* ;SCAN 2**-21 TIMES
0$41 *3#C D0 03 BNE *2$
0$42 *3#E EE 3" A' INC SCR"
0$43 *3*1 D0 EE BNE DLY2
0$44 *3*3 4C BE *1 DLY0 +MP RES-F
0$4$ *3*' ; INSTAT - SEE IF KEY DO.N, RESULT IN CARRY
0$4' *3*' ; KEYSTAT, TSTAT RETURN IMMEDIATELY .%STATUS
0$4# *3*' ; INSTAT .AITS FOR RELEASE
0$4* *3*' 20 "2 *3 INSTAT +SR IN+ISV
0$4" *3*" "0 0' BCC INST2
0$$0 *3*B 20 "2 *3 INST1 +SR IN+ISV
0$$1 *3*E B0 FB BCS INST1
0$$2 *3"0 3* SEC
0$$3 *3"1 '0 INST2 RTS
0$$4 *3"2 'C '# A' IN+ISV +MP (INSVEC21)
0$$$ *3"$ ;
0$$' *3"$ ;
0$$# *3"$ ; *** E-ECUTE BLOCKS BEIN !ERE
0$$* *3"$ ;
0$$" *3"$ B0PARM (*
0$'0 *3"$ ; 0ERO PARM COMMANDS
0$'1 *3"$ ;
0$'2 *3"$ C" $2 RE0 CMP 4/R/ ;DISP REISTERS
0$'3 *3"# D0 $A BNE O0 ;PC,S,F,A,-,Y
0$'4 *3"" 20 4D *3 RBACK +SR CRLF
0$'$ *3"C A" $0 LDA 4/P/
0$'' *3"E 20 4# *A +SR OUTC!R
0$'# *3A1 20 42 *3 +SR SPACE
0$'* *3A4 20 EE *2 +SR OUTPC
0$'" *3A# 20 D' *1 +SR COMINB
0$#0 *3AA B0 13 BCS N!3
0$#1 *3AC *D 34 A' STA SCR4
0$#2 *3AF 20 D" *1 +SR INBYTE
0$#3 *3B2 B0 0B BCS N!3
0$#4 *3B4 *D $" A' STA PCLR
0$#$ *3B# AD 34 A' LDA SCR4
0$#' *3BA *D $A A' STA PC!R
0$## *3BD "0 0" BCC M34
0$#* *3BF D0 02 N!3 BNE NOTCR
0$#" *3C1 1* E-ITR CLC
0$*0 *3C2 '0 E-RP1 RTS
0$*1 *3C3 20 CB *1 NOTCR +SR ADVCK
0$*2 *3C' D0 FA BNE E-RP1
0$*3 *3C* A0 00 M34 LDY 40
0$*4 *3CA C* M3$ INY
0$*$ *3CB C0 0' CPY 4'
0$*' *3CD F0 CA BE1 RBACK
0$*# *3CF 20 4D *3 +SR CRLF
0$** *3D2 B" "" *F LDA RNAM-1,Y ;ET RE NAME
0$*" *3D$ ; OUTPUT 3 SPACES TO LINE UP DISPLAY
0$"0 *3D$ 20 4# *A +SR OUTC!R
0$"1 *3D* 20 42 *3 +SR SPACE
0$"2 *3DB 20 3F *3 +SR SPC2
0$"3 *3DE B" $A A' LDA PC!R,Y
0$"4 *3E1 20 D3 *1 +SR OBCMIN
0$"$ *3E4 B0 0$ BCS M3'
0$"' *3E' "" $A A' STA PC!R,Y
0$"# *3E" "0 DF BCC M3$
0$"* *3EB F0 D4 M3' BE1 E-ITR
0$"" *3ED 20 CB *1 +SR ADVCK
0'00 *3F0 F0 D* BE1 M3$
0'01 *3F2 '0 RTS
0'02 *3F3 C" 4# O0 CMP 4//
0'03 *3F$ D0 20 BNE LP0B
0'04 *3F# 20 4D *3 +SR CRLF
0'0$ *3FA 20 "C *B O1ENT +SR NACCES ;.RITE PROT MONITOR RAM
0'0' *3FD AE $B A' LD- SR ;RESTORE RES
0'0# *400 "A T-S
0'0* *401 AD $A A' LDA PC!R
0'0" *404 4* P!A
0'10 *40$ AD $" A' LDA PCLR
0'11 *40* 4* NR10 P!A
0'12 *40" AD $C A' LDA FR
0'13 *40C 4* P!A
0'14 *40D AC $F A' LDY YR
0'1$ *410 AE $E A' LD- -R
0'1' *413 AD $D A' LDA AR
0'1# *41' 40 RTI
0'1* *41# C" 11 LP0B CMP 4)11 ;LOAD PAPER TAPE
0'1" *41" F0 03 BE1 *2$
0'20 *41B 4C A# *4 +MP DEP0
0'21 *41E 20 ** *1 +SR SAVER
0'22 *421 20 4D *3 +SR CRLF
0'23 *424 A" 00 LDA 40
0'24 *42' *D $2 A' STA ERCNT
0'2$ *42" 20 2E *3 LP0 +SR 0ERCK
0'2' *42C 20 1B *A LP1 +SR INC!R
0'2# *42F C" 3B CMP 4)3B ;SEMI COLON
0'2* *431 D0 F" BNE LP1
0'2" *433 20 A1 *4 +SR LDBYTE
0'30 *43' B0 $' BCS TAPERR
0'31 *43* D0 0" BNE NUREC
0'32 *43A AD $2 A' LDA ERCNT ;ERRORS 3
0'33 *43D F0 01 BE1 *23
0'34 *43F 3* SEC
0'3$ *440 4C B* *1 +MP RES-AF
0'3' *443 *D 3D A' NUREC STA SCRD
0'3# *44' 20 A1 *4 +SR LDBYTE
0'3* *44" B0 43 BCS TAPERR
0'3" *44B *$ FF STA )FF
0'40 *44D 20 A1 *4 +SR LDBYTE
0'41 *4$0 B0 D# BCS LP0
0'42 *4$2 *$ FE STA )FE
0'43 *4$4 20 A1 *4 MORED +SR LDBYTE
0'44 *4$# B0 3$ BCS TAPERR
0'4$ *4$" A0 00 LDY 40
0'4' *4$B "1 FE STA ()FE),Y
0'4# *4$D D1 FE CMP ()FE),Y
0'4* *4$F F0 0C BE1 LPD
0'4" *4'1 AD $2 A' LDA ERCNT
0'$0 *4'4 2" 0F AND 4)0F
0'$1 *4'' C" 0F CMP 4)0F
0'$2 *4'* F0 03 BE1 *2$
0'$3 *4'A EE $2 A' INC ERCNT
0'$4 *4'D 20 B2 *2 LPD +SR INCCMP
0'$$ *4#0 CE 3D A' DEC SCRD
0'$' *4#3 D0 DF BNE MORED
0'$# *4#$ 20 D" *1 +SR INBYTE
0'$* *4#* B0 14 BCS TAPERR
0'$" *4#A CD 3# A' CMP SCR#
0''0 *4#D D0 0C BNE BADDY
0''1 *4#F 20 D" *1 +SR INBYTE
0''2 *4*2 B0 0A BCS TAPERR
0''3 *4*4 CD 3' A' CMP SCR'
0''4 *4*# F0 A0 BE1 LP0
0''$ *4*" D0 03 BNE TAPERR ;(AL.AYS)
0''' *4*B 20 D" *1 BADDY +SR INBYTE
0''# *4*E AD $2 A' TAPERR LDA ERCNT
0''* *4"1 2" F0 AND 4)F0
0''" *4"3 C" F0 CMP 4)F0
0'#0 *4"$ F0 "2 BE1 LP0
0'#1 *4"# AD $2 A' LDA ERCNT
0'#2 *4"A '" 10 ADC 4)10
0'#3 *4"C *D $2 A' STA ERCNT
0'#4 *4"F D0 ** BNE LP0
0'#$ *4A1 20 D" *1 LDBYTE +SR INBYTE
0'#' *4A4 4C DD *2 +MP C!KSAD
0'## *4A# C" 44 DEP0 CMP 4/D/ ;DEPOSIT, 0 PARM - USE (OLD)
0'#* *4A" D0 03 BNE MEM0
0'#" *4AB 4C E1 *4 +MP NE.LN
0'*0 *4AE C" 4D MEM0 CMP 4/M/ ;MEM, 0 PARM - USE (OLD)
0'*1 *4B0 D0 03 BNE VER0
0'*2 *4B2 4C 1# *$ +MP NE.LOC
0'*3 *4B$ C" $' VER0 CMP 4/V/ ;VERIFY, 0 PARM - USE (OLD)
0'*4 *4B# D0 0D BNE L10B ; ... DO * BYTES (LIKE VER 1 PARM)
0'*$ *4B" A$ FE LDA )FE
0'*' *4BB *D 4A A' STA P3L
0'*# *4BE A$ FF LDA )FF
0'** *4C0 *D 4B A' STA P3!
0'*" *4C3 4C "A *$ +MP VER124
0'"0 *4C' C" 12 L10B CMP 4)12 ;LOAD KIM, 0ERO PARM
0'"1 *4C* D0 0$ BNE L20B
0'"2 *4CA A0 00 LDY 40 ;MODE ( KIM
0'"3 *4CC 4C #* *C L1+ +MP LENTRY ;O TO CASSETTE ROUTINE
0'"4 *4CF C" 13 L20B CMP 4)13 ;LOAD !S, 0ERO PARM
0'"$ *4D1 D0 04 BNE E0PARM
0'"' *4D3 A0 *0 LDY 4)*0 ;MODE - !S
0'"# *4D$ D0 F$ BNE L1+ ;(AL.AYS)
0'"* *4D# 'C 'D A' E0PARM +MP (URCVEC21) ;ELSE UNREC COMMAND
0'"" *4DA B1PARM (*
0#00 *4DA ;
0#01 *4DA ; 1 PARAMETER COMMAND E-EC BLOCKS
0#02 *4DA ;
0#03 *4DA C" 44 DEP1 CMP 4/D/ ;DEPOSIT, 1 PARM
0#04 *4DC D0 32 BNE MEM1
0#0$ *4DE 20 A# *2 +SR P3SCR
0#0' *4E1 20 1' *3 NE.LN +SR CRLFS0
0#0# *4E4 A0 00 LDY 40
0#0* *4E' A2 0* LD- 4*
0#0" *4E* 20 42 *3 DEPBYT +SR SPACE
0#10 *4EB 20 D" *1 +SR INBYTE
0#11 *4EE B0 11 BCS N!41
0#12 *4F0 "1 FE STA ()FE),Y
0#13 *4F2 D1 FE CMP ()FE),Y ;VERIFY
0#14 *4F4 F0 03 BE1 DEPN
0#1$ *4F' 20 20 *3 +SR OUT1M ;TYPE &3& IF N
0#1' *4F" 20 B2 *2 DEPN +SR INCCMP
0#1# *4FC CA DE-
0#1* *4FD D0 E" BNE DEPBYT
0#1" *4FF F0 E0 BE1 NE.LN
0#20 *$01 F0 0B N!41 BE1 DEPEC
0#21 *$03 C" 20 CMP 4)20 ;SPACE ( F.D
0#22 *$0$ D0 4C BNE DEPES
0#23 *$0# #0 F0 BVS DEPN
0#24 *$0" 20 42 *3 +SR SPACE
0#2$ *$0C 10 EB BPL DEPN
0#2' *$0E 1* DEPEC CLC
0#2# *$0F '0 RTS
0#2* *$10 C" 4D MEM1 CMP 4/M/ ;MEMORY, 1 PARM
0#2" *$12 D0 '$ BNE O1
0#30 *$14 20 A# *2 +SR P3SCR
0#31 *$1# 20 1' *3 NE.LOC +SR CRLFS0
0#32 *$1A 20 3A *3 +SR COMMA
0#33 *$1D A0 00 LDY 40
0#34 *$1F B1 FE LDA ()FE),Y
0#3$ *$21 20 D3 *1 +SR OBCMIN
0#3' *$24 B0 11 BCS N!42
0#3# *$2' A0 00 LDY 4)00
0#3* *$2* "1 FE STA ()FE),Y
0#3" *$2A D1 FE CMP ()FE),Y ;VERIFY MEM
0#40 *$2C F0 03 BE1 N-TLOC
0#41 *$2E 20 20 *3 +SR OUT1M ;TYPE 3 AND CONTINUE
0#42 *$31 20 B2 *2 N-TLOC +SR INCCMP
0#43 *$34 1* CLC
0#44 *$3$ "0 E0 BCC NE.LOC
0#4$ *$3# F0 3E N!42 BE1 E-ITM1
0#4' *$3" $0 04 BVC *2'
0#4# *$3B C" 3C CMP 4/8/
0#4* *$3D F0 D* BE1 NE.LOC
0#4" *$3F C" 20 CMP 4)20 ;SPACE 3
0#$0 *$41 F0 EE BE1 N-TLOC
0#$1 *$43 C" 3E CMP 4/6/
0#$2 *$4$ F0 EA BE1 N-TLOC
0#$3 *$4# C" 2B CMP 4/2/
0#$4 *$4" F0 10 BE1 LOCP*
0#$$ *$4B C" 3C CMP 4/8/
0#$' *$4D F0 0' BE1 PRVLOC
0#$# *$4F C" 2D CMP 4/-/
0#$* *$$1 F0 1' BE1 LOCM*
0#$" *$$3 3* DEPES SEC
0#'0 *$$4 '0 RTS
0#'1 *$$$ 20 BE *2 PRVLOC +SR DECCMP ;BACK ONE BYT
0#'2 *$$* 1* CLC
0#'3 *$$" "0 BC BCC NE.LOC
0#'4 *$$B A$ FE LOCP* LDA )FE ;O F.D * BYTES
0#'$ *$$D 1* CLC
0#'' *$$E '" 0* ADC 4)0*
0#'# *$'0 *$ FE STA )FE
0#'* *$'2 "0 02 BCC M42
0#'" *$'4 E' FF INC )FF
0##0 *$'' 1* M42 CLC
0##1 *$'# "0 AE BCC NE.LOC
0##2 *$'" A$ FE LOCM* LDA )FE ;O BACK.D * BYTES
0##3 *$'B 3* SEC
0##4 *$'C E" 0* SBC 4)0*
0##$ *$'E *$ FE STA )FE
0##' *$#0 B0 02 BCS M43
0### *$#2 C' FF DEC )FF
0##* *$#4 1* M43 CLC
0##" *$#$ "0 A0 BCC NE.LOC
0#*0 *$## 1* E-ITM1 CLC
0#*1 *$#* '0 RTS
0#*2 *$#" C" 4# O1 CMP 4// ;O, 1 PARM (RTRN ADDR ON STK)
0#*3 *$#B D0 1" BNE VER1 ; ... PARM IS ADDR TO O TO
0#*4 *$#D 20 4D *3 +SR CRLF
0#*$ *$*0 20 "C *B +SR NACCES ;.RITE PROT MONITR RAM
0#*' *$*3 A2 FF LD- 4)FF ;PUS! RETURN ADDR
0#*# *$*$ "A T-S
0#** *$*' A" #F LDA 4)#F
0#*" *$** 4* P!A
0#"0 *$*" A" FF LDA 4)FF
0#"1 *$*B 4* P!A
0#"2 *$*C AD 4B A' LDA P3!
0#"3 *$*F 4* P!A
0#"4 *$"0 AD 4A A' LDA P3L
0#"$ *$"3 4C 0* *4 +MP NR10
0#"' *$"' C" $' VER1 CMP 4/V/ ;VERIFY, 1 PARM (* BYTES, CKSUM)
0#"# *$"* D0 1A BNE +UMP1
0#"* *$"A AD 4A A' LDA P3L
0#"" *$"D *D 4C A' STA P2L
0*00 *$A0 1* CLC
0*01 *$A1 '" 0# ADC 4)0#
0*02 *$A3 *D 4A A' STA P3L
0*03 *$A' AD 4B A' LDA P3!
0*04 *$A" *D 4D A' STA P2!
0*0$ *$AC '" 00 ADC 40
0*0' *$AE *D 4B A' STA P3!
0*0# *$B1 4C 40 *' +MP VER224
0*0* *$B4 C" 4A +UMP1 CMP 4/+/ ;+UMP (+UMP TABLE IN SYS RAM)
0*0" *$B' D0 1F BNE L11B
0*10 *$B* AD 4A A' LDA P3L
0*11 *$BB C" 0* CMP 4* ;0-# ONLY VALID
0*12 *$BD B0 2' BCS +UM2
0*13 *$BF 20 "C *B +SR NACCES ;.RITE PROT SYS RAM
0*14 *$C2 0A ASL A
0*1$ *$C3 A* TAY
0*1' *$C4 A2 FF LD- 4)FF ;INIT STK PTR
0*1# *$C' "A T-S
0*1* *$C# A" #F LDA 4)#F ;PUS! COLD RETURN
0*1" *$C" 4* P!A
0*20 *$CA A" FF LDA 4)FF
0*21 *$CC 4* P!A
0*22 *$CD B" 21 A' LDA +TABLE21,Y ;ET ADDR FROM TABLE
0*23 *$D0 4* P!A ;PUS! ON STACK
0*24 *$D1 B" 20 A' LDA +TABLE,Y
0*2$ *$D4 4C 0* *4 +MP NR10 ;LOAD UP USER RE/S AND RTI
0*2' *$D# C" 12 L11B CMP 4)12 ;LOAD KIM FMT, 1 PARM
0*2# *$D" D0 14 BNE L21B
0*2* *$DB A0 00 LDY 40 ;MODE ( KIM
0*2" *$DD AD 4A A' L11C LDA P3L
0*30 *$E0 C" FF CMP 4)FF ;ID MUST NOT BE FF
0*31 *$E2 D0 02 BNE *24
0*32 *$E4 3* SEC
0*33 *$E$ '0 +UM2 RTS
0*34 *$E' 20 0* *2 +SR PS!OVE ;FI- PARM POSITION
0*3$ *$E" 20 0* *2 L11D +SR PS!OVE
0*3' *$EC 4C #* *C +MP LENTRY
0*3# *$EF C" 13 L21B CMP 4)13 ;LOAD TAPE, !S FMT, 1 PARM
0*3* *$F1 D0 04 BNE .PR1B
0*3" *$F3 A0 *0 LDY 4)*0 ;MODE ( !S
0*40 *$F$ D0 E' BNE L11C
0*41 *$F# C" $# .PR1B CMP 4/./ ;.RITE PROT USER RAM
0*42 *$F" D0 1B BNE E1PARM
0*43 *$FB AD 4A A' LDA P3L ; FIRST DI IS 1K ABOVE 0,
0*44 *$FE 2" 11 AND 4)11 ; SECOND IS 2K ABOVE 0
0*4$ *'00 C" 0* CMP 4* ; T!IRD IS 3K ABOVE 0.
0*4' *'02 2A ROL A
0*4# *'03 4E 4B A' LSR P3!
0*4* *'0' 2A ROL A
0*4" *'0# 0A ASL A
0*$0 *'0* 2" 0F AND 4)0F
0*$1 *'0A 4" 0F EOR 4)0F ;0 IS PROTECT
0*$2 *'0C *D 01 AC STA OR3A
0*$3 *'0F A" 0F LDA 4)0F
0*$4 *'11 *D 03 AC STA DDR3A
0*$$ *'14 1* CLC
0*$' *'1$ '0 RTS
0*$# *'1' 4C 2# ** E1PARM +MP CALC3
0*$* *'1" B2PARM (*
0*$" *'1" ;
0*'0 *'1" ; 2 PARAMETER E-EC BLOCKS
0*'1 *'1" ;
0*'2 *'1" C" 10 STD2 CMP 4)10 ;STORE DOUBLE BYTE
0*'3 *'1B D0 12 BNE MEM2
0*'4 *'1D 20 A# *2 +SR P3SCR
0*'$ *'20 AD 4D A' LDA P2!
0*'' *'23 A0 01 LDY 41
0*'# *'2$ "1 FE STA ()FE),Y
0*'* *'2# ** DEY
0*'" *'2* AD 4C A' LDA P2L
0*#0 *'2B "1 FE STA ()FE),Y
0*#1 *'2D 1* CLC
0*#2 *'2E '0 RTS
0*#3 *'2F C" 4D MEM2 CMP 4/M/ ;CONTINUE MEM SEARC! .%OLD PTR
0*#4 *'31 D0 0" BNE VER2
0*#$ *'33 AD 4C A' LDA P2L
0*#' *'3' *D 4E A' STA P1L
0*## *'3" 4C 0* ** +MP MEM3C
0*#* *'3C C" $' VER2 CMP 4/V/ ;VERIFY MEM .%C!KSUMS , 2 PARM
0*#" *'3E D0 4* BNE L12B
0**0 *'40 20 "C *2 +SR P2SCR
0**1 *'43 20 2E *3 +SR 0ERCK
0**2 *'4' 20 1' *3 VADDR +SR CRLFS0
0**3 *'4" A2 0* LD- 4*
0**4 *'4B 20 42 *3 V2 +SR SPACE
0**$ *'4E A0 00 LDY 40
0**' *'$0 B1 FE LDA ()FE),Y
0**# *'$2 20 DD *2 +SR C!KSAD
0*** *'$$ 20 FA *2 +SR OUTBYT
0**" *'$* 20 B2 *2 +SR INCCMP
0*"0 *'$B #0 11 BVS V1
0*"1 *'$D F0 02 BE1 *24
0*"2 *'$F B0 0D BCS V1
0*"3 *''1 CA DE-
0*"4 *''2 D0 E# BNE V2
0*"$ *''4 20 2$ *3 +SR OCMCK
0*"' *''# 20 *' *3 +SR INSTAT
0*"# *''A "0 DA BCC VADDR
0*"* *''C 1* CLC
0*"" *''D '0 RTS
0"00 *''E 20 BE *2 V1 +SR DECCMP
0"01 *'#1 E0 0* CP- 4*
0"02 *'#3 F0 03 BE1 *2$
0"03 *'#$ E* IN-
0"04 *'#' 10 F' BPL V1
0"0$ *'#* 20 2$ *3 +SR OCMCK
0"0' *'#B 20 4D *3 +SR CRLF
0"0# *'#E 20 42 *3 +SR SPACE
0"0* *'*1 AE 3# A' LD- SCR#
0"0" *'*4 20 F4 *2 +SR OUT-A!
0"10 *'*# '0 RTS
0"11 *'** C" 12 L12B CMP 4)12 ;LOAD KIM FMT TAPE, 2 PARMS
0"12 *'*A D0 0C BNE SP2B
0"13 *'*C AD 4C A' LDA P2L
0"14 *'*F C" FF CMP 4)FF ;ID MUST BE FF
0"1$ *'"1 D0 F4 BNE L12B-1 ;ERR
0"1' *'"3 A0 00 LDY 40 ;MODE ( !S
0"1# *'"$ 4C E" *$ +MP L11D
0"1* *'"* C" 1C SP2B CMP 4)1C ;SAVE PAPER TAPE, 2 PARMS
0"1" *'"A D0 #$ BNE E2PARM
0"20 *'"C 1* CLC
0"21 *'"D 20 ** *1 +SR SAVER
0"22 *'A0 20 "C *2 +SR P2SCR
0"23 *'A3 20 FA *' SP2C +SR DIFF0
0"24 *'A' B0 03 BCS SP2D
0"2$ *'A* 4C C4 *1 SPE-IT +MP RESALL
0"2' *'AB 20 4D *3 SP2D +SR CRLF
0"2# *'AE CD $* A' CMP MA-RC
0"2* *'B1 "0 0$ BCC SP2E
0"2" *'B3 AD $* A' LDA MA-RC
0"30 *'B' B0 02 BCS SP2F
0"31 *'B* '" 01 SP2E ADC 41
0"32 *'BA *D 3D A' SP2F STA RC
0"33 *'BD A" 3B LDA 4)3B ;SEMI COLON
0"34 *'BF 20 4# *A +SR OUTC!R
0"3$ *'C2 AD 3D A' LDA RC
0"3' *'C$ 20 F4 *' +SR SVBYTE
0"3# *'C* A$ FF LDA )FF
0"3* *'CA 20 F4 *' +SR SVBYTE
0"3" *'CD A$ FE LDA )FE
0"40 *'CF 20 F4 *' +SR SVBYTE
0"41 *'D2 A0 00 MORED2 LDY 4)00
0"42 *'D4 B1 FE LDA ()FE),Y
0"43 *'D' 20 F4 *' +SR SVBYTE
0"44 *'D" 20 *' *3 +SR INSTAT ;STOP IF KEY DEPRESSED
0"4$ *'DC B0 CA BCS SPE-IT
0"4' *'DE 20 B2 *2 +SR INCCMP
0"4# *'E1 #0 C$ BVS SPE-IT
0"4* *'E3 CE 3D A' DEC RC
0"4" *'E' D0 EA BNE MORED2
0"$0 *'E* AE 3# A' LD- SCR#
0"$1 *'EB AD 3' A' LDA SCR'
0"$2 *'EE 20 F4 *2 +SR OUT-A!
0"$3 *'F1 1* CLC
0"$4 *'F2 "0 AF BCC SP2C
0"$$ *'F4 20 DD *2 SVBYTE +SR C!KSAD
0"$' *'F# 4C FA *2 +MP OUTBYT
0"$# *'FA 20 2E *3 DIFF0 +SR 0ERCK
0"$* *'FD AD 4A A' DIFFL LDA P3L
0"$" *#00 3* SEC
0"'0 *#01 E$ FE SBC )FE
0"'1 *#03 4* P!A
0"'2 *#04 AD 4B A' LDA P3!
0"'3 *#0# E$ FF SBC )FF
0"'4 *#0" F0 04 BE1 DIFF1
0"'$ *#0B '* PLA
0"'' *#0C A" FF LDA 4)FF
0"'# *#0E '0 RTS
0"'* *#0F '* DIFF1 PLA
0"'" *#10 '0 RTS
0"#0 *#11 4C 2# ** E2PARM +MP CALC3 ;MAY BE CALC OR E-EC
0"#1 *#14 B3PARM (*
0"#2 *#14 ;
0"#3 *#14 ; 3 PARAMETER COMMAND E-ECUTE BLOCKS
0"#4 *#14 ;
0"#$ *#14 C" 4' FILL3 CMP 4/F/ ;FILL MEM
0"#' *#1' D0 21 BNE BLK3
0"## *#1* 20 "C *2 +SR P2SCR
0"#* *#1B A" 00 LDA 40
0"#" *#1D *D $2 A' STA ERCNT ;0ERO ERROR COUNT
0"*0 *#20 AD 4E A' LDA P1L
0"*1 *#23 A0 00 F1 LDY 40
0"*2 *#2$ "1 FE STA ()FE),Y
0"*3 *#2# D1 FE CMP ()FE),Y ;VERIFY
0"*4 *#2" F0 03 BE1 F3
0"*$ *#2B 20 C1 *# +SR BRTT ;INC ERCNT (UP TO FF)
0"*' *#2E 20 B2 *2 F3 +SR INCCMP
0"*# *#31 #0 #C BVS B1
0"** *#33 F0 EE BE1 F1
0"*" *#3$ "0 EC BCC F1
0""0 *#3# B0 #' F2 BCS B1 ;(AL.AYS)
0""1 *#3" C" 42 BLK3 CMP 4/B/ ;BLOCK MOVE (OVERLAP OKAY)
0""2 *#3B F0 03 BE1 *2$
0""3 *#3D 4C CD *# +MP S13B
0""4 *#40 A" 00 LDA 40
0""$ *#42 *D $2 A' STA ERCNT
0""' *#4$ 20 "C *2 +SR P2SCR
0""# *#4* AD 4E A' LDA P1L
0""* *#4B *$ FC STA )FC
0""" *#4D AD 4F A' LDA P1!
1000 *#$0 *$ FD STA )FD
1001 *#$2 C$ FF CMP )FF ;.!IC! DIRECTION TO MOVE3
1002 *#$4 D0 0' BNE *2*
1003 *#$' A$ FC LDA )FC
1004 *#$* C$ FE CMP )FE
100$ *#$A F0 $3 BE1 B1 ;1' BITS E1UAL T!EN FINIS!ED
100' *#$C B0 14 BCS B2 ;MOVE DEC/N
100# *#$E 20 B# *# BLP +SR BMOVE ;MOVE INC/N
100* *#'1 E' FC INC )FC
100" *#'3 D0 02 BNE *24
1010 *#'$ E' FD INC )FD
1011 *#'# 20 B2 *2 +SR INCCMP
1012 *#'A #0 43 BVS B1
1013 *#'C F0 F0 BE1 BLP
1014 *#'E "0 EE BCC BLP
101$ *##0 B0 3D BCS B1
101' *##2 A$ FC B2 LDA )FC ;CALC VALS FOR MOVE DEC/N
101# *##4 1* CLC
101* *##$ 'D 4A A' ADC P3L
101" *##* *$ FC STA )FC
1020 *##A A$ FD LDA )FD
1021 *##C 'D 4B A' ADC P3!
1022 *##F *$ FD STA )FD
1023 *#*1 3* SEC
1024 *#*2 A$ FC LDA )FC
102$ *#*4 E$ FE SBC )FE
102' *#*' *$ FC STA )FC
102# *#** A$ FD LDA )FD
102* *#*A E$ FF SBC )FF
102" *#*C *$ FD STA )FD
1030 *#*E 20 A# *2 +SR P3SCR
1031 *#"1 AD 4C A' LDA P2L
1032 *#"4 *D 4A A' STA P3L
1033 *#"# AD 4D A' LDA P2!
1034 *#"A *D 4B A' STA P3!
103$ *#"D 20 B# *# BLP1 +SR BMOVE ;MOVE DEC/N
103' *#A0 A$ FC LDA )FC
103# *#A2 D0 02 BNE *24
103* *#A4 C' FD DEC )FD
103" *#A' C' FC DEC )FC
1040 *#A* 20 BE *2 +SR DECCMP
1041 *#AB #0 02 BVS B1
1042 *#AD B0 EE BCS BLP1
1043 *#AF AD $2 A' B1 LDA ERCNT ;FINIS!ED, TEST ERCNT
1044 *#B2 3* SEC
104$ *#B3 D0 01 BNE *23
104' *#B$ 1* CLC
104# *#B' '0 RTS
104* *#B# A0 00 BMOVE LDY 40 ;MOVE 1 BYT 2 VER
104" *#B" B1 FE LDA ()FE),Y
10$0 *#BB "1 FC STA ()FC),Y
10$1 *#BD D1 FC CMP ()FC),Y
10$2 *#BF F0 0B BE1 BRT
10$3 *#C1 AC $2 A' BRTT LDY ERCNT ;INC ERCNT, DONT PASS FF
10$4 *#C4 C0 FF CPY 4)FF
10$$ *#C' F0 04 BE1 *2'
10$' *#C* C* INY
10$# *#C" *C $2 A' STY ERCNT
10$* *#CC '0 BRT RTS
10$" *#CD C" 1D S13B CMP 4)1D ;SAVE KIM FMT TAPE, 3 PARMS
10'0 *#CF D0 1$ BNE S23B
10'1 *#D1 A0 00 LDY 4)0 ;MODE ( KIM
10'2 *#D3 AD 4E A' S13C LDA P1L
10'3 *#D' D0 02 BNE *24 ;ID MUST NOT ( 0
10'4 *#D* 3* SEC
10'$ *#D" '0 RTS
10'' *#DA C" FF CMP 4)FF ;ID MUST NOT ( FF
10'# *#DC D0 02 BNE *24
10'* *#DE 3* S1N SEC
10'" *#DF '0 RTS
10#0 *#E0 20 "3 *2 +SR INCP3 ;USE END ADDR 2 1
10#1 *#E3 4C *# *E +MP SENTRY
10#2 *#E' C" 1E S23B CMP 4)1E ;SAVE !S FMT TAPE, 3 PARMS
10#3 *#E* D0 04 BNE L23P
10#4 *#EA A0 *0 LDY 4)*0 ;MODE ( !S
10#$ *#EC D0 E$ BNE S13C ;(AL.AYS)
10#' *#EE C" 13 L23P CMP 4)13 ;LOAD !S, 3 PARMS
10## *#F0 D0 0F BNE MEM3
10#* *#F2 AD 4E A' LDA P1L
10#" *#F$ C" FF CMP 4)FF ;ID MUST BE FF
10*0 *#F# D0 E$ BNE S1N ;ERROR RETURN
10*1 *#F" 20 "3 *2 +SR INCP3 ;USE END ADDR 2 1
10*2 *#FC A0 *0 LDY 4)*0 ;MODE ( !S
10*3 *#FE 4C #* *C +MP LENTRY
10*4 **01 C" 4D MEM3 CMP 4/M/ ;MEM 3 SEARC! - BYTE
10*$ **03 D0 22 BNE CALC3
10*' **0$ 20 "C *2 +SR P2SCR
10*# **0* AD 4E A' MEM3C LDA P1L
10** **0B A0 00 LDY 40
10*" **0D D1 FE CMP ()FE),Y
10"0 **0F F0 0B BE1 MEM3E ;FOUND SEARC! BYTE3
10"1 **11 20 B2 *2 MEM3D +SR INCCMP ;NO, INC BUFFER ADDR
10"2 **14 #0 04 BVS MEM3E-
10"3 **1' F0 F0 BE1 MEM3C
10"4 **1* "0 EE BCC MEM3C
10"$ **1A 1* MEM3E- CLC
10"' **1B '0 RTS ;SEARC!ED TO BOUND
10"# **1C 20 1# *$ MEM3E +SR NE.LOC ;FOUND SEARC! BYTE
10"* **1F "0 0$ BCC MEM3F
10"" **21 C" 4# CMP 4// ;ENTERED 3
1100 **23 F0 EC BE1 MEM3D
1101 **2$ 3* SEC
1102 **2' '0 MEM3F RTS
1103 **2# C" 43 CALC3 CMP 4/C/ ;CALCULATE, 1, 2 OR 3 PARMS
1104 **2" D0 2' BNE E-E3 ;RESULT ( P12P22P3
110$ **2B 20 4D *3 C1 +SR CRLF
110' **2E 20 42 *3 +SR SPACE
110# **31 1* CLC
110* **32 AD 4E A' LDA P1L
110" **3$ 'D 4C A' ADC P2L
1110 **3* A* TAY
1111 **3" AD 4F A' LDA P1!
1112 **3C 'D 4D A' ADC P2!
1113 **3F AA TA-
1114 **40 3* SEC
111$ **41 "* TYA
111' **42 ED 4A A' SBC P3L
111# **4$ A* TAY
111* **4' *A T-A
111" **4# ED 4B A' SBC P3!
1120 **4A AA TA-
1121 **4B "* TYA
1122 **4C 20 F4 *2 +SR OUT-A!
1123 **4F 1* CLC
1124 **$0 '0 RTS
112$ **$1 C" 4$ E-E3 CMP 4/E/ ;E-ECUTE FROM RAM, 1-3 PARMS
112' **$3 D0 $# BNE E3PARM
112# **$$ ; SEE IF VECTOR ALREADY MOVED
112* **$$ AD '2 A' LDA INVEC22 ;INVEC MOVED TO SCRA, SCRB
112" **$* ; !I BYTE OF E-EVEC MUST BE DIFFERENT FROM INVEC
1130 **$* CD #3 A' CMP E-EVEC21 ;)FA, )FB USED AS RAM PTR
1131 **$B F0 1$ BE1 PTRIN
1132 **$D *D 3B A' STA SCRA21 ;SAVE INVEC IN SCRA,B
1133 **'0 AD '1 A' LDA INVEC21
1134 **'3 *D 3A A' STA SCRA
113$ **'' AD #2 A' LDA E-EVEC ;PUT ADDR OF RIN IN INVEC
113' **'" *D '1 A' STA INVEC21
113# **'C AD #3 A' LDA E-EVEC21
113* **'F *D '2 A' STA INVEC22
113" **#2 AD 4B A' PTRIN LDA P3! ;INIT RAM PTR IN )FA, )FB
1140 **#$ *$ FB STA )FB
1141 **## AD 4A A' LDA P3L
1142 **#A *$ FA STA )FA
1143 **#C 1* CLC
1144 **#D '0 RTS
114$ **#E 20 ** *1 RIN +SR SAVER ;ET INPUT FROM RAM
114' ***1 A0 00 LDY 4)0 ;RAM PTR IN )FA, )FB
114# ***3 B1 FA LDA ()FA),Y
114* ***$ F0 12 BE1 RESTIV ;IF 00 BYTE, RESTORE INVEC
114" ***# E' FA INC )FA
11$0 ***" D0 02 BNE *24
11$1 ***B E' FB INC )FB
11$2 ***D 2C $3 A' BIT TEC!O ;EC!O C!ARS IN 3
11$3 **"0 10 03 BPL *2$
11$4 **"2 20 4# *A +SR OUTC!R
11$$ **"$ 1* CLC
11$' **"' 4C B* *1 +MP RES-AF
11$# **"" AD 3A A' RESTIV LDA SCRA ;RESTORE INVEC
11$* **"C *D '1 A' STA INVEC21
11$" **"F AD 3B A' LDA SCRA21
11'0 **A2 *D '2 A' STA INVEC22
11'1 **A$ 1* CLC
11'2 **A' 20 1B *A +SR INC!R
11'3 **A" 4C B* *1 +MP RES-AF
11'4 **AC 'C 'D A' E3PARM +MP (URCVEC21) ;... ELSE UNREC CMD
11'$ **AF ; ***
11'' **AF ; *** !E- KEYBOARD I%O
11'# **AF ; ***
11'* **AF 20 ** *1 ETKEY +SR SAVER ;FIND KEY
11'" **B2 20 CF ** +SR K
11#0 **B$ C" FE CMP 4)FE
11#1 **B# D0 13 BNE E-ITK
11#2 **B" 20 CF ** +SR K
11#3 **BC *A T-A
11#4 **BD 0A ASL A
11#$ **BE 0A ASL A
11#' **BF 0A ASL A
11## **C0 0A ASL A
11#* **C1 *D 3E A' STA SCRE
11#" **C4 20 CF ** +SR K
11*0 **C# *A T-A
11*1 **C* 1* CLC
11*2 **C" 'D 3E A' ADC SCRE
11*3 **CC 4C B* *1 E-ITK +MP RES-AF
11*4 **CF A" 00 K LDA 40
11*$ **D1 *D $$ A' STA KS!FL
11*' **D4 20 03 *" K1 +SR I+SCNV ;SCAN KB
11*# **D# F0 FB BE1 K1
11** **D" 20 2C *" +SR LRNKEY ;.!AT KEY IS IT3
11*" **DC F0 F' BE1 K1
11"0 **DE 4* P!A
11"1 **DF *A T-A
11"2 **E0 4* P!A
11"3 **E1 20 #2 *" +SR BEEP
11"4 **E4 20 23 *" K2 +SR KEY1
11"$ **E# D0 FB BNE K2 ;0(1 IF KEY DO.N
11"' **E" 20 "B *" +SR NOBEEP ;DELAY (DEBOUNCE) .%O BEEP
11"# **EC 20 23 *" +SR KEY1
11"* **EF D0 F3 BNE K2
11"" **F1 '* PLA
1200 **F2 AA TA-
1201 **F3 '* PLA
1202 **F4 C" FF CMP 4)FF ;IF S!IFT, SET FLA 2 ET NE-T KEY
1203 **F' D0 0# BNE E-IT
1204 **F* A" 1" LDA 4)1"
120$ **FA *D $$ A' STA KS!FL
120' **FD D0 D$ BNE K1
120# **FF '0 E-IT RTS
120* *"00 20 C1 *" !DOUT +SR OUTDSP ;C!AR OUT, SCAN KB
120" *"03 'C #0 A' I+SCNV +MP (SCNVEC21)
1210 *"0' A" 0" SCAND LDA 4)" ;SCAN DISPLAY FROM DISBUF
1211 *"0* 20 A$ *" +SR CONFI
1212 *"0B A2 0$ LD- 4$
1213 *"0D A0 00 SC1 LDY 40
1214 *"0F BD 40 A' LDA DISBUF,-
121$ *"12 *C 00 A4 STY PADA
121' *"1$ *E 02 A4 ST- PBDA
121# *"1* *D 00 A4 STA PADA
121* *"1B A0 10 LDY 4)10
121" *"1D ** SC2 DEY
1220 *"1E D0 FD BNE SC2
1221 *"20 CA DE-
1222 *"21 10 EA BPL SC1
1223 *"23 20 A3 *" KEY1 +SR KSCONF ; KEY DO.N 3 (YES T!EN 0(1)
1224 *"2' AD 00 A4 !*"2' LDA PADA
122$ *"2" 4" #F EOR 4)#F
122' *"2B '0 RTS
122# *"2C 2" 3F LRNKEY AND 4)3F ;DETERMINE .!AT KEY IS DO.N
122* *"2E *D 3F A' STA SCRF
122" *"31 A" 0$ LDA 4)0$
1230 *"33 20 A$ *" +SR CONFI
1231 *"3' AD 02 A4 LDA PBDA
1232 *"3" 2" 0# AND 4)0#
1233 *"3B 4" 0# EOR 4)0#
1234 *"3D D0 0$ BNE LK1
123$ *"3F 2C 00 A4 BIT PADA
123' *"42 30 1A BMI NOKEY
123# *"44 C" 04 LK1 CMP 4)04
123* *"4' "0 02 BCC LK2
123" *"4* A" 03 LDA 4)03
1240 *"4A 0A LK2 ASL A
1241 *"4B 0A ASL A
1242 *"4C 0A ASL A
1243 *"4D 0A ASL A
1244 *"4E 0A ASL A
124$ *"4F 0A ASL A
124' *"$0 1* CLC
124# *"$1 'D 3F A' ADC SCRF
124* *"$4 A2 1" LD- 4)1"
124" *"$' DD D' *B LK3 CMP SYM,-
12$0 *"$" F0 0$ BE1 FOUND
12$1 *"$B CA DE-
12$2 *"$C 10 F* BPL LK3
12$3 *"$E E* NOKEY IN-
12$4 *"$F '0 RTS
12$$ *"'0 *A FOUND T-A
12$' *"'1 1* CLC
12$# *"'2 'D $$ A' ADC KS!FL
12$* *"'$ AA TA-
12$" *"'' BD EF *B LDA ASCII,-
12'0 *"'" '0 RTS
12'1 *"'A 20 23 *" KYSTAT +SR KEY1 ;KEY DO.N3 RETURN IN CARRY
12'2 *"'D 1* CLC
12'3 *"'E F0 01 BE1 *23
12'4 *"#0 3* SEC
12'$ *"#1 '0 RTS
12'' *"#2 20 ** *1 BEEP +SR SAVER ;DELAY (BOUNCE) .%BEEP
12'# *"#$ A" 0D BEEPP3 LDA 4)0D
12'* *"## 20 A$ *" BEEPP$ +SR CONFI
12'" *"#A A2 #0 LD- 4)#0 ;DURATION CONSTANT
12#0 *"#C A" 0* BE1 LDA 4*
12#1 *"#E *D 02 A4 STA PBDA
12#2 *"*1 20 "$ *" +SR BE2
12#3 *"*4 A" 0' LDA 4'
12#4 *"*' *D 02 A4 STA PBDA
12#$ *"*" 20 "$ *" +SR BE2
12#' *"*C CA DE-
12## *"*D D0 ED BNE BE1
12#* *"*F 20 A3 *" +SR KSCONF
12#" *""2 4C C4 *1 +MP RESALL
12*0 *""$ A0 1A BE2 LDY 4)1A
12*1 *""# ** BE3 DEY
12*2 *""* D0 FD BNE BE3
12*3 *""A '0 RTS
12*4 *""B 20 ** *1 NOBEEP +SR SAVER ;DELAY .%O BEEP
12*$ *""E A" 01 LDA 4)01
12*' *"A0 4C ## *" +MP BEEPP$ ;(BNE BEEPP$, )FF)
12*# *"A3 A" 01 KSCONF LDA 4)1 ;CONFIURE FOR KEYBOARD
12** *"A$ 20 ** *1 CONFI +SR SAVER ;CONFIURE I%O FROM TABLE VAL
12*" *"A* A0 01 LDY 4)01
12"0 *"AA AA TA-
12"1 *"AB BD C* *B CON1 LDA VALSP2,-
12"2 *"AE "" 02 A4 STA PBDA,Y
12"3 *"B1 BD C' *B LDA VALS,-
12"4 *"B4 "" 00 A4 STA PADA,Y
12"$ *"B# CA DE-
12"' *"B* ** DEY
12"# *"B" 10 F0 BPL CON1
12"* *"BB 4C C4 *1 +MP RESALL
12"" *"BE 20 AF ** !KEY +SR ETKEY ;ET KEY FROM KB AND EC!O ON KB
1300 *"C1 20 ** *1 OUTDSP +SR SAVER ;DISPLAY OUT
1301 *"C4 2" #F AND 4)#F
1302 *"C' C" 0# CMP 4)0# ;BELL3
1303 *"C* D0 03 BNE NBELL
1304 *"CA 4C #$ *" +MP BEEPP3 ;YES - BEEP
130$ *"CD 20 0' *A NBELL +SR TE-T ;PUS! INTO SCOPE BUFFER
130' *"D0 C" 2C CMP 4)2C ;COMMA3
130# *"D2 D0 0A BNE OUD1
130* *"D4 AD 4$ A' LDA RDI
130" *"D# 0" *0 ORA 4)*0 ;TURN ON DECIMAL PT
1310 *"D" *D 4$ A' STA RDI
1311 *"DC D0 2$ BNE E-ITOD
1312 *"DE A2 3A OUD1 LD- 4)3A
1313 *"E0 DD EE *B OUD2 CMP ASCIM1,-
1314 *"E3 F0 0$ BE1 ETSS
131$ *"E$ CA DE-
131' *"E' D0 F* BNE OUD2
131# *"E* F0 1" BE1 E-ITOD
131* *"EA BD 2* *C ETSS LDA SESM1,- ;ET CORR SE CODE FROM TABLE
131" *"ED C" F0 CMP 4)F0
1320 *"EF F0 12 BE1 E-ITOD
1321 *"F1 A2 00 LD- 40
1322 *"F3 4* P!A
1323 *"F4 BD 41 A' OUD3 LDA DISBUF21,- ;S!OVE DO.N DISPLAY BUFFER
1324 *"F# "D 40 A' STA DISBUF,-
132$ *"FA E* IN-
132' *"FB E0 0$ CP- 4$
132# *"FD D0 F$ BNE OUD3
132* *"FF '* PLA
132" *A00 *D 4$ A' STA RDI
1330 *A03 4C C4 *1 E-ITOD +MP RESALL
1331 *A0' 4* TE-T P!A ;UPDATE SCOPE BUFFER
1332 *A0# *A T-A ;SAVE -
1333 *A0* 4* P!A
1334 *A0" A2 1E LD- 4)1E ;PUS! DO.N 32 C!ARS
133$ *A0B BD 00 A' T-TMOV LDA SCPBUF,-
133' *A0E "D 01 A' STA SCPBUF21,-
133# *A11 CA DE-
133* *A12 10 F# BPL T-TMOV
133" *A14 '* PLA ;RESTORE -
1340 *A1$ AA TA-
1341 *A1' '* PLA ;RESTORE C!R
1342 *A1# *D 00 A' STA SCPBUF ;STORE C!R IN EMPTY SLOT
1343 *A1A '0 RTS
1344 *A1B ;
134$ *A1B ;***
134' *A1B ;*** TERMINAL I%O
134# *A1B ;***
134* *A1B 20 ** *1 INC!R +SR SAVER ;INPUT C!AR
134" *A1E 20 41 *A +SR IN+INV
13$0 *A21 2" #F AND 4)#F ;DROP PARITY
13$1 *A23 C" '1 CMP 4)'1 ;ALP!A3
13$2 *A2$ "0 0' BCC INRT1
13$3 *A2# C" #B CMP 4)#B
13$4 *A2" B0 02 BCS INRT1
13$$ *A2B 2" DF AND 4)DF ;CVRT TO UPPER CASE
13$' *A2D C" 0F INRT1 CMP 4)0F ;CTL O 3
13$# *A2F D0 0B BNE INRT2
13$* *A31 AD $3 A' LDA TEC!O
13$" *A34 4" 40 EOR 4)40 ;TOLE CTL O BIT
13'0 *A3' *D $3 A' STA TEC!O
13'1 *A3" 1* CLC
13'2 *A3A "0 E2 BCC INC!R23 ;ET ET ANOT!ER C!AR
13'3 *A3C C" 0D INRT2 CMP 4)0D ;CARRIAE RETURN3
13'4 *A3E 4C B* *1 +MP RES-AF
13'$ *A41 'C '1 A' IN+INV +MP (INVEC21)
13'' *A44 20 0" *3 NBASOC +SR NIBASC ;NIBBLE TO ASCII, OUTC!R
13'# *A4# 20 ** *1 OUTC!R +SR SAVER
13'* *A4A 2C $3 A' BIT TEC!O ;LOOK AT CTRL O FLA
13'" *A4D #0 03 BVS *2$
13#0 *A4F 20 $$ *A +SR IN+OUV
13#1 *A$2 4C C4 *1 +MP RESALL
13#2 *A$$ 'C '4 A' IN+OUV +MP (OUTVEC21)
13#3 *A$* 20 ** *1 INTC!R +SR SAVER ;IN TERMINAL C!AR
13#4 *A$B A" 00 LDA 40
13#$ *A$D *$ F" STA )F"
13#' *A$F AD 02 A4 LOOK LDA PBDA ;FIND LEADIN EDE
13## *A'2 2D $4 A' AND TOUTFL
13#* *A'$ 3* SEC
13#" *A'' E" 40 SBC 4)40
13*0 *A'* "0 F$ BCC LOOK
13*1 *A'A 20 E" *A TIN +SR DLY! ;TERMINAL BIT
13*2 *A'D AD 02 A4 LDA PBDA
13*3 *A#0 2D $4 A' AND TOUTFL
13*4 *A#3 3* SEC
13*$ *A#4 E" 40 SBC 4)40 ;OR BITS #,# (TTY,CRT)
13*' *A#' 2C $3 A' BIT TEC!O ;EC!O BIT3
13*# *A#" 10 0' BPL DMY1
13** *A#B 20 D4 *A +SR OUT
13*" *A#E 4C *# *A +MP SAVE
13"0 *A*1 A0 0# DMY1 LDY 4#
13"1 *A*3 ** TLP1 DEY
13"2 *A*4 D0 FD BNE TLP1
13"3 *A*' EA NOP
13"4 *A*# '' F" SAVE ROR )F"
13"$ *A*" 20 E" *A +SR DLY!
13"' *A*C 4* P!A ;TIMIN
13"# *A*D B$ 00 LDA 0,-
13"* *A*F '* PLA
13"" *A"0 "0 D* BCC TIN
1400 *A"2 20 E" *A +SR DLY!
1401 *A"$ 1* CLC
1402 *A"' 20 D4 *A +SR OUT
1403 *A"" A$ F" LDA )F"
1404 *A"B 4" FF EOR 4)FF
140$ *A"D 4C B* *1 +MP RES-AF
140' *AA0 *$ F" TOUT STA )F" ;TERMINAL C!R OUT
140# *AA2 20 ** *1 +SR SAVER
140* *AA$ 20 E" *A +SR DLY! ;DELAY 1%2 BIT TIME
140" *AA* A" 30 LDA 4)30 ;SET FOR OUTPUT
1410 *AAA *D 03 A4 STA PBDA21 ;DATA DIRECTION
1411 *AAD A$ F" LDA )F" ;RECOVER C!R DATA
1412 *AAF A2 0B LD- 4)0B ;START BIT,*DATA, 3STOPS
1413 *AB1 4" FF EOR 4)FF ;INVERT DATA
1414 *AB3 3* SEC ;START BIT
141$ *AB4 20 D4 *A OUTC +SR OUT ;OUTPUT BIT FROM CARRY
141' *AB# 20 E' *A +SR DLYF ;.AIT FULL BIT TIME
141# *ABA A0 0' LDY 4)0'
141* *ABC ** P!AKE DEY
141" *ABD D0 FD BNE P!AKE
1420 *ABF EA NOP
1421 *AC0 4A LSR A
1422 *AC1 CA DE-
1423 *AC2 D0 F0 BNE OUTC
1424 *AC4 A$ F" LDA )F"
142$ *AC' C" 0D CMP 4)0D ;CARRIAE RETURN3
142' *AC* F0 04 BE1 OPAD ;YES-PAD IT
142# *ACA C" 0A CMP 4)0A ;PAD LINE FEED TOO
142* *ACC D0 03 BNE LEAVE
142" *ACE 20 32 *B OPAD +SR PAD
1430 *AD1 4C C4 *1 LEAVE +MP RESALL
1431 *AD4 4* OUT P!A ;TERMINAL BIT OUT
1432 *AD$ AD 02 A4 LDA PBDA
1433 *AD* 2" 0F AND 4)0F
1434 *ADA "0 02 BCC OUTONE
143$ *ADC 0" 30 ORA 4)30
143' *ADE 2D $4 A' OUTONE AND TOUTFL ;MASK OUTPUT
143# *AE1 *D 02 A4 STA PBDA
143* *AE4 '* PLA
143" *AE$ '0 RTS
1440 *AE' ;
1441 *AE' 20 E" *A DLYF +SR DLY! ;DELAY FULL
1442 *AE" 0* DLY! P!P ;DELAY !ALF
1443 *AEA 4* P!A
1444 *AEB *A T-A
144$ *AEC 4* P!A
144' *AED "* TYA
144# *AEE AE $1 A' LD- SDBYT
144* *AF1 A0 03 DLY- LDY 43
144" *AF3 ** DLYY DEY
14$0 *AF4 D0 FD BNE DLYY
14$1 *AF' CA DE-
14$2 *AF# D0 F* BNE DLY-
14$3 *AF" A* TAY
14$4 *AFA '* PLA
14$$ *AFB AA TA-
14$' *AFC '* PLA
14$# *AFD 2* PLP
14$* *AFE '0 RTS
14$" *AFF A" 00 BAUD LDA 40 ;DETERMINE BAUD RATE ON PB#
14'0 *B01 A* TAY
14'1 *B02 AD 02 A4 SEEK LDA PBDA
14'2 *B0$ 0A ASL A
14'3 *B0' B0 FA BCS SEEK
14'4 *B0* 20 2# *B CLEAR +SR INK
14'$ *B0B "0 FB BCC CLEAR
14'' *B0D 20 2# *B SET +SR INK
14'# *B10 B0 FB BCS SET
14'* *B12 *C $1 A' STY SDBYT
14'" *B1$ BD '3 *C DEAF LDA DECPTS,-
14#0 *B1* CD $1 A' CMP SDBYT
14#1 *B1B B0 0# BCS AAIN
14#2 *B1D BD '" *C LDA STDVAL,- ;LOAD CLOSEST STD VALUE
14#3 *B20 *D $1 A' STA SDBYT
14#4 *B23 '0 RTS
14#$ *B24 E* AAIN IN-
14#' *B2$ 10 EE BPL DEAF
14## *B2# C* INK INY
14#* *B2* A2 1C LD- 4)1C
14#" *B2A CA INK1 DE-
14*0 *B2B D0 FD BNE INK1
14*1 *B2D AD 02 A4 LDA PBDA
14*2 *B30 0A ASL A
14*3 *B31 '0 RTS
14*4 *B32 AE $0 A' PAD LD- PADBIT ;PAD CARRIAE RETURN OR LF
14*$ *B3$ 20 E' *A PAD1 +SR DLYF ;.IT! E-TRA STOP BITS
14*' *B3* CA DE-
14*# *B3" D0 FA BNE PAD1
14** *B3B '0 RTS
14*" *B3C 20 A3 *" TSTAT +SR KSCONF ;SEE IF BREAK KEY DO.N
14"0 *B3F AD 02 A4 LDA PBDA
14"1 *B42 2D $4 A' AND TOUTFL
14"2 *B4$ 3* SEC
14"3 *B4' E" 40 SBC 4)40
14"4 *B4* '0 RTS
14"$ *B4" FF .DB )FF ;NOT USED
14"' *B4A ; ***
14"# *B4A ; *** RESET - TURN OFF POR, INIT SYS RAM, ENTER MONITOR
14"* *B4A ; ***
14"" *B4A ;
1$00 *B4A A2 FF RESET LD- 4)FF
1$01 *B4C "A T-S ;INIT STACK PTR
1$02 *B4D A" CC LDA 4)CC
1$03 *B4F *D 0C A0 STA PCR1 ;DISABLE POR, TAPE OFF
1$04 *B$2 A" 04 LDA 44
1$0$ *B$4 4* P!A
1$0' *B$$ 2* PLP ;INIT F, DISABLE IR1 DURIN DFT-FR
1$0# *B$' 20 *' *B +SR ACCESS ;UN .RITE PROT SYS RAM
1$0* *B$" A2 $F DFT-FR LD- 4)$F ;INIT SYS RAM (E-CPT SCPBUF)
1$0" *B$B BD A0 *F LDA DFTBLK,-
1$10 *B$E "D 20 A' STA RAM,-
1$11 *B'1 CA DE-
1$12 *B'2 10 F# BPL DFT-FR22
1$13 *B'4 A" 0# NE.DEV LDA 4# ;C!ANE DEVC%BAUD RATE
1$14 *B'' 20 4# *A +SR OUTC!R ;BEEP
1$1$ *B'" 20 A3 *" S.ITC! +SR KSCONF ;KEYBOARD OR TERMINAL3
1$1' *B'C 20 2' *" S.LP +SR KEY123
1$1# *B'F D0 0B BNE MONENT
1$1* *B#1 2C 02 A4 BIT PBDA
1$1" *B#4 10 F' BPL S.LP
1$20 *B#' 20 B# *B +SR VECS. ;S.ITC! VECTORS
1$21 *B#" 20 FF *A +SR BAUD
1$22 *B#C A2 FF MONENT LD- 4)FF ;MONITOR ENTRY
1$23 *B#E "A T-S
1$24 *B#F D* CLD
1$2$ *B*0 20 *' *B +SR ACCESS ;UN.RITE PROT MONITOR RAM
1$2' *B*3 4C 03 *0 +MP .ARM
1$2# *B*' 20 ** *1 ACCESS +SR SAVER ;UN .RITE PROT SYS RAM
1$2* *B*" AD 01 AC LDA OR3A
1$2" *B*C 0" 01 ORA 41
1$30 *B*E *D 01 AC ACC1 STA OR3A
1$31 *B"1 AD 03 AC LDA DDR3A
1$32 *B"4 0" 01 ORA 41
1$33 *B"' *D 03 AC STA DDR3A
1$34 *B"" 4C C4 *1 +MP RESALL
1$3$ *B"C 20 ** *1 NACCES +SR SAVER ;.RITE PROT SYS RAM
1$3' *B"F AD 01 AC LDA OR3A
1$3# *BA2 2" FE AND 4)FE
1$3* *BA4 1* CLC
1$3" *BA$ "0 E# BCC ACC1
1$40 *BA# 20 *' *B TTY +SR ACCESS ;UN .RITE PROT RAM
1$41 *BAA A" D$ LDA 4)D$ ;110 BAUD
1$42 *BAC *D $1 A' STA SDBYT
1$43 *BAF AD $4 A' LDA TOUTFL
1$44 *BB2 0" 40 ORA 4)40
1$4$ *BB4 *D $4 A' STA TOUTFL
1$4' *BB# 20 *' *B VECS. +SR ACCESS ;UN .RITE PROT RAM
1$4# *BBA A2 0* LD- 4)*
1$4* *BBC BD 'F *C S.LP2 LDA TRMTBL,-
1$4" *BBF "D '0 A' STA INVEC,-
1$$0 *BC2 CA DE-
1$$1 *BC3 10 F# BPL S.LP2
1$$2 *BC$ '0 RTS
1$$3 *BC' ;
1$$4 *BC' ;***
1$$$ *BC' ;*** TABLES (I%O CONFIURATIONS, KEY CODES, ASCII CODES)
1$$' *BC' ;***
1$$# *BC' 00 *0 0* 3# VALS .DB )00,)*0,)0*,)3# ;KB SENSE, A(1
1$$* *BCA 00 #F 00 30 .DB )00,)#F,)00,)30 ;KB LRN, A($
1$$" *BCE 00 FF 00 3F .DB )00,)FF,)00,)3F ;SCAN DSP, A("
1$'0 *BD2 00 00 0# 3F .DB )00,)00,)0#,)3F ;BEEP, A(D
1$'1 *BD' VALSP2 (VALS22
1$'2 *BD' SYM (* ;KEY CODES RETURNED BY LRNKEY
1$'3 *BD' TABLE (*
1$'4 *BD' 01 .DB )01 ;0%U0
1$'$ *BD# 41 .DB )41 ;1%U1
1$'' *BD* *1 .DB )*1 ;2%U2
1$'# *BD" C1 .DB )C1 ;3%U3
1$'* *BDA 02 .DB )02 ;4%U4
1$'" *BDB 42 .DB )42 ;$%U$
1$#0 *BDC *2 .DB )*2 ;'%U'
1$#1 *BDD C2 .DB )C2 ;#%U#
1$#2 *BDE 04 .DB )04 ;*%+MP
1$#3 *BDF 44 .DB )44 ;"%VER
1$#4 *BE0 *4 .DB )*4 ;A%ASCII
1$#$ *BE1 C4 .DB )C4 ;B%BLK MOV
1$#' *BE2 0* .DB )0* ;C%CALC
1$## *BE3 4* .DB )4* ;D%DEP
1$#* *BE4 ** .DB )** ;E%E-EC
1$#" *BE$ C* .DB )C* ;F%FILL
1$*0 *BE' 10 .DB )10 ;CR%SD
1$*1 *BE# $0 .DB )$0 ;-%2
1$*2 *BE* "0 .DB )"0 ;6%8
1$*3 *BE" D0 .DB )D0 ;S!IFT
1$*4 *BEA 20 .DB )20 ;O%LP
1$*$ *BEB '0 .DB )'0 ;RE%SP
1$*' *BEC A0 .DB )A0 ;MEM%.P
1$*# *BED 00 .DB )00 ;L2%L1
1$** *BEE 40 .DB )40 ;S2%S1
1$*" *BEF ASCIM1 (*-1
1$"0 *BEF ASCII (* ;ASCII CODES AND !AS! CODES
1$"1 *BEF 30 .DB )30 ;0ERO
1$"2 *BF0 31 .DB )31 ;ONE
1$"3 *BF1 32 .DB )32 ;T.O
1$"4 *BF2 33 .DB )33 ;T!REE
1$"$ *BF3 34 .DB )34 ;FOUR
1$"' *BF4 3$ .DB )3$ ;FIVE
1$"# *BF$ 3' .DB )3' ;SI-
1$"* *BF' 3# .DB )3# ;SEVEN
1$"" *BF# 3* .DB )3* ;EI!T
1'00 *BF* 3" .DB )3" ;NINE
1'01 *BF" 41 .DB )41 ;A
1'02 *BFA 42 .DB )42 ;B
1'03 *BFB 43 .DB )43 ;C
1'04 *BFC 44 .DB )44 ;D
1'0$ *BFD 4$ .DB )4$ ;E
1'0' *BFE 4' .DB )4' ;F
1'0# *BFF 0D .DB )0D ;CR
1'0* *C00 2D .DB )2D ;DAS!
1'0" *C01 3E .DB )3E ;6
1'10 *C02 FF .DB )FF ;S!IFT
1'11 *C03 4# .DB )4# ;
1'12 *C04 $2 .DB )$2 ;R
1'13 *C0$ 4D .DB )4D ;M
1'14 *C0' 13 .DB )13 ;L2
1'1$ *C0# 1E .DB )1E ;S2
1'1' *C0* ; KB UPPER CASE
1'1# *C0* 14 .DB )14 ;U0
1'1* *C0" 1$ .DB )1$ ;U1
1'1" *C0A 1' .DB )1' ;U2
1'20 *C0B 1# .DB )1# ;U3
1'21 *C0C 1* .DB )1* ;U4
1'22 *C0D 1" .DB )1" ;U$
1'23 *C0E 1A .DB )1A ;U'
1'24 *C0F 1B .DB )1B ;U#
1'2$ *C10 4A .DB )4A ;+
1'2' *C11 $' .DB )$' ;V
1'2# *C12 FE .DB )FE ;ASCII
1'2* *C13 42 .DB )42 ;B
1'2" *C14 43 .DB )43 ;C
1'30 *C1$ 44 .DB )44 ;D
1'31 *C1' 4$ .DB )4$ ;E
1'32 *C1# 4' .DB )4' ;F
1'33 *C1* 10 .DB )10 ;SD
1'34 *C1" 2B .DB )2B ;2
1'3$ *C1A 3C .DB )3C ;8
1'3' *C1B 00 .DB )00 ;S!IFT
1'3# *C1C 11 .DB )11 ;LP
1'3* *C1D 1C .DB )1C ;SP
1'3" *C1E $# .DB )$# ;.
1'40 *C1F 12 .DB )12 ;L1
1'41 *C20 1D .DB )1D ;S1
1'42 *C21 2E .DB )2E ;.
1'43 *C22 20 .DB )20 ;BLANK
1'44 *C23 3F .DB )3F ;3
1'4$ *C24 $0 .DB )$0 ;P
1'4' *C2$ 0# .DB )0# ;BELL
1'4# *C2' $3 .DB )$3 ;S
1'4* *C2# $* .DB )$* ;-
1'4" *C2* $" .DB )$" ;Y
1'$0 *C2" ; SEMENT CODES FOR ON-BOARD DISPLAY
1'$1 *C2" SESM1 (*-1
1'$2 *C2" 3F .DB )3F ;0ERO
1'$3 *C2A 0' .DB )0' ;ONE
1'$4 *C2B $B .DB )$B ;T.O
1'$$ *C2C 4F .DB )4F ;T!REE
1'$' *C2D '' .DB )'' ;FOUR
1'$# *C2E 'D .DB )'D ;FIVE
1'$* *C2F #D .DB )#D ;SI-
1'$" *C30 0# .DB )0# ;SEVEN
1''0 *C31 #F .DB )#F ;EI!T
1''1 *C32 '# .DB )'# ;NINE
1''2 *C33 ## .DB )## ;A
1''3 *C34 #C .DB )#C ;B
1''4 *C3$ 3" .DB )3" ;C
1''$ *C3' $E .DB )$E ;D
1''' *C3# #" .DB )#" ;E
1''# *C3* #1 .DB )#1 ;F
1''* *C3" F0 .DB )F0 ;CR
1''" *C3A 40 .DB )40 ;DAS!
1'#0 *C3B #0 .DB )#0 ;6
1'#1 *C3C 00 .DB )00 ;S!IFT
1'#2 *C3D 'F .DB )'F ;
1'#3 *C3E $0 .DB )$0 ;R
1'#4 *C3F $4 .DB )$4 ;M
1'#$ *C40 3* .DB )3* ;L2
1'#' *C41 'D .DB )'D ;S2
1'## *C42 01 .DB )01 ;U0
1'#* *C43 0* .DB )0* ;U1
1'#" *C44 0" .DB )0" ;U2
1'*0 *C4$ 30 .DB )30 ;U3
1'*1 *C4' 3' .DB )3' ;U4
1'*2 *C4# $C .DB )$C ;U$
1'*3 *C4* '3 .DB )'3 ;U'
1'*4 *C4" 03 .DB )03 ;U#
1'*$ *C4A 1E .DB )1E ;+
1'*' *C4B #2 .DB )#2 ;V
1'*# *C4C ## .DB )## ;A
1'** *C4D #C .DB )#C ;B
1'*" *C4E 3" .DB )3" ;C
1'"0 *C4F $E .DB )$E ;D
1'"1 *C$0 #" .DB )#" ;E
1'"2 *C$1 #1 .DB )#1 ;F
1'"3 *C$2 'D .DB )'D ;SD
1'"4 *C$3 #' .DB )#' ;2
1'"$ *C$4 4' .DB )4' ;8
1'"' *C$$ 00 .DB )00 ;S!IFT
1'"# *C$' 3* .DB )3* ;LP
1'"* *C$# 'D .DB )'D ;SP
1'"" *C$* 1C .DB )1C ;.
1#00 *C$" 3* .DB )3* ;L1
1#01 *C$A 'D .DB )'D ;S1
1#02 *C$B *0 .DB )*0 ;.
1#03 *C$C 00 .DB )00 ;SPACE
1#04 *C$D $3 .DB )$3 ;3
1#0$ *C$E #3 .DB )#3 ;P
1#0' *C$F 4" .DB )4" ;BELL
1#0# *C'0 'D .DB )'D ;S
1#0* *C'1 '4 .DB )'4 ;-
1#0" *C'2 'E .DB )'E ;Y
1#10 *C'3 "#3D1F100*00DECPTS .DB )"#,)3D,)1F,)10,)0*,)00 ; TO DETERMINE BAUD
RATE
1#11 *C'" .MSFIRST
1#12 *C'" D$4C24100'01STDVAL .D. )D$4C,)2410,)0'01 ;STD VALS FOR BAUD RATES
1#13 *C'F .LSFIRST
1#14 *C'F ; 110,300,'00,1200,2400,4*00 BAUD
1#1$ *C'F 4C $* *A TRMTBL +MP INTC!R
1#1' *C#2 4C A0 *A +MP TOUT
1#1# *C#$ 4C 3C *B +MP TSTAT
1#1* *C#* ;
1#1" *C#*
1#20 *C#* ;****** VERSION 2 4%13%#" &SY1.1&
1#21 *C#* ;****** COPYRI!T 1"#* SYNERTEK SYSTEMS CORPORATION
1#22 *C#* ;******
1#23 *C#* BDRY ()F* ;0%1 BDRY FOR READ TIMIN
1#24 *C#* OLD ()F" ;!OLD PREV INPUT LEVEL IN ETTR
1#2$ *C#* C!AR ()FC ;C!AR ASSY AND DISASSY
1#2' *C#* MODE ()FD ;BIT#(1 IS !S, 0 IS KIM
1#2# *C#* ;... BIT'(1 - INORE DATA
1#2* *C#* BUFADL ()FE ;RUNNIN BUFFER ADR
1#2" *C#* BUFAD! ()FF
1#30 *C#* ;TAPDEL ()A'30 ;!I SPEED TAPE DELAY
1#31 *C#* ;KMBDRY ()A'31 ;KIM READ BDRY
1#32 *C#* ;!SBDRY ()A'32 ;!S READ BDRY
1#33 *C#* ;TAPET1 ()A'3$ ;!S FIRST 1%2 BIT
1#34 *C#* ;TAPET2 ()A'3C ;!S SECOND 1%2 BIT
1#3$ *C#* ;SCR' ()A'3' ;SCR'
1#3' *C#* ;SCR# ()*'3# ;SCR#
1#3# *C#* ;SCR* ()A'3* ;SCR*
1#3* *C#* ;SCR" ()A'3" ;SCR"
1#3" *C#*
1#40 A'4A *()A'4A
1#41 A'4A EAL .BLOCK 1 ;P3L - END ADDR 21 (LO)
1#42 A'4B EA! .BLOCK 1 ;P3! - (!I)
1#43 A'4C SAL .BLOCK 1 ;P2L - START ADDR (LO)
1#44 A'4D SA! .BLOCK 1 ;P2! - (!I)
1#4$ A'4E ID .BLOCK 1 ;P1L - ID
1#4' A'4F
1#4# A'4F EOT ( )04
1#4* A'4F SYN ( )1'
1#4" A'4F TPBIT (51000 ;BIT 3 IS ENABLE%DISABLE TO DECODER
1#$0 A'4F FRAME ()FF ;ERROR MS 4 FOR FRAME ERROR
1#$1 A'4F C!ECK ()CC ;ERROR 4 FOR C!ECKSUM ERROR
1#$2 A'4F LSTC!R ()2F ;LAST C!AR NOT /%/
1#$3 A'4F NON!E- ()FF ;NON !E- C!AR IN KIM REC
1#$4 A'4F
1#$$ A'4F ;ACCESS ()*BB' ;UNRITE PROTECT SYSTEM RAM
1#$' A'4F ;P2SCR ()*2"C ;MOVE P2 TO )FF,)FE IN PAE 0ERO
1#$# A'4F ;0ERCK ()*32E ;MOVE 0ERO TO C!ECK SUM
1#$* A'4F ;CONFI ()*"A$ ;CONFIURE I%O
1#$" A'4F
1#'0 A'4F ; I%O - TAPE ON%OFF IS CB2 ON VIA 1 (A000)
1#'1 A'4F ; TAPE IN IS PB' ON VIA 1 (A000)
1#'2 A'4F ; TAPE OUT IS CODE # TO DISPLAY DECODER, T!RU '$32,
1#'3 A'4F ; PB0-PB3 (A400)
1#'4 A'4F
1#'$ A'4F VIAACR ()A00B
1#'' A'4F VIAPCR ()A00C ;CONTROL CB2 TAPE ON%OFF, POR
1#'# A'4F TPOUT ()A402
1#'* A'4F TAPOUT (TPOUT
1#'" A'4F DDROUT ()A403
1##0 A'4F TAPIN ()A000
1##1 A'4F DDRIN ()A002
1##2 A'4F TIMER ()A40' ;'$32 TIMER READ
1##3 A'4F TIM* ()A41$ ;'$32 TIMER SET (*US)
1##4 A'4F DDRDI ()A401
1##$ A'4F DI ()A400
1##' A'4F
1### A'4F ; LOADT ENTER .%ID IN PARM 2, MODE IN 9Y:
1##* A'4F
1##" *C#* *()*C#*
1#*0 *C#* 20 A" *D LOADT +SR START ;INITIALI0E
1#*1 *C#B 20 $2 *D LOADT2 +SR SYNC ;ET IN SYNC
1#*2 *C#E 20 E1 *D LOADT4 +SR RDC!T-
1#*3 *C*1 C" 2A CMP 4/*/ ;START OF DATA3
1#*4 *C*3 F0 0' BE1 LOAD11
1#*$ *C*$ C" 1' CMP 4SYN ;NO - SYN3
1#*' *C*# D0 F2 BNE LOADT2 ;IF NOT, RESTART SYNC SEARC!
1#*# *C*" F0 F3 BE1 LOADT4 ;IF YES, KEEP LOOKIN FOR *
1#** *C*B
1#*" *C*B 0' FD LOAD11 ASL MODE ;ET MODE IN A, CLEAR BIT'
1#"0 *C*D 'A ROR A
1#"1 *C*E *$ FD STA MODE
1#"2 *C"0 20 2' *E +SR RDBYT- ;READ ID BYTE ON TAPE
1#"3 *C"3 *D 00 A4 STA DI ;DISPLAY ON LED (NOT DECODED)
1#"4 *C"' CD 4E A' CMP ID ;COMPARE .IT! RE1UESTED ID
1#"$ *C"" F0 2" BE1 LOADT$ ;LOAD IF E1UAL
1#"' *C"B AD 4E A' LDA ID ;COMPARE .IT! 0
1#"# *C"E C" 00 CMP 40
1#"* *CA0 F0 22 BE1 LOADT$ ;IF 0, LOAD ANY.AY
1#"" *CA2 C" FF CMP 4)FF ;COMPARE .IT! FF
1*00 *CA4 F0 0# BE1 LOADT' ;IF FF, USE RE1UEST SA TO LOAD
1*01 *CA'
1*02 *CA' 24 FD BIT MODE ;UN.ANTED RECORD, KIM OR !S3
1*03 *CA* 30 1' BMI !.RON
1*04 *CAA 4C #B *C +MP LOADT2 ;IF KIM, RESTART SEARC!
1*0$ *CAD
1*0' *CAD ; SA (;EA IF USED) COME FROM RE1UEST. DISCARD TAPE VALUES
1*0# *CAD ; (BUFAD ALREADY SET TO SA BY /START/)
1*0* *CAD ;
1*0" *CAD 20 #4 *E LOADT' +SR RDC!K ;ET SAL FROM TAPE
1*10 *CB0 20 #4 *E +SR RDC!K ;ET SA! FROM TAPE
1*11 *CB3 24 FD BIT MODE ;!S OR KIM3
1*12 *CB$ 10 $2 BPL LOADT# ;IF KIM, START READIN DATA
1*13 *CB# 20 #4 *E +SR RDC!K ;!S, ET EA!, EAL FROM TAPE
1*14 *CBA 20 #4 *E +SR RDC!K ; ... BUT INORE
1*1$ *CBD 4C DE *C +MP LT#! ;START READIN !S DATA
1*1' *CC0
1*1# *CC0 ; SA ( ; EA IF USED) COME FROM TAPE. SA REPLACES BUFAD
1*1* *CC0
1*1" *CC0 A" C0 !.RON LDA 4)C0 ;READ T!RU TO E TO NE-T REC
1*20 *CC2 *$ FD STA MODE ;BUT DON/T C!ECK CKSUM, NO FRAME
ERR
1*21 *CC4
1*22 *CC4 20 #4 *E LOADT$ +SR RDC!K ;ET SAL FROM TAPE
1*23 *CC# *$ FE STA BUFADL ;PUT IN BUF START L
1*24 *CC" 20 #4 *E +SR RDC!K ;SAME FOR SA!
1*2$ *CCC *$ FF STA BUFAD!
1*2' *CCE ;(SAL - ! STILL !AVE RE1UEST VALUE)
1*2# *CCE 24 FD BIT MODE ;!S OR KIM3
1*2* *CD0 10 3# BPL LOADT# ;IF KIM, START READIN RECORD
1*2" *CD2 20 #4 *E +SR RDC!K ;!S. ET ; SAVE EAL,EA!
1*30 *CD$ *D 4A A' STA EAL
1*31 *CD* 20 #4 *E +SR RDC!K
1*32 *CDB *D 4B A' STA EA!
1*33 *CDE
1*34 *CDE ; READ !S DATA
1*3$ *CDE
1*3' *CDE 20 E$ *D LT#! +SR RDBYT! ;ET NE-T BYTE
1*3# *CE1 A' FE LD- BUFADL ;C!ECK FOR END OF DATA 2 1
1*3* *CE3 EC 4A A' CP- EAL
1*3" *CE' D0 0# BNE LT#!A
1*40 *CE* A' FF LD- BUFAD!
1*41 *CEA EC 4B A' CP- EA!
1*42 *CED F0 14 BE1 LT#!B
1*43 *CEF 20 ## *E LT#!A +SR C!KT ;NOT END, UPDATE C!ECKSUM
1*44 *CF2 24 FD BIT MODE ;.RON RECORD3
1*4$ *CF4 #0 04 BVS LT#!C ;IF SO, DONT STORE BYTE
1*4' *CF' A0 00 LDY 40 ;STORE BYTE
1*4# *CF* "1 FE STA (BUFADL),Y
1*4* *CFA E' FE LT#!C INC BUFADL ;BUMP BUFFER ADDR
1*4" *CFC D0 E0 BNE LT#!
1*$0 *CFE E' FF INC BUFAD! ;CARRY
1*$1 *D00 4C DE *C +MP LT#!
1*$2 *D03
1*$3 *D03 C" 2F LT#!B CMP 4/%/ ;EA, MUST BE &%&
1*$4 *D0$ D0 2" BNE LCERR ;LAST C!AR NOT /%/
1*$$ *D0# F0 1$ BE1 LT*A ;(AL.AYS)
1*$' *D0"
1*$# *D0" ; READ KIM DATA
1*$* *D0"
1*$" *D0" 20 2A *E LOADT# +SR RDBYT
1*'0 *D0C B0 2' BCS LDT#A ;NON!E- OR LAST C!AR
1*'1 *D0E 20 ## *E +SR C!KT ;UPDATE C!ECKSUM (PACKED BYTE)
1*'2 *D11 A0 00 LDY 40 ;STORE BYTE
1*'3 *D13 "1 FE STA (BUFADL),Y
1*'4 *D1$ E' FE INC BUFADL ;BUMP BUFFER ADR
1*'$ *D1# D0 F0 BNE LOADT# ;CARRY3
1*'' *D1" E' FF INC BUFAD!
1*'# *D1B 4C 0" *D +MP LOADT#
1*'* *D1E
1*'" *D1E ; TEST C!ECKSUM ; FINIS!
1*#0 *D1E
1*#1 *D1E LOADT* (*
1*#2 *D1E 20 2' *E LT*A +SR RDBYT- ;C!ECK SUM
1*#3 *D21 CD 3' A' CMP SCR'
1*#4 *D24 D0 1' BNE CKERR
1*#$ *D2' 20 2' *E +SR RDBYT-
1*#' *D2" CD 3# A' CMP SCR#
1*## *D2C D0 0E BNE CKERR ;C!ECK SUM ERROR
1*#* *D2E F0 11 BE1 OKE-IT ;(AL.AYS)
1*#" *D30
1**0 *D30 A" 2F LCERR LDA 4LSTC!R ;LAST C!AR IS NOT /%/
1**1 *D32 D0 0A BNE NE-IT ;(AL.AYS)
1**2 *D34
1**3 *D34 C" 2F LDT#A CMP 4/%/ ;LAST OR NON!E-3
1**4 *D3' F0 E' BE1 LOADT* ;LAST
1**$ *D3* FRERR ;FRAMIN ERROR
1**' *D3* A" FF N!ERR LDA 4NON!E- ;KIM ONLY, NON !E- C!AR READ
1**# *D3A D0 02 BNE NE-IT ;(AL.AYS)
1*** *D3C
1**" *D3C A" CC CKERR LDA 4C!ECK ;C!ECKSUM ERROR
1*"0 *D3E
1*"1 *D3E 3* NE-IT SEC ;ERROR INDICATOR TO MONITOR IS
CARRY
1*"2 *D3F B0 01 BCS E-IT ;(AL.AYS)
1*"3 *D41
1*"4 *D41 1* OKE-IT CLC ;NO ERROR
1*"$ *D42
1*"' *D42 24 FD E-IT BIT MODE
1*"# *D44 $0 0* BVC E-10 ;READIN .RON REC3
1*"* *D4' A0 *0 LDY 4)*0
1*"" *D4* 4C #* *C +MP LOADT ;RESTART SEARC!
1"00 *D4B
1"01 *D4B '* USRRE1 PLA ;USER RE1UESTS E-IT
1"02 *D4C '* PLA
1"03 *D4D 3* SEC
1"04 *D4E A2 CC E-10 LD- 4)CC
1"0$ *D$0 D0 '" BNE STCC ;STOP TAPE, RETURN
1"0' *D$2 AD 02 A0 SYNC LDA DDRIN ;C!ANE DATA DIRECTION
1"0# *D$$ 2" BF AND 4)BF
1"0* *D$# *D 02 A0 STA DDRIN
1"0" *D$A A" 00 LDA 40
1"10 *D$C *D 0B A0 STA VIAACR
1"11 *D$F AD 31 A' LDA KMBDRY ;SET UP BOUNDARY
1"12 *D'2 24 FD BIT MODE
1"13 *D'4 10 03 BPL SY100
1"14 *D'' AD 32 A' LDA !SBDRY
1"1$ *D'" *$ F* SY100 STA BDRY
1"1' *D'B A" 'D LDA 4)'D
1"1# *D'D *D 00 A4 STA DI ;INDICATE NO SYNC ON LEDS
1"1* *D#0 A$ FD LDA MODE ;TURN ON OUT OF SYNC MODE
1"1" *D#2 0" 40 ORA 4)40 ;BIT'
1"20 *D#4 *$ FD STA MODE
1"21 *D#' A" #F SYNC$ LDA 4)#F ;TEST FOR CR DO.N ON !KB
1"22 *D#* *D 01 A4 STA DDRDI
1"23 *D#B 2C 00 A4 BIT DI
1"24 *D#E 10 CB BPL USRRE1 ;CR KEY DO.N - E-IT (ERRORS)
1"2$ *D*0 20 "F *D +SR SYNBIT
1"2' *D*3 '' FC ROR C!AR
1"2# *D*$ A$ FC LDA C!AR
1"2* *D*# C" 1' CMP 4SYN
1"2" *D*" D0 EB BNE SYNC$
1"30 *D*B A2 0A SYNC10 LD- 410 ;NO. MAKE SURE CAN ET 10 SYNS
1"31 *D*D 20 E1 *D +SR RDC!T-
1"32 *D"0 C" 1' CMP 4SYN
1"33 *D"2 D0 E2 BNE SYNC$
1"34 *D"4 CA DE-
1"3$ *D"$ D0 F' BNE SYNC1022
1"3' *D"# *E 00 A4 ST- DI ;TURN OFF DISPLAY
1"3# *D"A CA DE- ;-()FF
1"3* *D"B *E 01 A4 ST- DDRDI
1"3" *D"E '0 RTS
1"40 *D"F ;SYNBIT - ET BIT IN SYN SEARC!. IF !S, ENTER .IT!
1"41 *D"F ; TIMER STARTED BY PREV BIT, BIT RETURNED IN CARRY.
1"42 *D"F
1"43 *D"F 24 FD SYNBIT BIT MODE ;KIM OR !S3
1"44 *DA1 10 '" BPL RDBITK ;KIM
1"4$ *DA3 20 CA *D +SR ETTR ;!S
1"4' *DA' B0 22 BCS ETTR ;IF S!ORT, ET NE-T TRANS
1"4# *DA* '0 RTS ;BIT IS 0ERO
1"4* *DA"
1"4" *DA" *4 FD START STY MODE ;MODE PARM PASSED IN 9Y:
1"$0 *DAB 20 *' *B +SR ACCESS ;FI- BASIC .ARM START BU
1"$1 *DAE A" 0" LDA 4"
1"$2 *DB0 20 A$ *" +SR CONFI ;PARTIAL I%O CONFIURATION
1"$3 *DB3 20 2E *3 +SR 0ERCK ;0ERO T!E C!ECK SUM
1"$4 *DB' 20 "C *2 +SR P2SCR ;MOVE SA TO FE,FF IN PAE 0ERO
1"$$ *DB" A2 EC LD- 4)EC
1"$' *DBB *E 0C A0 STCC ST- VIAPCR ;TAPE ON
1"$# *DBE '0 RTS
1"$* *DBF
1"$" *DBF ; ETTR - ET TRANSITION TIME FROM '$32 CLOCK
1"'0 *DBF ; DESTROYS A,Y
1"'1 *DBF
1"'2 *DBF A" 00 KETTR LDA 40 ;KIM ETTR - ET FULL CYCLE
1"'3 *DC1 *$ F" STA OLD ;FORCE ETTR POLARITY
1"'4 *DC3 AD 00 A0 K100 LDA TAPIN ;.AIT TIL INPUT LO
1"'$ *DC' 2" 40 AND 4)40
1"'' *DC* D0 F" BNE K100
1"'# *DCA
1"'* *DCA A0 FF ETTR LDY 4)FF
1"'" *DCC AD 00 A0 NOTR LDA TAPIN
1"#0 *DCF 2" 40 AND 4)40
1"#1 *DD1 C$ F" CMP OLD
1"#2 *DD3 F0 F# BE1 NOTR ;NO C!ANE
1"#3 *DD$ *$ F" STA OLD
1"#4 *DD# AD 0' A4 LDA TIMER
1"#$ *DDA *C 1$ A4 STY TIM* ;RESTART CLOCK
1"#' *DDD 1* CLC
1"## *DDE '$ F* ADC BDRY
1"#* *DE0 '0 RTS
1"#" *DE1
1"*0 *DE1 24 FD RDC!T- BIT MODE ;READ !S OR KIM C!ARACTER
1"*1 *DE3 10 #A BPL RDC!T ;KIM
1"*2 *DE$
1"*3 *DE$ ; RDBYT! - READ !S BYTE
1"*4 *DE$ ; Y DESTROYED, BYTE RETURNED IN C!AR AND A
1"*$ *DE$ ; TIME FROM ONE CALL TO NE-T MUST BE LESS T!AN
1"*' *DE$ ; START BIT TIME (TIMER STILL RUNNIN)
1"*# *DE$
1"** *DE$ *E 3* A' RDBYT! ST- SCR* ;SAVE -
1"*" *DE* A2 0* LD- 4*
1""0 *DEA 20 CA *D +SR ETTR ;ET START BIT TIME
1""1 *DED B0 14 BCS RDB!"0 ;IF NOT 0, FRAMIN ERR
1""2 *DEF 20 CA *D RDB!10 +SR ETTR ;ET BIT IN CARRY
1""3 *DF2 "0 04 BCC RDASSY
1""4 *DF4 20 CA *D +SR ETTR ;BIT IS ONE, .AIT !ALF CYC
1""$ *DF# 3* SEC ;MAKE SURE &1&
1""' *DF* '' FC RDASSY ROR C!AR
1""# *DFA CA DE-
1""* *DFB D0 F2 BNE RDB!10
1""" *DFD A$ FC LDA C!AR ;ET IN ACC
2000 *DFF AE 3* A' !*DFF LD- SCR* ;RESTORE -
2001 *E02 '0 RTS
2002 *E03 24 FD RDB!"0 BIT MODE ;NO ERR IF NOT IN SYNC
2003 *E0$ #0 F* BVS RDB!"0-4 ;OR READIN .RON REC
2004 *E0# '* PLA ;FI- STACK
200$ *E0* '* PLA
200' *E0" 4C 3* *D +MP FRERR
200# *E0C
200* *E0C ; RDBITK - READ KIM BIT - -,Y,A DESTROYED, BIT RETURNED IN
C
200" *E0C
2010 *E0C 20 BF *D RDBITK +SR KETTR ;.AIT FOR LF
2011 *E0F B0 FB BCS RDBITK
2012 *E11 20 BF *D +SR KETTR ;ET SECOND
2013 *E14 B0 F' BCS RDBITK
2014 *E1' A2 00 LD- 40
201$ *E1* E* RDB100 IN- ;COUNT LF FULL CYCLES
201' *E1" 20 BF *D +SR KETTR
201# *E1C "0 FA BCC RDB100
201* *E1E 20 BF *D +SR KETTR ;ET SECOND
201" *E21 "0 F$ BCC RDB100
2020 *E23 E0 0* CP- 4)0* ;ET BIT TO CARRY
2021 *E2$ '0 RTS
2022 *E2'
2023 *E2' 24 FD RDBYT- BIT MODE ;READ !S OR KIM BYTE
2024 *E2* 30 BB BMI RDBYT! ;!S
202$ *E2A
202' *E2A 20 $F *E RDBYT +SR RDC!T ;READ KIM BYTE INTO C!AR AND A
202# *E2D C" 2F CMP 4/%/ ;READ ONE C!AR IF LAST
202* *E2F F0 2C BE1 PACKT3 ;SET CARRY AND RETURN
202" *E31 20 3C *E +SR PACKT
2030 *E34 B0 2' BCS RDRTN ;NON !E- C!AR3
2031 *E3' AA TA- ;SAVE MSD
2032 *E3# 20 $F *E +SR RDC!T
2033 *E3A *' FC ST- C!AR ;MOVE MSD TO C!AR
2034 *E3C ; AND FALL INTO PACKT AAIN
203$ *E3C
203' *E3C ;PACKT - ASCII !E- TO 4 BITS
203# *E3C ;INPUT IN A, OUTPUT IN C!AR AND A, CARRY SET ( NON !E-
203* *E3C
203" *E3C C" 30 PACKT CMP 4)30 ;LT &0&3
2040 *E3E "0 1D BCC PACKT3
2041 *E40 C" 4# CMP 4)4# ;T &F& 3
2042 *E42 B0 1" BCS PACKT3
2043 *E44 C" 40 CMP 4)40 ;A-F3
2044 *E4' F0 1$ BE1 PACKT3 ;40 NOT VALID
204$ *E4* "0 03 BCC PACKT1
204' *E4A 1* CLC
204# *E4B '" 0" ADC 4"
204* *E4D 2A PACKT1 ROL A ;ET LSD INTO LEFT NIBBLE
204" *E4E 2A ROL A
20$0 *E4F 2A ROL A
20$1 *E$0 2A ROL A
20$2 *E$1 A0 04 LDY 44
20$3 *E$3 2A RACKT2 ROL A ;ROTATE 1 BIT AT A TIME INTO C!AR
20$4 *E$4 2' FC ROL C!AR
20$$ *E$' ** DEY
20$' *E$# D0 FA BNE RACKT2
20$# *E$" A$ FC LDA C!AR ;ET INTO ACCUM ALSO
20$* *E$B 1* CLC ;OK
20$" *E$C '0 RDRTN RTS
20'0 *E$D 3* PACKT3 SEC ;NOT !E-
20'1 *E$E '0 RTS
20'2 *E$F
20'3 *E$F ; RDC!T - READ KIM C!AR
20'4 *E$F ; PRESERVES -, RETURNS C!AR IN C!AR (.%PARITY)
20'$ *E$F ; AND A (.%O PARITY)
20'' *E$F
20'# *E$F *A RDC!T T-A ;SAVE -
20'* *E'0 4* P!A
20'" *E'1 A" FF LDA 4)FF ;USE A TO COUNT BITS (BY S!IFTIN)
20#0 *E'3 4* KBITS P!A ;SAVE COUNTER
20#1 *E'4 20 0C *E +SR RDBITK
20#2 *E'# '' FC ROR C!AR
20#3 *E'" '* PLA
20#4 *E'A 0A ASL A
20#$ *E'B D0 F' BNE KBITS ;DO * BITS
20#' *E'D '* PLA ;RESTORE -
20## *E'E AA TA-
20#* *E'F A$ FC LDA C!AR
20#" *E#1 2A ROL A
20*0 *E#2 4A LSR A ;DROP PARITY
20*1 *E#3 '0 RTS
20*2 *E#4
20*3 *E#4 ; RDC!K - READ ONE BYT, INCLUDE IN CKSUM
20*4 *E#4
20*$ *E#4 20 2' *E RDC!K +SR RDBYT- ;FALL INTO C!KT
20*' *E##
20*# *E## ; C!KT - UPDATE C!ECK SUM FROM BYTE IN A
20** *E## ; DESTROYS Y
20*" *E##
20"0 *E## A* C!KT TAY ;SAVE ACCUM
20"1 *E#* 1* CLC
20"2 *E#" 'D 3' A' ADC SCR'
20"3 *E#C *D 3' A' STA SCR'
20"4 *E#F "0 03 BCC C!KT10
20"$ *E*1 EE 3# A' INC SCR# ;BUMP !I BYTE
20"' *E*4 "* C!KT10 TYA ;RESTORE A
20"# *E*$ '0 RTS
20"* *E*'
20"" *E*' FF .DB )FF ;NOT USED
2100 *E*# *()*E*# ;KEEP OLD ENTRY POINT
2101 *E*# 20 A" *D DUMPT +SR START ;INIT VIA ; CKSUM, SA TO BUFAD ;
START
2102 *E*A A" 0# LDA 4# ;CODE FOR TAPE OUT
2103 *E*C *D 02 A4 STA TAPOUT ;BIT 3 USED FOR !I%LO
2104 *E*F A2 01 LD- 41 ;KIM DELAY CONSTANT (OUTER)
210$ *E"1 A4 FD LDY MODE ;12* KIM, 0 !S
210' *E"3 10 03 BPL DUMPT1 ;KIM - DO 12* SYNS
210# *E"$ AE 30 A' LD- TAPDEL ;!S INITIAL DELAY (OUTER)
210* *E"* *A DUMPT1 T-A
210" *E"" 4* P!A
2110 *E"A A" 1' DMPT1A LDA 4SYN
2111 *E"C 20 0A *F +SR OUTCT-
2112 *E"F ** DEY
2113 *EA0 D0 F* BNE DMPT1A ;INNER LOOP (!S OR KIM)
2114 *EA2 '* PLA
211$ *EA3 AA TA-
211' *EA4 CA DE-
211# *EA$ D0 F1 BNE DUMPT1
211* *EA# A" 2A LDA 4/*/ ;.RITE START
211" *EA" 20 0A *F +SR OUTCT-
2120 *EAC
2121 *EAC AD 4E A' LDA ID ;.RITE ID
2122 *EAF 20 3F *F +SR OUTBT-
2123 *EB2
2124 *EB2 AD 4C A' LDA SAL ;.RITE SA
212$ *EB$ 20 3C *F +SR OUTBC-
212' *EB* AD 4D A' LDA SA!
212# *EBB 20 3C *F +SR OUTBC-
212* *EBE
212" *EBE ;
2130 *EBE 24 FD BIT MODE ;KIM OR !S
2131 *EC0 10 0C BPL DUMPT2
2132 *EC2
2133 *EC2 AD 4A A' LDA EAL ;!S, .RITE EA
2134 *EC$ 20 3C *F +SR OUTBC-
213$ *EC* AD 4B A' LDA EA!
213' *ECB 20 3C *F +SR OUTBC-
213# *ECE
213* *ECE A$ FE DUMPT2 LDA BUFADL ;C!ECK FOR LAST BYTE
213" *ED0 CD 4A A' CMP EAL
2140 *ED3 D0 2$ BNE DUMPT4
2141 *ED$ A$ FF LDA BUFAD!
2142 *ED# CD 4B A' CMP EA!
2143 *EDA D0 1E BNE DUMPT4
2144 *EDC
214$ *EDC A" 2F LDA 4/%/ ;LAST, .RITE &%&
214' *EDE 20 0A *F +SR OUTCT-
214# *EE1 AD 3' A' LDA SCR' ;.RITE C!ECK SUM
214* *EE4 20 3F *F +SR OUTBT-
214" *EE# AD 3# A' LDA SCR#
21$0 *EEA 20 3F *F +SR OUTBT-
21$1 *EED
21$2 *EED A" 04 LDA 4EOT ;.RITE T.O EOT/S
21$3 *EEF 20 3F *F +SR OUTBT-
21$4 *EF2 A" 04 LDA 4EOT
21$$ *EF4 20 3F *F +SR OUTBT-
21$' *EF#
21$# *EF# DT3E (* ;(SET &OK& MARK)
21$* *EF# 4C 41 *D +MP OKE-IT
21$" *EFA
21'0 *EFA A0 00 DUMPT4 LDY 40 ;ET BYTE
21'1 *EFC B1 FE LDA (BUFADL),Y
21'2 *EFE 20 3C *F +SR OUTBC- ;.RITE IT .%C!K SUM
21'3 *F01 E' FE INC BUFADL ;BUMP BUFFER ADDR
21'4 *F03 D0 C" BNE DUMPT2
21'$ *F0$ E' FF INC BUFAD! ;CARRY
21'' *F0# 4C CE *E +MP DUMPT2
21'# *F0A 24 FD OUTCT- BIT MODE ;!S OR KIM3
21'* *F0C 10 4* BPL OUTC!T ;KIM
21'" *F0E
21#0 *F0E ; OUTBT! - NO CLOCK
21#1 *F0E ; A,- DESTROYED
21#2 *F0E ; MUST RESIDE ON ONE PAE - TIMIN CRITICAL
21#3 *F0E A2 0" OUTBT! LD- 4" ;* BITS 2 START BIT
21#4 *F10 *C 3" A' STY SCR"
21#$ *F13 *$ FC STA C!AR
21#' *F1$ AD 02 A4 LDA TAPOUT ;ET PREV LEVEL
21## *F1* 4' FC ETBIT LSR C!AR
21#* *F1A 4" 0* EOR 4TPBIT
21#" *F1C *D 02 A4 STA TAPOUT ;INVERT LEVEL
21*0 *F1F ; *** !ERE STARTS FIRST !ALF CYCLE
21*1 *F1F AC 3$ A' LDY TAPET1
21*2 *F22 ** A41' DEY ;TIME FOR T!IS LOOP IS $Y-1
21*3 *F23 D0 FD BNE A41'
21*4 *F2$ "0 12 BCC NOFLIP ;NOFLIP IF BIT 0ERO
21*$ *F2# 4" 0* EOR 4TPBIT ;BIT IS ONE - INVERT OUTPUT
21*' *F2" *D 02 A4 STA TAPOUT
21*# *F2C ; *** END OF FIRST !ALF CYCLE
21** *F2C AC 3C A' B41' LDY TAPET2
21*" *F2F ** B41'B DEY ;LENT! OF LOOP IS $Y-1
21"0 *F30 D0 FD BNE B41'B
21"1 *F32 CA DE-
21"2 *F33 D0 E3 BNE ETBIT ;ET NE-T BIT (LAST IS 0 START BIT)
21"3 *F3$ AC 3" A' LDY SCR" ; (BY " BIT LSR)
21"4 *F3* '0 RTS
21"$ *F3" EA NOFLIP NOP ;TIMIN
21"' *F3A "0 F0 BCC B41' ;(AL.AYS)
21"# *F3C ;
21"* *F3C 20 ## *E OUTBC- +SR C!KT ;.RITE !S OR KIM BYTE ; CKSUM
21"" *F3F 24 FD OUTBT- BIT MODE ;.RITE !S OR KIM BYTE
2200 *F41 30 CB BMI OUTBT! ;!S
2201 *F43
2202 *F43 ;OUTBTC - OUTPUT ONE KIM BYTE
2203 *F43
2204 *F43 OUTBTC (*
220$ *F43 A* OUTBT TAY ;SAVE DATA BYTE
220' *F44 4A LSR A
220# *F4$ 4A LSR A
220* *F4' 4A LSR A
220" *F4# 4A LSR A
2210 *F4* 20 4B *F +SR !E-OUT ;MORE SI DIIT
2211 *F4B ; FALL INTO !E-OUT
2212 *F4B
2213 *F4B 2" 0F !E-OUT AND 4)0F ;CVT LSD OF 9A: TO ASCII, OUTPUT
2214 *F4D C" 0A CMP 4)0A
221$ *F4F 1* CLC
221' *F$0 30 02 BMI !E-1
221# *F$2 '" 0# ADC 4)0#
221* *F$4 '" 30 !E-1 ADC 4)30
221" *F$'
2220 *F$' ; OUTC!T - OUTPUT ASCII C!AR (KIM)
2221 *F$' ; CLOCK NOT USED
2222 *F$' ; -,Y PRESERVED
2223 *F$' ; MUST RESIDE ON ONE PAE - TIMIN CRITICAL
2224 *F$'
222$ *F$' *E 3* A' OUTC!T ST- SCR* ;PRESERVE -
222' *F$" *C 3" A' STY SCR" ;DITTO Y
222# *F$C *$ FC STA C!AR
222* *F$E A" FF LDA 4)FF ;USE FF .%S!IFTS TO COUNT BITS
222" *F'0 4* KIMBIT P!A ;SAVE BIT CTR
2230 *F'1 AD 02 A4 LDA TPOUT ;ET CURRENT OUTPUT LEVEL
2231 *F'4 4' FC LSR C!AR ;ET DATA BIT IN CARRY
2232 *F'' A2 12 LD- 41* ;ASSUME /ONE/
2233 *F'* B0 02 BCS !F
2234 *F'A A2 24 LD- 43' ;BIT IS 0ERO
223$ *F'C A0 1" !F LDY 42$
223' *F'E 4" 0* EOR 4TPBIT ;INVERT OUTPUT
223# *F#0 *D 02 A4 STA TPOUT
223* *F#3 ** !FP1 DEY ;PAUSE FOR 13* USEC
223" *F#4 D0 FD BNE !FP1
2240 *F#' CA DE- ;COUNT !ALF CYCS OF !F
2241 *F## D0 F3 BNE !F
2242 *F#" A2 1* LD- 424 ;ASSUME BIT IS ONE
2243 *F#B B0 02 BCS LF20
2244 *F#D A2 0C LD- 412 ;BIT IS 0ERO
224$ *F#F A0 2# LF20 LDY 43"
224' *F*1 4" 0* EOR 4TPBIT ;INVERT OUTPUT
224# *F*3 *D 02 A4 STA TPOUT
224* *F*' ** LFP1 DEY ;PAUSE FOR 20* USEC
224" *F*# D0 FD BNE LFP1
22$0 *F*" CA DE- ;COUNT !ALF CYCS
22$1 *F*A D0 F3 BNE LF20
22$2 *F*C '* PLA ;RESTORE BIT CTR
22$3 *F*D 0A ASL A ;DECREMENT IT
22$4 *F*E D0 D0 BNE KIMBIT ;FF S!IFTED *- ( 0
22$$ *F"0 AE 3* A' LD- SCR*
22$' *F"3 AC 3" A' LDY SCR"
22$# *F"' "* TYA ;RESTORE DATA BYTE
22$* *F"# '0 RTS
22$" *F"*
22'0 *F"* FF FF .DB )FF,)FF ;NOT USED
22'1 *F"A
22'2 *F"A ; REISTER NAME PATC!
22'3 *F"A *()*F"A
22'4 *F"A $3 .DB &S&
22'$ *F"B 4' .DB &F&
22'' *F"C 41 .DB &A&
22'# *F"D $* .DB /-/
22'* *F"E $" .DB &Y&
22'" *F"F 01 .DB )01
22#0 *FA0 ;
22#1 *FA0 ;
22#2 *FA0 ;***
22#3 *FA0 ;*** DEFAULT TABLE
22#4 *FA0 ;***
22#$ *FA0 *()*FA0
22#' *FA0 DFTBLK (*
22## *FA0 00 C0 .D. )C000 ;BASIC *** +UMP TABLE
22#* *FA2 A# *B .D. TTY
22#" *FA4 '4 *B .D. NE.DEV
22*0 *FA' 00 00 .D. )0000 ;PAE 0ERO
22*1 *FA* 00 02 .D. )0200
22*2 *FAA 00 03 .D. )0300
22*3 *FAC 00 C* .D. )C*00
22*4 *FAE 00 D0 .D. )D000
22*$ *FB0 04 .DB )04 ;TAPE DELAY (".0 SEC)
22*' *FB1 2C .DB )2C ;KIM TAPE BOUNDARY
22*# *FB2 4' .DB )4' ;!S TAPE BOUNDARY
22** *FB3 00 00 .DB )00,)00 ;SCR3,SCR4
22*" *FB$ 33 .DB )33 ;!S TAPE FIRST 1%2 BIT
22"0 *FB' 00 00 .DB )00,)00 ;SCR',SCR#
22"1 *FB* 00 00 00 00 .DB )00,)00,)00,)00 ;SCR*-SCRB
22"2 *FBC $A .DB )$A ;!S TAPE SECOND 1%2 BIT
22"3 *FBD 00 00 00 .DB )00,)00,)00 ;SCRD-SCRF
22"4 *FC0 0000'D'E*'0' .DB )00,)00,)'D,)'E,)*',)0' ;DISP BUFFER (SY1.1)
22"$ *FC' 00 00 00 .DB )00,)00,)00 ;NOT USED
22"' *FC" 00 .DB )00 ;PARNR
22"# *FCA 000000000000 .D. )0000,)0000,)0000 ;PARMS
22"* *FD0 01 .DB )01 ;PADBIT
22"" *FD1 4C .DB )4C ;SDBYT
2300 *FD2 00 .DB )00 ;ERCNT
2301 *FD3 *0 .DB )*0 ;TEC!O
2302 *FD4 B0 .DB )B0 ;TOUTFL
2303 *FD$ 00 .DB )00 ;KS!FL
2304 *FD' 00 .DB )00 ;TV
230$ *FD# 00 .DB )00 ;LSTCOM
230' *FD* 10 .DB )10 ;MA-RC
230# *FD" 4A *B .D. RESET ;USER RE/S
230* *FDB FF .DB )FF ;STACK
230" *FDC 00 .DB )00 ;FLAS
2310 *FDD 00 .DB )00 ;A
2311 *FDE 00 .DB )00 ;-
2312 *FDF 00 .DB )00 ;Y
2313 *FE0 ;VECTORS
2314 *FE0 4C BE *" +MP !KEY ;INVEC
231$ *FE3 4C 00 *" +MP !DOUT ;OUTVEC
231' *FE' 4C 'A *" +MP KYSTAT ;INSVEC
231# *FE" 4C D1 *1 +MP M1 ;UNRECONI0ED SYNTA- (ERROR)
231* *FEC 4C D1 *1 +MP M1 ;UNRECONI0ED COMMAND (ERROR)
231" *FEF 4C 0' *" +MP SCAND ;SCNVEC
2320 *FF2 #E ** .D. RIN ;IN PTR FOR E-EC FROM RAM
2321 *FF4 C0 *0 .D. TRCOFF ;USER TRACE VECTOR
2322 *FF' 4A *0 .D. SVBRK ;BRK
2323 *FF* 2" *0 .D. SVIR1 ;USER IR1
2324 *FFA "B *0 .D. SVNMI ;NMI
232$ *FFC 4A *B .D. RESET ;RESET
232' *FFE 0F *0 .D. IR1BRK ;IR1
232# "000
232* "000 LENTRY ()*C#*
232" "000 SENTRY ()*C#*2)20F
2330 "000 RNAM ()*F"A ;REISTER NAME PATC!
2331 "000
2332 "000 .END
<=>?7 N@?ABC DE BCCDC> ( 0

You're Reading a Free Preview

Descarga
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->