回答編集履歴
2
一部修正
test
CHANGED
@@ -70,6 +70,8 @@
|
|
70
70
|
|
71
71
|
al = GPR8(1)
|
72
72
|
|
73
|
+
al = GPR8(1)
|
74
|
+
|
73
75
|
print(al)
|
74
76
|
|
75
77
|
#00000001
|
@@ -100,4 +102,14 @@
|
|
100
102
|
|
101
103
|
#11111000
|
102
104
|
|
105
|
+
print(al) # alそのものは変更されていない(Pythonの演算子と同じ考え)
|
106
|
+
|
107
|
+
#10000011
|
108
|
+
|
109
|
+
al >>= 4 # alそのものを変更するシフト演算子も記述可能
|
110
|
+
|
111
|
+
print(al)
|
112
|
+
|
113
|
+
#11111000
|
114
|
+
|
103
115
|
```
|
1
例の修正
test
CHANGED
@@ -68,27 +68,35 @@
|
|
68
68
|
|
69
69
|
|
70
70
|
|
71
|
-
|
71
|
+
al = GPR8(1)
|
72
|
+
|
73
|
+
print(al)
|
72
74
|
|
73
75
|
#00000001
|
74
76
|
|
75
|
-
|
77
|
+
al = GPR8(-1)
|
78
|
+
|
79
|
+
print(al)
|
76
80
|
|
77
81
|
#11111111
|
78
82
|
|
79
|
-
|
83
|
+
al = GPR8(100)
|
84
|
+
|
85
|
+
print(al)
|
80
86
|
|
81
87
|
#01100100
|
82
88
|
|
83
|
-
print(
|
89
|
+
print(al >> 2)
|
84
90
|
|
85
91
|
#00011001
|
86
92
|
|
87
|
-
|
93
|
+
al = GPR8(0x83)
|
94
|
+
|
95
|
+
print(al)
|
88
96
|
|
89
97
|
#10000011
|
90
98
|
|
91
|
-
print(
|
99
|
+
print(al >> 4)
|
92
100
|
|
93
101
|
#11111000
|
94
102
|
|