C64 Software  <  SCA: The C64 Software Collection / BUTEC10CENTRONIC

  Run
1000              ;
1010              ;********************
1020              ;*                  *
1030              ;* CENTRONICS-PORT  *
1040              ;*                  *
1050              ;* 7 DATEN PB0-PB6  *
1060              ;* STROBE PB7       *
1070              ;* KEIN HANDSHAKING *
1080              ;*                  *
1090              ;* 31.10.1986 CW    *
1100              ;*                  *
1110              ;********************
1120              ;
1130              ;
1140              ORG 49152
1150              ;
1160 SHORTDELAY   EQU 2
1170 LONGDELAY    EQU 45
1180              ;
1190              ;
1200 OUTPUTV      EQU 806
1210 CIA          EQU $DD00
1220              ;
1230              ;
1240 INIT         LDA #<CENTR
1250              STA OUTPUTV
1260              LDA #>CENTR
1270              STA OUTPUTV+1
1280              ;
1290              LDA #255  ;ALLES AUSG
1300              STA CIA+3 ;DDRB
1310              LDA #0    ;UNCLOCK
1320              STA CIA+1 ;PB
1330              LDA #5
1340              JSR WARTEN
1350              LDA #141  ;CLOCK
1360              STA CIA+1 ;PB
1370              LDA #5
1380              JSR WARTEN
1390              LDA #0    ;UNCLOCK
1400              STA CIA+1 ;PB
1410              JSR MESSAGE
1420              LDA #20
1430              JSR WARTEN
1440              RTS
1450              ;
1460              ;
1470 CENTR        PHA
1480              LDA $9A    ;DEVICE NR
1490              CMP #4
1500              BEQ CENTR1
1510              JMP $F1CD  ;WEITER
1520              ;
1530 CENTR1       PLA
1540              PHA
1550              JSR TRANSFORM
1560              PHA
1570              AND #127
1580              STA CIA+1
1590              ORA #128   ;CLOCK
1600              STA CIA+1
1610              LDA #3
1620              JSR WARTEN
1630              PLA
1640              AND #127   ;UNCLOCK
1650              STA CIA+1
1660              PLA
1670              PHA
1680              JSR ENDWARTEN
1690              PLA
1700              CLC
1710              RTS
1720              ;
1730 TRANSFORM    CMP #192 ; ""
1740              BNE TRANSFORM1
1750              LDA #126
1760              RTS
1770 TRANSFORM1   CMP #221 ; ""
1780              BNE TRANSFORM2
1790              LDA #127
1800              RTS
1810 TRANSFORM2   CMP #165 ; ""
1820              BNE TRANSFORM3
1830              LDA #123
1840              RTS
1850 TRANSFORM3   CMP #161 ; ""
1860              BNE TRANSFORM4
1870              LDA #124
1880              RTS
1890 TRANSFORM4   CMP #166 ; ""
1900              BNE TRANSFORM5
1910              LDA #125
1920              RTS
1930 TRANSFORM5   CMP #128 ; GROSSB
1940              BCC TRANSFORM6
1950              SEC
1960              SBC #96
1970 TRANSFORM6   RTS
1980              ;
1990              ;
2000 MESSAGE      LDX #0
2010 MESSAGE1     LDA TEXT,X
2020              BEQ MESSAGE2
2030              JSR 65490
2040              INX
2050              BNE MESSAGE1
2060 MESSAGE2     RTS
2070              ;
2080              ;
2090 ENDWARTEN    CMP #13 ; CRLF
2100              BEQ LANGWARTEN
2110              CMP #5  ; TAB
2120              BEQ LANGWARTEN
2130              LDA #SHORTDELAY
2140              DFB $2C
2150 LANGWARTEN   LDA #LONGDELAY
2160 WARTEN       STA TMP
2170 WARTEN1      LDA 53265
2180              BPL WARTEN1
2190 WARTEN2      LDA 53265
2200              BMI WARTEN2
2210              DEC TMP
2220              BNE WARTEN1
2230              RTS
2240              ;
2250              ;
2260 TMP          DFB 0
2270 TEXT         DFB 13,"",13
2280              DFB "",0
READY.