Skip to main content
cpu tag
Link
hippietrail
  • 7.9k
  • 2
  • 23
  • 72

Let's say you have a hypothetical 8-bit processing machine with 256 bytes of memory. You want to load the value stored in memory location $f2 into a register. 

However, with a data bus of just 8 bits, you can't use all of the memory unless you want to have no room left for an opcode. And having more than one operand would be impossible. 

There are 2two solutions to this dillemadilemma. The first solution is to increase the width of each memory location to 12 or 16 bits to have room for an opcode. 

The second option is what most computers use,: multi-byte instructions. For example, aan LDA instruction might have the opcode onin one byte but haveand the operand on a different byte following the first. However, this seems much more confusing to me. You have to fetch another byte while storing the first, which seems frankly impossible to me. 

So how do computers execute multi-byte instructions, and what are the microinstructions for such a herculeanHerculean task?

Let's say you have a hypothetical 8-bit processing machine with 256 bytes of memory. You want to load the value stored in memory location $f2 into a register. However, with a data bus of just 8 bits, you can't use all of the memory unless you want to have no room left for an opcode. And having more than one operand would be impossible. There are 2 solutions to this dillema. The first solution is to increase the width of each memory location to 12 or 16 bits to have room for an opcode. The second option is what most computers use, multi-byte instructions. For example, a LDA instruction might have the opcode on one byte but have the operand on a different byte following the first. However, this seems much more confusing to me. You have to fetch another byte while storing the first, which seems frankly impossible to me. So how do computers execute multi-byte instructions, and what are the microinstructions for such a herculean task?

Let's say you have a hypothetical 8-bit processing machine with 256 bytes of memory. You want to load the value stored in memory location $f2 into a register. 

However, with a data bus of just 8 bits, you can't use all of the memory unless you want to have no room left for an opcode. And having more than one operand would be impossible. 

There are two solutions to this dilemma. The first solution is to increase the width of each memory location to 12 or 16 bits to have room for an opcode. 

The second is what most computers use: multi-byte instructions. For example, an LDA instruction might have the opcode in one byte and the operand on a different byte following the first. However, this seems much more confusing to me. You have to fetch another byte while storing the first, which seems frankly impossible to me. 

So how do computers execute multi-byte instructions and what are the microinstructions for such a Herculean task?

Source Link
Nip Dip
  • 341
  • 1
  • 11

How do multi-byte instructions work?

Let's say you have a hypothetical 8-bit processing machine with 256 bytes of memory. You want to load the value stored in memory location $f2 into a register. However, with a data bus of just 8 bits, you can't use all of the memory unless you want to have no room left for an opcode. And having more than one operand would be impossible. There are 2 solutions to this dillema. The first solution is to increase the width of each memory location to 12 or 16 bits to have room for an opcode. The second option is what most computers use, multi-byte instructions. For example, a LDA instruction might have the opcode on one byte but have the operand on a different byte following the first. However, this seems much more confusing to me. You have to fetch another byte while storing the first, which seems frankly impossible to me. So how do computers execute multi-byte instructions, and what are the microinstructions for such a herculean task?