jumpToSubroutine

play a note assembly6502

Sep 5th, 2020 (edited)
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; 10 SYS (49152)
  2.  
  3. *=$0801
  4.  
  5.         BYTE    $0E, $08, $0A, $00, $9E, $20, $28,  $34, $39, $31, $35, $32, $29, $00, $00, $00
  6. ;----------------------------------------------------------------------------------------------
  7.  
  8. *=$C000
  9.  
  10. defm lsa
  11.         lda #$/1
  12.         sta $/2
  13.         endm
  14.  
  15. INIT
  16. ;           Val MemAddress
  17.         lsa 44, D400    ;frequency voice1 low byte
  18.         lsa 1D, D401    ;frequency voice1 high byte
  19.         lsa 0F, D418    ;volume
  20.  
  21.         ;ADSR  
  22.         lsa 11, D405    ;attack
  23.         lsa F0, D406    ;sustain
  24.  
  25.         ;play note
  26.         lsa 11, D404    ;control register
  27.  
  28. HALT
  29.         jmp HALT
Add Comment
Please, Sign In to add comment