34 lines
552 B
Plaintext
34 lines
552 B
Plaintext
[ A plus B
|
|
========
|
|
|
|
A program for the EDSAC
|
|
|
|
Adds two integers & displays
|
|
the sum at the top of storage
|
|
tank 3
|
|
|
|
Works with Initial Orders 2 ]
|
|
|
|
[ Set load point & base address ]
|
|
|
|
T56K [ Load at address 56 ]
|
|
GK [ Base addr (theta) here ]
|
|
|
|
[ Orders ]
|
|
|
|
T96F [ Clear accumulator ]
|
|
A5@ [ Acc += C(theta + 5) ]
|
|
A6@ [ Acc += C(theta + 6) ]
|
|
T96F [ C(96) = Acc; Acc = 0 ]
|
|
|
|
ZF [ Halt ]
|
|
|
|
[ Pseudo-orders (data) ]
|
|
|
|
P18D [ 5@: 18*2 + 1 = 37 ]
|
|
P14F [ 6@: 14*2 + 0 = 28 ]
|
|
|
|
[ When loading is finished: ]
|
|
|
|
EZPF [ Branch to load point ]
|