inherent addressing here the address is


Inherent addressing

  Here the address is already built in to the instruction i.e. inherent to the code
 
  ABA  ; Add A to B and store the answer in A 

Simple programs using the 68HC11 language

  This section of functions include instructions such as ALU functions, simple movement and logically operations .Let us consider the addition of two 8 bit numbers

Program One: Data is immediate
 
  LDAA #$fe  ; Load hex fe into accumulator A
  ADDA #$1  ; Add 1 hex to A i.e total = ff hex
 
Program two:  Direct addressing and extended addressing

  Assume the data is stored at the following Ram address

Address Data
501    fe     Number One
502    01    Number Two
503            Result
 
LDAA $501  ;Load fe from address 501 into A
ADDA $502  ;Add 01 from address 502 into A
STAA $503  ;Store the answer ff at address 503
 
Program three: Index addressing

  Assume the data is stored at the following Ram address

Address Data
500     fe    Number One
501    01    Number Two
502             Result
  
LDX #$500    ;Load IX with 500 base address
LDAA  $0,X    ;Load data from 500 + 0 into A i.e fe
ADDA  $1,X    ;Add data from 500+1  to A i.e ff
STAA  $2,X    ;Store A at address 500+2

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: inherent addressing here the address is
Reference No:- TGS0265188

Expected delivery within 24 Hours