org 0000H
sjmp start
org 0040H
start: mov R3,#-1;
loop4:
jb p1.0,stopzero ; the first step: see if button1 on. it is 0 jump to stopzero (2us)
inc R3 ;R3=0 at first (1us)
sjmp mod1;butoon=1 jump to paly the song (2us)
stopzero: ;(5us)
jb p1.1,stopone ;see if button2 is on. it's 0 jump to stoptone(2us)
inc R3 ; R3=0 at first (1us)
sjmp mod1 ; jump to paly the song (2us)
stopone:; (5us)
jb p1.3,loop4 ;see if button3 is on. it's 0 jump to stoptwo(2us)
inc R3
sjmp mod1 ; jump to paly the song (2us)
mod1: mov a,R3 ;(1us)
chec1: jb p1.0,chec2 ;(2us)find which song we are playing (2us)
sjmp b1 ;(2us)
chec2: jb p1.1,chec3
sjmp b2
chec3: jb p1.3,che