Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
50
Task/Loops-For/EDSAC-order-code/loops-for.edsac
Normal file
50
Task/Loops-For/EDSAC-order-code/loops-for.edsac
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
[ Loops
|
||||
=====
|
||||
|
||||
A program for the EDSAC
|
||||
|
||||
Demonstrates nested loops
|
||||
and printer output
|
||||
|
||||
Works with Initial Orders 2 ]
|
||||
|
||||
|
||||
|
||||
T56K [ set load point ]
|
||||
GK [ set theta ]
|
||||
|
||||
O21@ [ figure shift ]
|
||||
|
||||
[ 1 ] T24@ [ a = 0 ]
|
||||
A19@ [ a = i ]
|
||||
|
||||
[ 3 ] T20@ [ j = a; a = 0 ]
|
||||
O22@ [ write character ]
|
||||
A20@ [ a = j ]
|
||||
S17@ [ a -= 1 ]
|
||||
U20@ [ j = a ]
|
||||
E3@ [ if a>=0 go to 3 ]
|
||||
|
||||
O23@ [ write line feed ]
|
||||
T24@ [ a = 0 ]
|
||||
A19@ [ a = i ]
|
||||
A17@ [ a += 1 ]
|
||||
U19@ [ i = a ]
|
||||
S18@ [ a -= 5 ]
|
||||
G1@ [ if a<0 go to 1 ]
|
||||
|
||||
ZF [ halt ]
|
||||
|
||||
[ 17 ] P0D [ const: 1 ]
|
||||
[ 18 ] P2D [ const: 5 ]
|
||||
|
||||
[ 19 ] P0F [ var: i ]
|
||||
[ 20 ] P0F [ var: j ]
|
||||
|
||||
[ 21 ] #F [ figure shift ]
|
||||
[ 22 ] ZF [ '+' character ]
|
||||
[ 23 ] &F [ line feed ]
|
||||
|
||||
[ 24 ] P0F [ used to clear a ]
|
||||
|
||||
EZPF [ begin execution ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue