]>
git.gir.st - Chiptunes-pms150c.git/blob - bsv.c
3 typedef unsigned char u8
;
12 0x84, 0x9d, 0xb0, 0x69, 0x9d, 0x84, 0x69, 0x58,
13 0x75, 0x8c, 0xb0, 0x69, 0x8c, 0x75, 0x69, 0x58
18 acc
= (mod3hi
<<8|mod3lo
) % 3;
22 u8 notes_ix
= acc
& 0x7;
25 u8 result
= ((i1
<<8|i0
)*notes
[notes_ix
])>>8; // keep hi byte
33 MOV (acc
, i2
)// "mov mem,mem"
34 MOV (n
, acc
)// does not exist
54 MOV (tmp_1
, acc
) // fresh tmp_1:
59 OR (acc
, tmp_1
) // tmp_1 done.
75 MOV (tmp_1
, acc
) // acc saved in tmp_1; fresh acc
77 // shift-divide by six
78 // note: i2 is max 0x78; so acc will <= 20. (breaks vor values >=128)
91 AND (acc
, tmp_1
) // acc restored from tmp_1
97 { u8 tmp3
= ((i2
<<6|i1
>>2)&0x1fff)%3;
102 MOV (tmp_1
, acc
) // acc saved in tmp_1; fresh acc
104 // shift-divide by ten
105 // note: i2 is max 0x78; so acc will <= 12.
118 AND (acc
, tmp_1
) // acc restored from tmp_1
127 i1
+= !i0
; // ADDC i1
128 i2
+= !i1
&& !i0
; // ADDC i2