C++
- voluntas
- @ignis_fatuus
- ブン
- @Linda_pp
- 清楚なC++メイドBOT
- @tzik_tack
- 長谷川一輝
- wraith13
- @jj1bdx
- @cpp_akira
- 安藤敏彦
- @srz_zumix
- Siv3D
- takezoh
- まろ
- @okdshin
- @hnokx
- @ishidakei
- @take_cheeze
- TAKEI Yuya
- @mumumu
- I (@wx257osn2)
- Tommy6
- @tyottyoworks
- ___shanon
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
- むてら
- ガチKGB
- 三重野賢人
x
19
1
2
3
struct a {
4
int mem[1];
5
};
6
7
int main(void) {
8
int PC = 0;
9
a memory = {{0x01AA0B}};
10
11
int insval = memory.mem[PC];
12
int ins = (insval >> 16) & 0xff;
13
int arg1 = (insval >> 8) & 0xff;
14
int arg2 = (insval) & 0xff;
15
16
std::cout << ins << '\n';
17
18
}
19
$ g++ prog.cc -Wall -Wextra -std=c++98 -pedantic
Start
prog.cc: In function 'int main()': prog.cc:13:13: warning: unused variable 'arg1' [-Wunused-variable] 13 | int arg1 = (insval >> 8) & 0xff; | ^~~~ prog.cc:14:13: warning: unused variable 'arg2' [-Wunused-variable] 14 | int arg2 = (insval) & 0xff; | ^~~~
1
0
Finish