Assembly Program for Basic Computer :: Input and Output

Q. Write an assembly program for Basic Computer (designed by M. Morris Mano) to input and display two numbers.

CTR, DEC -2        /counter for two numbers
LP1, SKI        /skip (i.e. PC<-PC+1) if FGI=1
BUN LP1
INP
LP2, SKO        /skip (i.e. PC<-PC+1) if FGO=1
BUN LP2
OUT
ISZ CTR        /increment CTR and skip if CTR=0
BUN LP1

No comments:

Post a Comment