5%ͷ໋ྩηοτ
໋ྩ
ʢχʔϞχοΫʣ
ಈ࡞
0QDPEF
ʢਐʣ
0QDPEF
ʢਐʣ
"%%"
*N "Ϩδελʹ*NΛ͢ C Y
.07"
# #ϨδελͷΛ"Ϩδελʹసૹ͢Δ C Y
*/" *0ϙʔτ͔Β"ϨδελʹΛಡΈࠐΉ C Y
.07"
*N "Ϩδελʹ*NͷΛసૹ͢Δ C Y
+.1*N *Nʹδϟϯϓ͢Δ C YG
Slide 89
Slide 89 text
5%ͷ໋ྩηοτ
໋ྩ
ʢχʔϞχοΫʣ
ಈ࡞
0QDPEF
ʢਐʣ
0QDPEF
ʢਐʣ
"%%"
*N "Ϩδελʹ*NΛ͢ C Y
.07"
# #ϨδελͷΛ"Ϩδελʹసૹ͢Δ C Y
*/" *0ϙʔτ͔Β"ϨδελʹΛಡΈࠐΉ C Y
.07"
*N "Ϩδελʹ*NͷΛసૹ͢Δ C Y
+.1*N *Nʹδϟϯϓ͢Δ C YG
શ໋ྩ
public function executeInstruction()
{
$byte = $this->ram[$this->pc];
Slide 125
Slide 125 text
public function executeInstruction()
{
$byte = $this->ram[$this->pc];
1$ϓϩάϥϜΧϯλ
Slide 126
Slide 126 text
public function executeInstruction()
{
$byte = $this->ram[$this->pc];
1$ϓϩάϥϜΧϯλ
࣮ߦதͷΞυϨε
Slide 127
Slide 127 text
public function executeInstruction()
{
$byte = $this->ram[$this->pc];
Slide 128
Slide 128 text
public function executeInstruction()
{
$byte = $this->ram[$this->pc];
0QDPEF
*Nʢ0QFSBOE
Slide 129
Slide 129 text
$opcode = $byte >> 4;
$im = $byte & 0b00001111;
public function executeInstruction()
{
$byte = $this->ram[$this->pc];
0QDPEF
*Nʢ0QFSBOE
Slide 130
Slide 130 text
$opcode = $byte >> 4;
$im = $byte & 0b00001111;
public function executeInstruction()
{
$byte = $this->ram[$this->pc];
Slide 131
Slide 131 text
$opcode = $byte >> 4;
$im = $byte & 0b00001111;
public function executeInstruction()
{
switch ($opcode){
case 0b0000:
// ADD A, Im
$this->a += $im;
break;
}
$byte = $this->ram[$this->pc];
Slide 132
Slide 132 text
$opcode = $byte >> 4;
$im = $byte & 0b00001111;
public function executeInstruction()
{
switch ($opcode){
case 0b0000:
// ADD A, Im
$this->a += $im;
break;
}
$byte = $this->ram[$this->pc];
case 0b0001:
Slide 133
Slide 133 text
$opcode = $byte >> 4;
$im = $byte & 0b00001111;
public function executeInstruction()
{
switch ($opcode){
case 0b0000:
// ADD A, Im
$this->a += $im;
break;
}
$this->pc++;
}
$byte = $this->ram[$this->pc];
case 0b0001:
Slide 134
Slide 134 text
ϝϞϦͷ࣮
໋ྩͷ࣮
*0ͷ࣮
Slide 135
Slide 135 text
case 0b0110:
// IN B
$this->b = $this->in;
break;
Slide 136
Slide 136 text
case 0b0110:
// IN B
$this->b = $this->in;
break;
case 0b1001:
// OUT B
$this->out = $this->b;
break;
Slide 137
Slide 137 text
case 0b0110:
// IN B
$this->b = $this->in;
break;
case 0b1001:
// OUT B
$this->out = $this->b;
break;
case 0b1011:
// OUT Im
$this->out = $operand;
break;