Instruction Set of the Basic Computer effective address M: memory word (operand)
ID: 3806532 • Letter: I
Question
Explanation / Answer
Label Opcode operand Comments
ORG 100 /Origin of Program is HEX 100
LDA ADS /Load first address of operands
STA PTR /Store in pointer
LDA NBR /Load minus 9(no of values to be added)
STA CTR /Store in counter
CLA /Clears the Accumulator
LOP, ISZ PTR /Increment Pointer
Isz CTR /Increment Counter
LDA PTR /Load from the address location
SPA /Skip Next instruction if A is positive
BUN LOP /Unconditional Loop back if A is Negative
CLA /Clears the Accumulator
ADD PTR /Add an operand to Accumulator
STA SUM /Store the total
Isz CTR /Increment Counter
HLT
ADS, HEX 200 /First Address of operands
PTR, Hex 0 /Location reserved for a pointer
NBR, DEC -9 /Constatnt to initialized counter
CTR, HEX 0 /Location reserved for a counter
SUM, Hex 0 /Sum is stored here
ORG 200 /Origin of Operands
DEC 10 /First operand
.
.
.
.
.
.
Dec 0 /Last operand