)²آ
 \ VIDITEL-MAIN 6.0 /  PRINT $12"********************************"( PRINT "ATOM-VIDITEL SOURCE  (C) TH-SOFT"2 PRINT "********************************"< PRINT '"ATTENTIE: HET PROGRAMMA vVDU1.1"'F PRINT "MOET EERST GE'RUN'D WORDEN!!"'"     ====="''P INPUT "GEEF VIA POORT (A/B)"$TOPZ IF 1:($TOP="A" OR $TOP="B") GOTO 80d n *LOAD D:VDUSYMx *LOAD C:vVDU‚ *DIRŒ – FOR N=0 TO 1  PASS Nھ ´ ASM-CONT¾.OPT:01010000ب.XTRN#8200,#9000ز.CDE(VDU'END)ـ.RAM(VDU'END-4096) \*??*و.IF $TOP="A" .GOTO 290ً:VIA'DRG=#B800 \*B*ْ:VIA'DDR=#B802 \*B*:INT'MSK1=144  \*B*:INT'MSK2=16   \*B*.IF $TOP="B" .GOTO 330":VIA'DRG=#B801 \*A*,:VIA'DDR=#B803 \*A*6:INT'MSK1=130  \*A*@:INT'MSK2=2    \*A*J:VIA'T1'L=#B804T:VIA'T1'H=#B805^:VIA'T1'LTCH'L=#B806h:VIA'T1'LTCH'H=#B807r:VIA'T2'L=#B808|:VIA'T2'H=#B809†:VIA'ACR=#B80Bگ:VIA'PCR=#B80Cڑ:VIA'IFR=#B80D¤:VIA'IER=#B80E®:pia'B=#B001¸:pia'C=#B002آ:TEXT=#F7D1ج:HEX'ACCU=#F802ض:BELL=#FD1Aà:KEY'SCAN=#FE71ê:OSSAVE=#FFDDô:OSRDCH=#FFE3‏:OSWRCH=#FFF4:NEW=#C2B2:BRK'VEC=#202:INT'VEC=#204&:LOCK'STS=#E70:'LOG=#96::FCB=#70 \10 BYTESD:SVNAME=#140N:'LOG'START=#2A00 \*??*X:'LOG'END=#236b:'AUTO'TX=#94l:'AUTO'TX'START=#2A00 \*??*v:DATA'TX=#21F€:PAR=#220ٹ:RX'STS=#221”:RX'CNT=#222‍:DATA'RX=#223¨:TX'STS=#224²:TX'CNT=#225¼:GEN'STS=#226ئ:RECV'PNT=#227ذ:PRNT'PNT=#228ع:BIT'RX=#229ن:HALF'BIT'RX=#22Bî:BIT'TX=#22Dّ:STORE=#22F\4 BYTES:UITBR'ADR=#233\3 BYTES:BUF=#2900 \*??*\\\\\\\\\\\\\\\\\\\\\\\\\\ \ DEZE ROUTINE BEREKENT*\ DE PARITEIT (ZOWEL4\ ZENDEN ALS ONTVANGEN)>:CALC'PARH STA TMP2R LDA@32;BIT GEN'STS\ BVS NO'PARf BEQ NOT'MRK'SPCp ASL TMP2z LDA GEN'STS„ BNE SET'PARژ:NOT'MRK'SPCک LDX@0¢ ASL TMP2;LDA TMP2¬:NEXT'BIT¶ BPL NO'INC'PARہ INXت:NO'INC'PARش ASLA;BNE NEXT'BITق TXA;EOR GEN'STSè:SET'PARٍ LSRA;LDA TMP2;RORAü STA TMP2:NO'PAR LDA TMP2 RTS$\\\\\\\\\\\\\\\\\\\\\\\\\\.\ DEZE ROUTINE VERZENDT8\ DE INHOUD VAN DE ACCU-B\ MULATORL:TRANSMITV JSR CALC'PAR` PHA;LDA@16j:NOT'READYt BIT TX'STS~ BEQ NOT'READYˆ PLA;STA DATA'TX’ LDA@128;STA TX'STSœ LDA@8;STA TX'CNT¦ LDA BIT'TX° STA VIA'T2'L؛ LDA BIT'TX+1ؤ STA VIA'T2'Hخ LDA@160;STA VIA'IERط LDA@0;STA VIA'DRGâ RTSى\\\\\\\\\\\\\\\\\\\\\\\\\\ِ\ DEZE ROUTINE HAALT DE\ DATA UIT HET BUFFER
\ CARRY:\  SET = GEEN DATA\ CLEAR= WEL DATA(:get'data2 LDX PRNT'PNT< CPX RECV'PNTF BNE NOT'EOD'YETP:NO'DATAZ SECd RTSn:NOT'EOD'YETx LDA BUF,X‚ INX;STX PRNT'PNTŒ STA TMP3;JSR CALC'PAR– CMP TMP3  BEQ PAR'OKھ LDA@127´:PAR'OK¾ BIT GEN'STS;BVS NO'PAR2ب AND@127ز:NO'PAR2ـ CLC;RTSو\\\\\\\\\\\\\\\\\\\\\\\\\\ً\ DEZE ROUTINE PRINT DEْ\ BUFFER WAARIN DE BINNEN-\ KOMENDE DATA WORDT GEZET:PRINT'BUFFER JSR get'data" BCC NEW'DATA, RTS6:NEW'DATA@ JSR OSWRCHJ STA TMP2;LDA@16T BIT GEN'STS;BEQ NO'LOG^ JSR 'LOG'DATAh:NO'LOGr JMP PRINT'BUFFER|\\\\\\\\\\\\\\\\\\\\\\\\\\†:'LOG'DATAگ LDA TMP2ڑ LDY@0;STA('LOG),Y¤ INC 'LOG;BNE NO'INC'H® INC 'LOG+1;LDA 'LOG+1¸ CMP 'LOG'ENDآ BNE NO'INC'Hج JMP FUNC4'ض:NO'INC'Hà RTSê\\\\\\\\\\\\\\\\\\\\\\\\\\ô\DEZE ROUTINE SCANT HET‏\TOETSENBORD EN VERZENDT\DE DAARBIJ BEHORENDE CODE:KEYS LDA@16& BIT TX'STS0 BEQ RTS2: LDA@8;BIT GEN'STSD BEQ NO'AUTO'TXN JMP 'AUTO'TX'DATAX:NO'AUTO'TXb JSR KEY'SCANl BCC KEY'PRESSEDv LDA GEN'STS;AND@127€ STA GEN'STSٹ RTS”:KEY'PRESSED‍ BIT pia'C¨ BVC REPT² BIT GEN'STS¼ BMI RTS2ئ LDA GEN'STS;ORA@128ذ STA GEN'STSع:REPTن CPY@15;BCS NORMAL'KEYSî CPY@5;BCC NORMAL'KEYSّ BNE NO'LOCK LDA LOCK'STS EOR@96;STA LOCK'STS:RTS2  RTS*:NO'LOCK4 CPY@6> BNE NO'CUR'L'RH BIT pia'B;BMI CUR'RR LDA@8;BNE SEND\:CUR'Rf LDA@9;BNE SENDp:NO'CUR'L'Rz CPY@7;BNE NO'CUR'U'D„ BIT pia'B;BMI CUR'Uژ LDA@10;BNE SENDک:CUR'U¢ LDA@11;BNE SEND¬:NO'CUR'U'D¶ CPY@13;BNE NO'RETURNہ LDA@13;JSR TRANSMITت BIT pia'Bش BPL SEND'EXTRA'LFق RTSè:SEND'EXTRA'LFٍ LDA@10;BNE SENDü:NO'RETURN	 CPY@14;BEQ COPY'TOETS	:RTS3	 RTS	$:COPY'TOETS	. LDA@27	8 JSR TRANSMIT	B BIT pia'B	L BMI ENDBOX	V LDA@75;BNE SEND	`:ENDBOX	j LDA@74;BNE SEND	t:NORMAL'KEYS	~ CPY@16;BCC NORMAL2	ˆ CPY@26;BCS NORMAL2	’ BIT pia'B;BVS NORMAL2	œ JMP FUNC'KEYS	¦:NORMAL2	° JSR CONVERT'TO'ASCII	؛ CMP@27;BNE SEND	ؤ BIT pia'B;BMI SEND	خ LDA@127;STA VIA'IER	ط JMP NEW \NAAR BASIC	â:SEND	ى CMP@#30;BNE NOT'0	ِ BIT pia'B;BMI NOT'0
 LDA@#5F

:NOT'0
 JMP TRANSMIT
:CONVERT'TO'ASCII
( PHP;JMP#FEB1
2\\\\\\\\\\\\\\\\\\\\\\\\\\
<:'AUTO'TX'DATA
F LDY@0;LDA('AUTO'TX),Y
P CMP@4;BEQ END'AUTO'TX
Z BIT pia'B;BPL END'AUTO'TX
d BVC RTS3
n INC 'AUTO'TX;BNE NO'INC'H2
x INC 'AUTO'TX+1
‚:NO'INC'H2
Œ JMP TRANSMIT
–:END'AUTO'TX
  LDA GEN'STS;AND@247
ھ STA GEN'STS
´ JSR GO'BOTM
¾ JSR TEXT
ب.ASC \Auto-transmit is beeindigd\
ز NOP;JMP LOAD'POS
ـ\\\\\\\\\\\\\\\\\\\\\\\\\\
و:MAIN'ENTRY
ً LDA@(BRK'HNDLR)%256
ْ STA BRK'VEC LDA@(BRK'HNDLR)/256 STA BRK'VEC+1 JSR INIT'VDU" JSR INTRO, LDA@96;STA LOCK'STS6\ LOCK TOETS IN KLEINE@\ LETTER MODE ZETTEN.J JSR INIT'INTT:MAIN'LOOP^ JSR PRINT'BUFFERh JSR KEYSr JMP MAIN'LOOP|\\\\\\\\\\\\\\\\\\\\\\\\\\†:BRK'HNDLRگ LDX@255;TXS;LDA@30ڑ JSR OSWRCH¤ JSR BELL;JMP MAIN'LOOP®\\\\\\\\\\\\\\\\\\\\\\\\\\¸:INIT'INTآ SEIج LDX@1;STX VIA'DDRض STX VIA'DRGà LDA@255;STA VIA'IFRê LDA@127;STA VIA'IERô DEX;STX VIA'ACR‏ STX VIA'PCR STX RECV'PNT STX PRNT'PNT LDA@(INT'ROUT)%256& STA INT'VEC0 LDA@(INT'ROUT)/256: STA INT'VEC+1D STX RX'STSN LDA@16;STA TX'STSX LDA@(INT'MSK1)b STA VIA'IERl CLI;RTSv\\\\\\\\\\\\\\\\\\\\\\\\\\€:INT'ROUTٹ LDA@32” BIT VIA'IFR‍ BVS INT'T1¨ BEQ NO'INT'T2² JMP INT'T2¼:NO'INT'T2ئ LDA VIA'DRGذ LDA@(INT'MSK2)ع STA VIA'IERن LDA@8;STA RX'CNTî LDA@0;STA DATA'RXّ LDA@64;STA VIA'ACR STA RX'STS LDA HALF'BIT'RX STA VIA'T1'L  LDA HALF'BIT'RX+1* STA VIA'T1'H4 LDA BIT'RX> STA VIA'T1'LTCH'LH LDA BIT'RX+1R STA VIA'T1'LTCH'H\ LDA@192;STA VIA'IERf PLA;RTIp\\\\\\\\\\\\\\\\\\\\\\\\\\z:INT'T1„ LDA VIA'T1'Lژ BIT RX'STSک BPL DUMMY¢ LSR DATA'RX¬ LDA VIA'DRG¶ AND@128;ORA DATA'RXہ STA DATA'RXت DEC RX'CNTش BEQ END'OF'BYTEق PLA;RTIè:END'OF'BYTEٍ TXA;PHAü LDX RECV'PNT LDA DATA'RX STA BUF,X INX;STX RECV'PNT$ PLA;TAX. LDA@0;STA VIA'ACR8 STA RX'STSB LDA@64;STA VIA'IERL LDA@(INT'MSK1)V STA VIA'IER` PLA;RTIj:DUMMYt LDA@128;STA RX'STS~ PLA;RTIˆ\\\\\\\\\\\\\\\\\\\\\\\\\\’:INT'T2œ LDA VIA'T2'L¦ CLI° BIT TX'STS؛ BPL NOT'DATABITSؤ LDA DATA'TXخ STA VIA'DRGط LSR DATA'TXâ DEC TX'CNTى BEQ END'OF'BYTE2ِ:NEXT'BIT2 CLC
 LDA BIT'TX ADC VIA'T2'L STA VIA'T2'L( LDA BIT'TX+12 ADC VIA'T2'H< STA VIA'T2'HF PLA;RTIP:END'OF'BYTE2Z LDA@64;STA TX'STSd BNE NEXT'BIT2n:NOT'DATABITSx BVC NOT'STOPBIT‚ LDA@1;STA VIA'DRGŒ LDA@32;STA TX'STS– BNE NEXT'BIT2 :NOT'STOPBITھ LDA@16;STA TX'STS´ LDA@32;STA VIA'IER¾ PLA;RTIب\\\\\\\\\\\\\\\\\\\\\\\\\\ز:FUNC'KEYSـ TYA;ASLA;TAYو LDA FUNC'TAB-32,Yً STA TMP1+1ْ LDA FUNC'TAB-31,Y STA TMP1 JMP(TMP1):FUNC1" BIT VDU'STS;BVC TURN'CON, LDA@20;BNE TURN'COFF6:TURN'CON@ LDA@17J:TURN'COFFT JMP OSWRCH^:FUNC2h LDA VDU'STS;EOR@128r STA VDU'STS| RTS†:FUNC3گ LDA@16;BIT GEN'STSڑ BEQ FUNC3'¤ JMP BELL®:FUNC3'¸ LDA GEN'STS;ORA@20آ STA GEN'STSج LDA@('LOG'START)%256ض STA 'LOGà LDA@('LOG'START)/256ê STA 'LOG+1ô JSR GO'BOTM‏ JSR TEXT.ASC \Log is gestart vanaf _2A00\ NOP;JMP LOAD'POS:FUNC4& LDA@16;BIT GEN'STS0 BNE FUNC4': JMP BELLD:FUNC4'N LDA GEN'STS;AND@239X STA GEN'STS;JSR GO'BOTMb JSR TEXTl.ASC \Log is beeindigd op _\v NOP€ LDA 'LOG+1;JSR HEX'ACCUٹ LDA 'LOG;JSR HEX'ACCU” JMP LOAD'POS‍:FUNC5¨ JSR GO'BOTM² LDA@16;BIT GEN'STS¼ BEQ FUNC5'ئ JSR TEXTذ.ASC \Log is actief: geen auto-transmit\ع NOP;JMP LOAD'POSن:FUNC5'î LDA GEN'STS;ORA@8ّ STA GEN'STS LDA@('AUTO'TX'START)%256 STA 'AUTO'TX LDA@('AUTO'TX'START)/256  STA 'AUTO'TX+1* JSR TEXT4.ASC \Auto-transmit is gestart\> NOP;JMP LOAD'POSH:FUNC6R JSR GO'BOTM\ JSR TEXTf.ASC \BEWAAR SCHERM-Zeker weten(J/n)?\p NOPz JSR OSRDCH„ PHAژ JSR CLR'BOTM'LINک PLA;AND@223;CMP@CH"N"¢ BEQ NO'SVE¬ LDX@9¶:NXT'SCRSVہ LDA SCRSV'TAB,Xت STA FCB,Xش DEX;BPL NXT'SCRSVق:GO'SVEè LDX@FCB;SECٍ JSR OSSAVEü LDA SVNAME;CMP@13 BEQ NO'SVE INC SVNAME:NO'SVE$ JMP LOAD'POS.:SCRSV'TAB8.WO(SVNAME)B.WO#8000L.WO 0V.WO#8000`.WO#9800j:FUNC7t LDA@4;BIT GEN'STS~ BNE FUNC7'ˆ JMP BELL’:FUNC7'œ JSR GO'BOTM¦  JSR TEXT°.ASC \BEWAAR LOG-Zeker weten(J/n)?\؛ NOPؤ JSR OSRDCHخ PHAط JSR CLR'BOTM'LINâ PLA;AND@223;CMP@CH"N"ى BEQ NO'SVEِ LDX@7:NXT'LOGSV
 LDA 'LOGSV'TAB,X STA FCB,X DEX;BPL NXT'LOGSV( LDA 'LOG;STA FCB+82 LDA 'LOG+1;STA FCB+9< BNE GO'SVEF:'LOGSV'TABP.WO(SVNAME)Z.WO#2A00d.WO 0n.WO#2A00x:FUNC8‚:FUNC9Œ:NO'EXT– JMP BELL :FUNC0ھ LDA UITBR'ADR´ CMP@#4C¾ BNE NO'EXTب JMP UITBR'ADRز:FUNC'TABـ.DB(FUNC0)و.DB(FUNC1)ً.DB(FUNC2)ْ.DB(FUNC3).DB(FUNC4).DB(FUNC5).DB(FUNC6)".DB(FUNC7),.DB(FUNC8)6.DB(FUNC9)@\\\\\\\\\\\\\\\\\\\\\\\\\\J:SAVE'POST LDX@3^:SVLOOPh LDA CUR'H,X;STA STORE,Xr DEX;BPL SVLOOP;RTS|\\\\\\\\\\\\\\\\\\\\\\\\\\†:LOAD'POSگ JSR INV'CUR;LDX@3ڑ:LDLOOP¤ LDA STORE,X;STA CUR'H,X® DEX;BPL LDLOOP;JMP INV'CUR¸\\\\\\\\\\\\\\\\\\\\\\\\\\آ:GO'BOTMج JSR SAVE'POSض:CLR'BOTM'LINà JSR TEXTê.BYTE 30,30,11ô.ASC \                                        \,11‏ NOP;RTS\\\\\\\\\\\\\\\\\\\\\\\\\\:INTRO JSR TEXT&.BY 27,"M",8," "0.ASC \VidiROM versie \:.BY (?TOP)D.ASC \ 6.0 (C) 1988 TH-Soft\,10,10,10,13E.ASC \Functietoetsen: (CTRL+)\,10,10,13F.ASC \1 \N NOP;JMP#A17F \ INTRO'VERVOLGX:SET'BAUD'RATEb TXA;ASLA;TAXl LDA RX,Xv STA BIT'RX;LDA RX+1,X€ STA BIT'RX+1;LDA HRX,Xٹ STA HALF'BIT'RX” LDA HRX+1,X‍ STA HALF'BIT'RX+1¨ LDA TX,X;STA BIT'TX² LDA TX+1,X;STA BIT'TX+1¼ RTSئ:BIT3=3333ذ:BIT12=833ع:BIT75=13333ن:HBIT3=1666î:HBIT12=416ّ:RX.WO(BIT3).WO(BIT12).WO(BIT12) :HRX*.WO(HBIT3)4.WO(HBIT12)>.WO(HBIT12)H:TXR.WO(BIT3)-20\.WO(BIT75)-20f.WO(BIT12)-20p z.END„ ژ NEXTک *SAVE D:MNSYM 8200 9000¢ *SAVE C:vMN 9200 9B00¬ ENDے8ےBENDے0VE C:vMN 9200 9B00ت ENDےENLˆV ±:ةذظ„ٹبLôX$Y*Y

$Y.Y

X$Y 4Y` 4YLQ?©؛فًگ`H  ْO OYhiL6Y ±8 =T½kYik…C©iY…D ±:lC KN55A
5
L/P X »<¢µںً ‡?èL€Y…‰ب±:…ٹ ›2‰7/ =#`©$ ‡? ±:L™vةذ©Fذ©TL‡? ±:ھً	ب±: ‡?تذ÷`ـYâY

ـ