git://git.gir.st
/
Chiptunes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5dd8b8f
)
new version
author
Tobias Girstmair
<t@thi3nkpad.lan>
Mon, 12 Nov 2018 23:33:29 +0000
(
00:33
+0100)
committer
Tobias Girstmair
<t@thi3nkpad.lan>
Mon, 12 Nov 2018 23:33:29 +0000
(
00:33
+0100)
foo.c
patch
|
blob
|
blame
|
history
diff --git
a/foo.c
b/foo.c
index 5d719d875674b3484d0535b434c3455726f5b027..4a2e042087b5d3430c437b294d4da16adec89239 100644
(file)
--- a/
foo.c
+++ b/
foo.c
@@
-6,13
+6,17
@@
u8 data[] = {
0x84, 0x9d, 0xb0, 0x69, 0x9d, 0x84, 0x69, 0x58,
0x75, 0x8c, 0xb0, 0x69, 0x8c, 0x75, 0x69, 0x58
};
+u8 i0;
+u8 i1;
+u8 i2;
+u8 i3;
u8 x;
u8 t;
u8 o;
u8 g(int i) {
u8 tmp;
ANDI (t, 0x07)
- tmp = i
>> 16
;
+ tmp = i
2
;
ANDI (tmp, 3)
TST (tmp)
BREQ (skip)
@@
-59,7
+63,11
@@
int main(void) {
LDI (o, 9)
acc += g(i);
- i++;
putchar(acc<<4);
+ i++;
+ i0 = i;
+ i1 = i>>8;
+ i2 = i>>16;
+ i3 = i>>24;
}
}