Q. Write an assembly program for Basic Computer (designed by M. Morris Mano) to add two numbers located at 100H and 200H. Then, store the result in 300H if the result is positive, else store in 400H.
LDA 100H /AC<-M[100H]
ADD 200H /AC<-AC+M[200H]
SNA /skip if AC -ve
STA 300H /M[300H]<-AC
SPA /skip if AC +ve
STA 400H /M[400H]<-AC
HLT /stop i.e. S<-0
Later, we will discuss using labels.
No comments:
Post a Comment