Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,41 @@
|
|||
[ N and a half times loop
|
||||
=======================
|
||||
|
||||
A program for the EDSAC
|
||||
|
||||
Works with Initial Orders 2 ]
|
||||
|
||||
T56K
|
||||
GK
|
||||
|
||||
O16@
|
||||
[ 1 ] T24@
|
||||
A25@
|
||||
A18@
|
||||
U25@
|
||||
S23@
|
||||
E11@
|
||||
|
||||
O25@
|
||||
O19@
|
||||
O20@
|
||||
G1@
|
||||
|
||||
[ 11 ] O18@
|
||||
O17@
|
||||
O21@
|
||||
O22@
|
||||
ZF
|
||||
|
||||
[ 16 ] #F
|
||||
[ 17 ] PF
|
||||
[ 18 ] QF
|
||||
[ 19 ] NF
|
||||
[ 20 ] !F
|
||||
[ 21 ] @F
|
||||
[ 22 ] &F
|
||||
[ 23 ] JF
|
||||
[ 24 ] PF
|
||||
[ 25 ] PF
|
||||
|
||||
EZPF
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
[Loop-and-a-half for Rosetta Code.
|
||||
EDSAC program, Initial Orders 2.]
|
||||
T64K [load at location 64 (arbitrary choice)]
|
||||
GK [set @ (theta) parameter]
|
||||
[Constants]
|
||||
[0] OF [digit 9]
|
||||
[1] JF [to inc digit after subtracting 9]
|
||||
[2] #F [figures mode]
|
||||
[3] !F [space]
|
||||
[4] NF [comma (in figures mode)]
|
||||
[5] @F [carriage return]
|
||||
[6] &F [line feed]
|
||||
[Variable]
|
||||
[7] PF [current digit]
|
||||
|
||||
[First subroutine to print digits 0..9]
|
||||
[8] A3F T20@ [plant return link as usual]
|
||||
T7@ [digit := 0]
|
||||
[11] O7@ [loop: print digit]
|
||||
A7@ S@ [is digit 9?]
|
||||
E20@ [if so, jump to exit]
|
||||
O4@ O3@ [print comma and space]
|
||||
A1@ [inc digit in acc]
|
||||
T7@ [update digit in store]
|
||||
E11@ [always loop back]
|
||||
[20] ZF [(planted) return to caller with acc = 0]
|
||||
|
||||
[Second subroutine to print digits 0..9
|
||||
Instead of saying "print a comma after each digit except the last"
|
||||
it says "print a comma before each digit except the first".]
|
||||
[21] A3F T33@ [plant return link as usual]
|
||||
T7@ [digit := 0]
|
||||
E29@ [jump into middle of loop]
|
||||
[25] A1@ [loop: inc digit in acc]
|
||||
T7@ [update digit in store]
|
||||
O4@ O3@ [print comma and space]
|
||||
[29] O7@ [print digit]
|
||||
A7@ S@ [is digit 9?]
|
||||
G25@ [if not, loop back]
|
||||
[33] ZF [(planted) return to caller with acc = 0]
|
||||
|
||||
[Enter with acc = 0]
|
||||
[34] O2@ [set teleprinter to figures]
|
||||
A35@ G8@ [call first subroutine]
|
||||
O5@ O6@ [print CR, LF]
|
||||
A39@ G21@ [call second subroutine]
|
||||
O5@ O6@ [print CR, LF]
|
||||
O2@ [print dummy character to flush teleprinter buffer]
|
||||
ZF [stop]
|
||||
E34Z [define entry point]
|
||||
PF [value of acc on entry (here = 0)]
|
||||
[end]
|
||||
Loading…
Add table
Add a link
Reference in a new issue