Assembly Theory -


we're working assembly. i'm kind of lost. practice question on study guide:


using hypothetical machines (3-address, 2-address, 1-address , 0-address) , following commands:

load= puts value in address add = + mult = * sub = - lda=load in accumulator sta = loads accumulator memory push=copies stack pop=copies stack 

show each machine instructions perform following task:

f=e+(a-c) – (b*e) 

a. can explain how 4 different machine types differ in terms of code? b. can show me how 1 of 4 place start?

3-addr. (result , ops memory) mult b, b, e sub  f, a, c sub  f, f, b add  f, e, f  2-addr (shared result , 1 op) mult b, e sub  a, c load f, e add  f, sub  f, b  1-addr (accu only) lda  b mult e sta  b lda  sub  c sta  lda  e add  sub  b sta  f  0-addr (stack only) push e push push c sub add push b push e mult sub pop f 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -