Hello world/Line printer: Difference between revisions
m
Small change to code in alternative EDSAC version
(Added alternative solution for EDSAC.) |
m (Small change to code in alternative EDSAC version) |
||
Line 429:
The EDSAC PC simulator allows .F for null and *F for letter shift, but it seems from WWG that on the original EDSAC these had to be input as K4096F and K2048F respectively.
<lang edsac>
[Alternative "Hello World" for Rosetta Code
[Subroutine to print a string.]
[Modified 2022-07-13: A order for first character was formerly passed in 0F.]
[4] AF
[5] T6@
[6] AF
[
G5@ [loop back, because top 5 bits = A = 11100]
[16] TF [clear acc on exit (EDSAC convention)]
[17] ZF [(planted) jump back to caller]
[18] U3F [constant for making return link]
[19] U1F [constant for picking up parameter]
[20] K2048F [constant for testing final null]
[Main routine]
T96K GK [load at 96
[0]
[4] K2048F HF EF
[The above string is: letter shift, 'HELLO WORLD', CR, LF, null]
[end]
</lang>
|