annotate test/stralign.c @ 748:c2c709727221

i64 continue... basic.s assembled.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 13 Nov 2010 22:39:40 +0900
parents 528fed826f17
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
556
ef225b589888 s-dandy fix
kono
parents:
diff changeset
1
ef225b589888 s-dandy fix
kono
parents:
diff changeset
2 extern int printf(const char *,...);
ef225b589888 s-dandy fix
kono
parents:
diff changeset
3
ef225b589888 s-dandy fix
kono
parents:
diff changeset
4 #define BOOL char
ef225b589888 s-dandy fix
kono
parents:
diff changeset
5 #define TRUE 1 // TRUE value
ef225b589888 s-dandy fix
kono
parents:
diff changeset
6 #define FALSE 5 // FALSE value
ef225b589888 s-dandy fix
kono
parents:
diff changeset
7
ef225b589888 s-dandy fix
kono
parents:
diff changeset
8 typedef struct player
ef225b589888 s-dandy fix
kono
parents:
diff changeset
9 {
ef225b589888 s-dandy fix
kono
parents:
diff changeset
10 int x;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
11 int y;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
12 int ch;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
13 int point;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
14 BOOL bf;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
15 int muteki;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
16 int zanki;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
17 int ccount;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
18 }player;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
19
ef225b589888 s-dandy fix
kono
parents:
diff changeset
20 typedef struct laser
ef225b589888 s-dandy fix
kono
parents:
diff changeset
21 {
ef225b589888 s-dandy fix
kono
parents:
diff changeset
22 float x;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
23 float y;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
24 float sx;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
25 float sy;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
26 int r;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
27 int enemyno;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
28 }laser;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
29
ef225b589888 s-dandy fix
kono
parents:
diff changeset
30 typedef struct stge
ef225b589888 s-dandy fix
kono
parents:
diff changeset
31 {
ef225b589888 s-dandy fix
kono
parents:
diff changeset
32 int stg;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
33 }stge;
ef225b589888 s-dandy fix
kono
parents:
diff changeset
34
ef225b589888 s-dandy fix
kono
parents:
diff changeset
35
ef225b589888 s-dandy fix
kono
parents:
diff changeset
36 player jiki={60,200,3,0,FALSE,120,3,3};
ef225b589888 s-dandy fix
kono
parents:
diff changeset
37 /*
ef225b589888 s-dandy fix
kono
parents:
diff changeset
38 .word 60
ef225b589888 s-dandy fix
kono
parents:
diff changeset
39 .word 200
ef225b589888 s-dandy fix
kono
parents:
diff changeset
40 .word 3
ef225b589888 s-dandy fix
kono
parents:
diff changeset
41 .word 0
ef225b589888 s-dandy fix
kono
parents:
diff changeset
42 .byte 0
ef225b589888 s-dandy fix
kono
parents:
diff changeset
43 .space 3
ef225b589888 s-dandy fix
kono
parents:
diff changeset
44 .word 120
ef225b589888 s-dandy fix
kono
parents:
diff changeset
45 .word 3
ef225b589888 s-dandy fix
kono
parents:
diff changeset
46 .word 3
ef225b589888 s-dandy fix
kono
parents:
diff changeset
47 .globl lg
ef225b589888 s-dandy fix
kono
parents:
diff changeset
48 .align 2
ef225b589888 s-dandy fix
kono
parents:
diff changeset
49 .type lg,@object
ef225b589888 s-dandy fix
kono
parents:
diff changeset
50 .size lg,4
ef225b589888 s-dandy fix
kono
parents:
diff changeset
51
ef225b589888 s-dandy fix
kono
parents:
diff changeset
52 */
ef225b589888 s-dandy fix
kono
parents:
diff changeset
53
ef225b589888 s-dandy fix
kono
parents:
diff changeset
54 stge lg={4096};
ef225b589888 s-dandy fix
kono
parents:
diff changeset
55
ef225b589888 s-dandy fix
kono
parents:
diff changeset
56 /*
ef225b589888 s-dandy fix
kono
parents:
diff changeset
57 .word 4096
ef225b589888 s-dandy fix
kono
parents:
diff changeset
58 .globl pg
ef225b589888 s-dandy fix
kono
parents:
diff changeset
59 .align 2
ef225b589888 s-dandy fix
kono
parents:
diff changeset
60 .type pg,@object
ef225b589888 s-dandy fix
kono
parents:
diff changeset
61 .size pg,4
ef225b589888 s-dandy fix
kono
parents:
diff changeset
62 */
ef225b589888 s-dandy fix
kono
parents:
diff changeset
63
ef225b589888 s-dandy fix
kono
parents:
diff changeset
64 laser laser_lv3[64]={{0,0,0,0,64,0}};
ef225b589888 s-dandy fix
kono
parents:
diff changeset
65 /*
ef225b589888 s-dandy fix
kono
parents:
diff changeset
66 .word 0x00000000 # 0 (float)
ef225b589888 s-dandy fix
kono
parents:
diff changeset
67 .word 0x00000000 # 0 (float)
ef225b589888 s-dandy fix
kono
parents:
diff changeset
68 .word 0x00000000 # 0 (float)
ef225b589888 s-dandy fix
kono
parents:
diff changeset
69 .word 0x00000000 # 0 (float)
ef225b589888 s-dandy fix
kono
parents:
diff changeset
70 .word 64
ef225b589888 s-dandy fix
kono
parents:
diff changeset
71 .word 0
ef225b589888 s-dandy fix
kono
parents:
diff changeset
72 .space 1512
ef225b589888 s-dandy fix
kono
parents:
diff changeset
73 */
ef225b589888 s-dandy fix
kono
parents:
diff changeset
74 int se_key[6]={-1,-1,-1,-1,-1,-1};
ef225b589888 s-dandy fix
kono
parents:
diff changeset
75 /*
ef225b589888 s-dandy fix
kono
parents:
diff changeset
76 .word -1
ef225b589888 s-dandy fix
kono
parents:
diff changeset
77 .word -1
ef225b589888 s-dandy fix
kono
parents:
diff changeset
78 .word -1
ef225b589888 s-dandy fix
kono
parents:
diff changeset
79 .word -1
ef225b589888 s-dandy fix
kono
parents:
diff changeset
80 .word -1
ef225b589888 s-dandy fix
kono
parents:
diff changeset
81 .word -1
ef225b589888 s-dandy fix
kono
parents:
diff changeset
82 .text
ef225b589888 s-dandy fix
kono
parents:
diff changeset
83 */
ef225b589888 s-dandy fix
kono
parents:
diff changeset
84
ef225b589888 s-dandy fix
kono
parents:
diff changeset
85
ef225b589888 s-dandy fix
kono
parents:
diff changeset
86 int
ef225b589888 s-dandy fix
kono
parents:
diff changeset
87 main()
ef225b589888 s-dandy fix
kono
parents:
diff changeset
88 {
ef225b589888 s-dandy fix
kono
parents:
diff changeset
89
558
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
90 printf("#0089:%d\n", jiki. x);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
91 printf("#0090:%d\n", jiki. y);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
92 printf("#0091:%d\n", jiki. ch);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
93 printf("#0092:%d\n", jiki. point);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
94 printf("#0093:%d\n", jiki. bf);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
95 printf("#0094:%d\n", jiki. muteki);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
96 printf("#0095:%d\n", jiki. zanki);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
97 printf("#0096:%d\n", jiki. ccount);
556
ef225b589888 s-dandy fix
kono
parents:
diff changeset
98
558
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
99 printf("#0098:%g\n", laser_lv3[0].x);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
100 printf("#0099:%g\n", laser_lv3[0].y);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
101 printf("#0100:%g\n", laser_lv3[0].sx);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
102 printf("#0101:%g\n", laser_lv3[0].sy);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
103 printf("#0102:%d\n", laser_lv3[0].r);
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
104 printf("#0103:%d\n", laser_lv3[0].enemyno);
556
ef225b589888 s-dandy fix
kono
parents:
diff changeset
105
558
528fed826f17 const value switch statement prune.
kono
parents: 556
diff changeset
106 printf("#0105:%d\n", lg.stg);
556
ef225b589888 s-dandy fix
kono
parents:
diff changeset
107
ef225b589888 s-dandy fix
kono
parents:
diff changeset
108
ef225b589888 s-dandy fix
kono
parents:
diff changeset
109
ef225b589888 s-dandy fix
kono
parents:
diff changeset
110 }