Created
July 22, 2018 06:23
-
-
Save vintagechips/3a110934a7c592280c50a50ac89bd46c to your computer and use it in GitHub Desktop.
SBC6303+SBC-I/O 6821 port test program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* SBCIO21 - 6821 PORT TEST PROGRAM | |
* TARGET: LILBUG ON SBC6303 | |
* ASSEMBLER: ARCPIT X6801.EXE | |
* | |
* 6821 RESISTERS | |
PORTA EQU $8050 A,PORT/DIRECTION | |
CRA EQU $8051 A,CONTROL | |
PORTB EQU $8052 B,PORT/DIRECTION | |
CRB EQU $8053 B,CONTROL | |
* | |
* LILBUG INTERNAL ROUTINE | |
DELAY EQU $F8D8 54MS DELAY | |
MAIN EQU $F952 | |
* | |
* INITIALIZE | |
ORG $0080 | |
CLR CRB SELECT DIRECTION | |
LDAA #$FF OUTPUT CODE | |
STAA PORTB SET OUTPUT | |
LDAA #$04 PORT CODE | |
STAA CRB SELECT PORT | |
* | |
* START | |
LDAA #10 | |
LOOP1 COM PORTB REVERSE PORT | |
LDAB #10 | |
LOOP2 JSR DELAY | |
DECB | |
BNE LOOP2 | |
DECA | |
BNE LOOP1 | |
JMP MAIN | |
* | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment