When you are writing a program for a specific coomputer or a specific group of computers that are of the same make. An example could be for a super computer where the computer will be programed to do a unique job and therefor will be one of a kind. Also as it is coded in machine code, the program will run alot quicker as it does not need to be decoded.
Why do assembly language instructions written for one type of machine not run in another?
Because the instructions will be written for the specific processor installed which may not be the same in any other computer. The registers will be named differnetly and will therefor not run properly
What is the purpose of the following part of a typical assembly language instruction?:
Why are different modes of addressing encountered when programming in assembly language? Explain what is meant by immediate, direct, indirect and indexed addressing.
So that you can load different registers into the ALU for example and do different things with them.
Immediate Addressing where the data appears immediatly after the operation code
Direct Addressing where the address is referring to a specific location
Indirect Addressing The use on a number inside the register as a memory location.
Indexed Addressing where the number in one address is used in combination with an other address to get the memory location.
An assembly language instruction set may be broken down into subsets like logical and arithmetical and control. Show how 2 simple one-byte integer binary numbers may be added together.
| op code | operands |
| add | al, bx |
Explain how a mask may be used to prevent alteration of top(most significant) three bits and the bottom (least significant) two bits but set the rest of the bits in the register to 1
Not sure how to do this question. Ideas are that you must use the AND and OR op codes but i don't know how.

No comments:
Post a Comment