Professional Documents
Culture Documents
4.instructions & Instructions Sequencing
4.instructions & Instructions Sequencing
Data transfer between memory and processor register Arithmetic and logic operation Program sequencing and control I/O transfer
Contents of location is indicated by using square brackets [ ] RHS of RTN always denotes a values, and is called Source LHS of RTN always denotes a symbolic name where value is to be stored and is called destination
R2
[LOCN]
R4 [R3] +[R2] This type of notation is called Register transfer notation (RTN)
Examples of ALN
1. MOVE LOCN, R2 2. ADD R3, R2, R4 LOCN ->content are UNCHANGED R2->Overwritten
ADD A,B
B<-[A] + [B]
Disadvantage: Single two address instruction cannot be used to solve our original problem bcoz destination is overwritten
Eg -2: Load D (load content of memory location D into accumulator) ADD E (accumulator + content of memory location E into accumulator) STORE F; (from accumulator into memory location F)
Eg 2:
Move A, Ri Move B, Rj
Location of all operands are defined implicitly Operands are stored in a structure called pushdown stack
ASSIGNMENT
MOVE A,R0 MOVE B,R1 ADD R0,R1 MOVE C,D ADD R1,D Here only A,B,C, values are preserved using two address instruction