1*2 + 3*4 + 5*6 + ...... up to 10 terms in the Basic Computer

XYZ, LDA T2
CMA
INC
STA T3
CLA
ABC, ADD T1
ISZ T3
BUN ABC
ADD SUM
STA SUM
BSA PQR
ISZ CTR
BUN XYZ
HLT

PQR, HEX 0
LDA T1
INC
INC
STA T1
LDA T2
INC
INC
STA T2
BUN PQR I

T1, DEC 1
T2, DEC 2
T3, DEC 0
SUM, DEC 0
CTR, DEC -10
END

No comments:

Post a Comment