Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loc_0x22B5: mov [0x14FB],A
- cmp A,0xFF ;if(A == 0xFF)
- jz loc_0x229D ; goto loc_0x229D
- mov L,0x02
- mul L,A ;HL = 2 * A
- mov A,[0x1505] ;A = *(int*)0x1505
- mov X,A
- mov X,0x93F6
- add X,HL
- mov BA,[X] ;BA = *(int*)(0x93F6 + HL)
- mov [0x14FD],BA ;*((int*) 0x14FD) = BA;
- mov A,0x00 ;A = 0x00
- mov [0x14FA],A ;*((int*) 0x14FA) = A;
- mov [0x14FC],A ;*((int*) 0x14FC) = A;
- loc_0x22DB: mov A,[0x14FC] ;A = *(int*)0x14FC
- cmp A,0x00 ;if(A != 0x00)
- jnzw loc_0x232F ; goto loc_0x232F
- and TMR3_CTRL_L,0xFB ;TMR3_CTRL_L &= ~TMR3_CTRL_ENABLE
- mov A,[0x14FB] ;A = *(int*)0x14FB
- cmp A,0xFF ;if(A == 0xFF)
- jz loc_0x22AF ; goto loc_0x22AF
- mov A,[0x1505] ;A = *(int*)0x1505
- loc_0x22F3: mov X,A ;X = A
- mov X,[0x14FD] ;X = *(int*)0x14FD
- mov A,[X] ;A = *(int*)X
- cmp A,0xFF ;if(A == 0xFF)
- jz loc_0x233B ; goto loc_0x233B
- and A,[0x1508] ;A &= *(int*)0x1508
- mov B,AUD_VOL
- and B,0xFC ;B = AUD_VOL % 4
- add A,B ;A += B
- mov AUD_VOL,A ;AUD_VOL = A
- add X,0x0001 ;X++
- mov A,[X] ;A = *(int*)X
- dec A ;A--
- mov [0x14FC],A ;*((int*) 0x14FC) = A
- add X,0x0001 ;X++
- mov BA,[X] ;BA = *(int*)X
- mov TMR3_PRE_L,A ;TMR3_PRE_L = A
- mov TMR3_PRE_H,B ;TMR3_PRE_H = B
- add X,0x0002 ;X += 0x0002
- mov BA,[X] ;BA = *(int*)X
- mov TMR3_PVT_L,A ;TMR3_PVT_L = A
- mov TMR3_PVT_H,B ;TMR3_PVT_H = B
- add X,0x0002 ;X += 0x0002
- mov [0x14FD],X ;*((int*) 0x14FD) = X;
- or TMR3_CTRL_L,0x06 ;TMR3_CTRL_L |= TMR3_CTRL_ENABLE
- jmpw loc_0x227D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement