*************** * LynxBeat An UPN interpreter for ByteBeat code * 6 bytes free, 39Bytes for ByteBeat. **************** include include include ;; If not enabled, counter runs with 7280Hz HAVE_8000Hz EQU 1 //->HAVE_SWAP EQU 1 //->HAVE_DUB EQU 1 ;;; ROM sets this address screen0 equ $2000 BEGIN_ZP t ds 2 t_latch ds 2 dummy ds 1 pc ds 2 tmp ds 4 END_ZP stack equ $c0 run $200 IFND LNX ;; Setup needed if loaded via BLL/Handy lda #8 sta $fff9 cli lda #$20 stz $fd94 sta $fd95 stz $fd50 ldy #2 stz $fd50 lda #10 sta t lda #2 sta 6 ENDIF ;; LynxBeat commands ;; Each command is the low-byte of the routine, therefore ;; all commands must be in a single page! MACRO BB_T dc.b 255 dc.b \0,<\0 else dc.b HBL 8000Hz lda #125 sta $fd00 lda #$20 sta $fd93 ENDIF ;; init sound system stz $fd50 ;; init sound system //-> MOVEI baseClock,$fffe sty $ffff ; Y = 2 from LynxROM lda # sei //-> lda t //-> sta t_latch //-> lda t+1 //-> sta t_latch+1 cli lda #$80 tsb $fd01 ; enable HBL interrupt tax txs ; and init SP //-> MOVEI program,pc ; PC+1 is set to $2 by LynxROM lda # 1 REPT free dc.b $42 ENDR ENDIF echo "Size:%dsize Free:%dfree Program:%xprogram %dpsize"