home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Set of Apple II Hard Drive Images
/
eric.hdv
/
ANNMIDI
/
SENDDUMP.BAD.txt
< prev
next >
Wrap
Text File
|
2020-08-13
|
5KB
|
132 lines
;-------------------------------------------------------------------------
; SEND DUMP THROUGH APPLE MIDI DRIVER THROUGH ANNUNCIATOR 0
; POPULATE 6,7 WITH STARTING ADDRESS OF DATA.
; POPULATE 8,9 WITH ENDING ADDRESS OF DATA.
;-------------------------------------------------------------------------
ORG $0300
;
AN0OFF EQU $C058 ;APPLE ADDRESSES THAT CONTROL ANNUNCIATOR OUTPUTS
AN0ON EQU $C059
;
STRTADRS EQU $06
ENDADRS EQU $08
DATAPTR EQU $19
;---------------------------------------------------------------------------
INIT BIT AN0ON
LDA STRTADRS
STA DATAPTR
LDA STRTADRS+1
STA DATAPTR+1
LDY #$00 ;Y WILL BE AN INDEX INTO THE DATA AREA
XMITLOOP LDA (DATAPTR),Y ;GET A DATA BYTE
JSR XMITONE
INC DATAPTR
BNE CHKADRS
INC DATAPTR+1
CHKADRS LDA DATAPTR+1
CMP ENDADRS+1
BNE XMITLOOP
LDA DATAPTR
CMP ENDADRS
BNE XMITLOOP
RTS
TEMPA DFB $00
TEMPX DFB $00
;---------------------------------------------------------------------------
XMITONE STA TEMPA ;SAVE A AND X REGISTERS
STX TEMPX
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT7+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT6+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT5+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT4+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT3+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT2+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT1+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
ASL A ;SHIFT BIT INTO CARRY
TAX ;SAVE CURRENT IMAGE OF DATA BYTE
LDA #$00 ;ZERO OUT ACCUMULATOR FOR ADD
ADC #>AN0OFF ;ADD CARRY TO ANNUNCIATOR ADDRESS
STA BIT0+1 ;MODIFY THE XMITBITS SUBROUTINE
TXA ;RESTORE ACCUMULATOR
;
JSR XMITBITS ;SEND THE BYTE OUT
LDX TEMPX
LDA TEMPA ;RESTORE X AND A
RTS
;-----------------------------------------------------------------------
XMITBITS BIT AN0OFF ;4 CYCLES - TRANSMIT START BIT - ALWAYS LOW
JSR DELAY22 ;6+22
BIT0 BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT1 BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT2 BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT3 BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT4 BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT5 BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT6 BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT7 BIT AN0OFF ;4
JSR DELAY22 ;6+22
BIT AN0ON ;4 ;TRANSMIT STOP BIT - ALWAYS HIGH
JSR DELAY22 ;6+22
RTS
;-----------------------------------------------------------------------
DELAY22 NOP ;WAIT 22 CYCLES
NOP
NOP
NOP
NOP
NOP
NOP
NOP
RTS
;-----------------------------------------------------------------------