I got an imaginary ISA like this:
• Use the command format with two addresses.
• All operations take place between a single general-purpose register and a storage location.
• There are 8 general purpose registers and register specifiers are 3 bits long.
and have to accept as follows:
• The opcode is 1 byte (8 bits).
• All memory addresses are 4 bytes (32 bits).
• All data operands are 8 bytes (64 bits).
• All instructions have an integer number of bytes.
I have no problem with the code, but I don't know how to calculate the instructions retrieved and the memory data bytes transferred. Based on my research, I have found a few ways that are somewhat confusing. How do I find them from this code, for example?
Mov EAX,B ; EAX<- B Add EAX, C ; EAX <- EAX + C Mov A, EAX ; A<- EAX