within micro controllers software it is very


 Within micro controller's software, it is very useful to be able to manipulate binary bits i.e. from ports etc. The ALU has command to shift data, rotate data, compare data, set/clear bits, test bits and logical operate on data.

  LSLA     i.e shift A one place to the left fill up with 0
  LSLB     i.e shift B one place to the left fill up with 0
  LSRA     i.e shift A one place to the right fill up with 0
  LSRB     i.e shift B one place to the right fill up with 0
  ROLA     i.e rotate A one place to the left through carry
  ROLB     i.e rotate B one place to the left through carry
  RORA     i.e rotate A one place to the right through carry
  RORB     i.e rotate B one place to the right through carry
   CBA      i.e  A-B  with no answer stored just flags set
  CMPA    i.e compare A with memory i.e A-M
  CMPB    i.e compare B with memory i.e B-M
  BSET $20,#$1   i.e set bit 1 of memory address 20
  BCLR $20,#$1   i.e clear bit 1 of memory address 20
  BITA $20    i.e Check bit mask found in A with address 20
  BITB $20    i.e Check bit mask found in A with address 20
  ANDA $20   i.e logical and A with data at address 20
  EXORA $20  i.e logical exor A with data at address 20
  COM $20     i.e logical invert data at address 20 
  ORRA $20    i.e logical OR A with data at address 20
  MUL           ;Multiplies axb and stores the answer in D i.e both
  FDIV          ;Fractional divide using D/IX
  IDIV           ;Integer divide using D/IX
  ADDD         ;16 bit add to D
  DAA           ;Decimal adjust add sum to BCD data

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: within micro controllers software it is very
Reference No:- TGS0414729

Expected delivery within 24 Hours