home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-07-13 | 7.6 KB | 225 lines | [04] ASCII Text (0x0000) |
- ;
- ; EDIT.SRC2
- ;
- ;
- DURDONE JMP KEYMODE
- ;
- PROCTIE LDA TIE
- BEQ TIEDONE
- BPL ADD2TIE ;IF TIE > 0 ADD, IF <0 SUBTRACT
- SEC
- LDA DURACC
- SBC DURTN
- STA DURACC
- LDA DURACC+1
- SBC DURTN+1
- STA DURACC+1
- RTS
- ;
- ADD2TIE CLC
- LDA DURACC
- ADC DURTN
- STA DURACC
- LDA DURACC+1
- ADC DURTN+1
- STA DURACC+1
- RTS
- ;================================================== *KEY*
- EQUALS LDA #$00
- STA TIE
- LDA DURACC
- STA DURTN
- LDA DURACC+1
- STA DURTN+1
- ;
- TIEDONE LDA #$00
- STA DURACC
- STA DURACC+1
- LDA DURTN ;CONVERT DUR TO 2 BYTE VLQ
- AND #$7F
- LDY #$01
- STA (PTR),Y
- LDA DURTN
- ROL A
- LDA DURTN+1
- ROL A
- ORA #$80
- LDY #$00
- STA (PTR),Y
- RTS
- ;================================================== *KEY*
- PLUS LDA #$01
- STA TIE
- BNE DURDONE
- ;================================================== *KEY*
- MINUS LDA #$FF
- STA TIE
- BNE DURDONE
- ;================================================== *KEY*
- DOT LDA #$01
- STA MODE
- JMP KEYMODE
- ;================================================== *KEY*
- NINE LDA #$02
- STA MODE
- JMP KEYMODE
- ;================================================== *KEY*
- FIVE LDA #$03
- STA MODE
- JMP KEYMODE
- ;================================================== *KEY*
- PKEY JSR PLAY
- JSR CLEANUP
- RTS
- ;================================================== *KEY*
- RBRKT INC SPEEDSAV
- BPL RBRKT1
- DEC SPEEDSAV
- RBRKT1 JMP PLAY
- ;================================================== *KEY*
- LBRKT DEC SPEEDSAV
- BNE LBRKT1
- INC SPEEDSAV
- LBRKT1 JMP PLAY
- ;================================================== *KEY*
- GRTRTHAN LDY #$02 ;ADD 1 TO NOTE
- LDA (PTR),Y
- CLC
- ADC #$01
- BMI GRTRRTS ;DONT STORE IF >127
- STA (PTR),Y
- JMP EXIT
- GRTRRTS RTS
- ;================================================== *KEY*
- LESSTHAN LDY #$02
- LDA (PTR),Y
- SEC
- SBC #$01
- BEQ LESSRTS
- STA (PTR),Y
- JMP EXIT
- LESSRTS RTS
- ;================================================== *KEY*
- CTRLN LDY #$02 ;SET NOTE = 0
- LDA #$00
- STA (PTR),Y
- JMP EXIT
- ;================================================== *KEY*
- CTRLV LDY #$03 ;SET V = 0
- LDA #$00
- STA (PTR),Y
- JMP EXIT
- ;================================================== *KEY*
- VKEY LDY #$03 ;SET V=$40
- LDA #$40
- STA (PTR),Y
- ;==================================================
- EXIT JSR DISPNOTE
- JMP WAITKEY
- ;==================================================
- LINEOUT JSR PROCDLY ;PROCESS DELAY
- LDA MEASFLAG ;CALL DISPLAY ROUTINE
- BNE DISPIT ;ONLY IF FLAG <> 0 (MEASURE MODE) OR
- LDA SPEED ;SPEED = 0 (NOT PLAYBACK MODE)
- BEQ DISPIT
- RTS
- ;
- DISPIT JMP DISPLAY
- ;==================================================
- PROCDLY LDA MEASFLAG ;IF FLAG = 0, EXIT
- BNE SUBDLY
- RTS
- ;
- SUBDLY LDA MCTR ;IF FLAG <> 0, SUBTRACT DELAY FROM MEAS
- SEC
- SBC DURL
- STA MCTR
- LDA MCTR+1
- SBC DURH
- STA MCTR+1
- BMI PRNTBAR ;IF END OF MEASURE, PRINT BAR
- RTS
- ;
- PRNTBAR LDX #$40 ;PRINT INVERSE ==='S FOR MEASURE MARKER
- LDA #$3D
- ;
- PRNTBAR1 JSR $FDED
- DEX
- BNE PRNTBAR1
- ;
- ADDMEAS LDA MCTR
- CLC
- ADC MEASLEN
- STA MCTR
- LDA MCTR+1
- ADC MEASLEN+1
- STA MCTR+1
- BMI ADDMEAS ;ADD UNTIL POSITIVE AGAIN
- ;
- LDA MEASLEN ;THEN SUBTRACT ONE MORE MEASURE
- SEC ;AND PRINT RESULT
- SBC MCTR
- STA $50
- LDA MEASLEN+1
- SBC MCTR+1
- STA $51
- LDA DURH
- CMP $51
- BNE CONVDEC
- LDA DURL
- CMP $50
- BNE CONVDEC
- ;
- CREXIT LDA #$8D ;CARRIAGE RETURN
- JSR $FDED
- LDA $C000
- RTS
- ;==================================================
- CONVDEC JSR HEXDEC
- JSR PRNTDEC
- CLV
- BVC CREXIT
- ;
- ;================================================== *KEY*
- MKEY LDA #$01
- STA MEASFLAG
- LDA MEASLEN
- STA MCTR
- LDA MEASLEN+1
- STA MCTR+1
- RTS
- ;================================================== *KEY*
- NKEY LDA #$00
- STA MEASFLAG
- RTS
- ;
- ;==================================================
- ADD4 CLC
- LDA #$04
- ADC MISCPTR
- STA MISCPTR
- LDA #$00
- ADC MISCPTR+1
- STA MISCPTR+1
- RTS
- ;==================================================
- FINDEND LDA #$00
- STA MISCPTR
- LDA #$20
- STA MISCPTR+1
- ENDLOOP1 LDY #$00
- LDA (MISCPTR),Y
- BNE ENDLOOP2
- INY
- LDA (MISCPTR),Y
- CMP #$FF
- BNE ENDLOOP2
- JSR ADD4
- RTS
- ;
- ENDLOOP2 JSR ADD4
- CLV
- BVC ENDLOOP1
- ;
- CHN EDIT.SRC3
-