CS 273

Homework 3 Solution

Show all your work. If you do not show your work, you get no credit.

From the Book

from page 109-110

from page 143-144


Not From The Book

Assembly of program (30 points)

Address Contents  Assembly   
     org $0030
0030    temp rmb 1

   .
   .
   .
   

AddressContents  Assembly    PCAB RAM AddressRAM Value
     org$f800  f800??  
f80086   start LDAA    f801??  
f801 24       #$24   f80224?  
f802 c6    LDAB    f80324?  
f803 12      #$12   f8042412  
f804 d7    STAB    f8052412  
f805 30      temp   f806 24 12 $0030 $12
f806 16    TAB     f807 24 24    
f807 96    LDAA     f808 24 24   
f808 30      temp   f809 12 24    

   .
   .
   .
   

AddressContents  Assembly  
     org$fffe
fffef8    fdb  
ffff00      start

Disassembly of program (20 points)

Address Contents  Assembly   
     org $0012
0012    workstor rmb 1

   .
   .
   .
   

AddressContents  Assembly    PCABCCR (N Z V C) RAM AddressRAM Value
     org$f800  f800???  
f80086   start LDAA    f801???  
f8010c      #$0c   f8020c?0 0 0 -  
f802f6    LDAB    f8030c??  
f803f9        f8040c??  
f80400      tempval   f8050c120 0 0 -  
f8051b   ABA   f8061e120 0 0 0  
f806d7    STAB    f8071e12?  
f80712      workstor  f8081e120 0 0 -$0012$12

   .
   .
   .
   

AddressContents  Assembly  
     org$f900
f90012  tempval fcb$12

   .
   .
   .
   

AddressContents  Assembly  
     org$fffe
fffef8    fdb  
ffff00      start


Last modified: Mon Oct 8 23:13:49 MST 2001