home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ABBUC Magazin 43B
/
ABBUC_Magazin_43_199x_ABBUC_Side_B.atr
/
lcd8000.src
< prev
next >
Wrap
Text File
|
2023-02-26
|
4KB
|
243 lines
********************************
*HAENDLER FUER ARGS LCD-DISPLAY*
* Hard- u. Software by RoBue *
* 14.12.1993 *
********************************
*FUNKTIONEN: Textausgabe
* Loeschen (125)
* Scrollen bei Ausgabe
* Cursorbewegungen (Pfeiltasten)
* Texteingabe ueber K:-Handler
*HANDLERNAME: "A:"
ORG $8000,$A800
PACTL EQU 54546
PORTA EQU 54544
PBCTL EQU 54547
PORTB EQU 54545
PHENTV EQU $E486
TIMER EQU $14
DLEFT EQU 24
DRIGHT EQU 28
CLEFT EQU 16
CRIGHT EQU 20
FUNCTION EQU 56
DON EQU 15
DCLEAR EQU 1
CMOVE EQU 7
CSTOP EQU 6
CHOME EQU 2
START PLA BASIC
*
LDX #'A A:-HANDLER
LDA #TABELLE:H EINTAGEN
LDY #TABELLE:L
SEC
JSR PHENTV
BCC START1
RTS KEIN EINTRAG
*
START1 LDA #48 PIA UND
STA PACTL DISPLAY
STA PBCTL INITIALI-
LDA #255 SIEREN
STA PORTA
STA PORTB
LDA #52
STA PACTL
STA PBCTL
LDA #FUNCTION 8BIT
JSR BEFEHL
LDA #DON LCD AN
JSR BEFEHL
LDA #DCLEAR LCD LOESCHEN
JSR BEFEHL
READY LDY #0 READY
READY1 LDA TEXT,Y AUF LCD
BEQ EXIT AUSGEBEN
JSR ZEICHEN
LDX #255
WARTEN DEX
BNE WARTEN
INY
JMP READY1
EXIT RTS
TEXT ASC ' ARGS-LCD Ready'
DFB 0
TABELLE DFW OPEN-1 Handlertabelle
DFW CLOSE-1
DFW GET-1
DFW PUT-1
DFW EXIT-1
DFW EXIT-1
JMP EXIT
DFB 0
OPEN LDA #DON
JSR BEFEHL
LDA #DCLEAR
JSR BEFEHL
LDA #0
STA CURSPOS
STA LINE
LDY #1
RTS
CLOSE LDY #1
RTS
GET JSR $F2FD
CPY #1
BNE GETEND
STA GETWERT
JSR PUT
LDA GETWERT
GETEND RTS
GETWERT DFB 0
PUT TAX
CPX #29 CURSOR?
BEQ DOWN
CPX #31
BEQ RIGHT
CPX #28
BEQ UP
CPX #30
BNE PUT0
JMP LEFT
PUT0 CPX #125 CLEAR?
BNE PUT1
PUT00 LDA #1
JSR BEFEHL
LDA #0
STA CURSPOS
STA LINE
LDY #1
RTS
PUT1 CPX #155 EOL?
BNE PUT2
LDA #CHOME
JSR BEFEHL
LDY #0
STY CURSPOS
STY LINE
INY
RTS
PUT2 JSR SCROLL AUSGABE
TXA
JSR ZEICHEN
INC CURSPOS
LDY #1
RTS
CURSPOS DFB 0
LINE DFB 0
* CURSOR-MOVE-ROUTINEN
* Pfeiltasten
UP LDA LINE
BEQ UPEND
LDX #40
UP1 LDA #CRIGHT
JSR BEFEHL
DEX
BNE UP1
DEC LINE
UPEND LDY #1
RTS
DOWN LDA LINE
BNE DOWNEND
LDX #40
DOWN1 LDA #CRIGHT
JSR BEFEHL
DEX
BNE DOWN1
INC LINE
DOWNEND LDY #1
RTS
RIGHT LDA #39
CMP CURSPOS
BEQ RIGHTEND
JSR SCROLL
LDA #CRIGHT
JSR BEFEHL
INC CURSPOS
RIGHTEND LDY #1
RTS
LEFT LDY CURSPOS
BEQ LEFTEND
DEC CURSPOS
JSR SCROLLR
LDA #CLEFT
JSR BEFEHL
LEFTEND LDY #1
RTS
SCROLLR CPY #13
BMI SCRREND
CPY #37
BPL SCREND
LDA #DRIGHT
JSR BEFEHL
SCRREND RTS
* SCROLL-ROUTINE FUER DISPLAY
* ab Position 12 wandert Display
* ab Position 36 steht es wieder
* beim Ruecksprung in Zeile 1
* wird Display geloescht
SCROLL LDY CURSPOS
CPY #40
BNE SCR2
LDA LINE
BEQ SCR
JMP PUT00
SCR INC LINE
LDA #25
STA CURSPOS
SCR1 DEC CURSPOS
BEQ SCREND
LDA #DRIGHT
JSR BEFEHL
JMP SCR1
SCR2 CPY #36
BPL SCREND
SCR3 CPY #12
BMI SCREND
LDA #DLEFT
JSR BEFEHL
SCREND RTS
* PROGRAMMIEREN DES DISPLAYS
* Wert steht im Akku
BEFEHL STA PORTB
LDA #4
BEFEHL1 STA PORTA
LDA #0
STA PORTA
LDY TIMER
INY
INY
WAIT CPY TIMER
BNE WAIT
RTS
* AUSGABE EINES ZEICHENS
* AUF DAS DISPLAY
* Wert steht im Akku
ZEICHEN STA PORTB
LDA #5
STA PORTA
NOP
LDA #0
STA PORTA
NOP
NOP
RTS¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯