Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
EDSAC
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Programming technique=== [[File:EDSAC (23).jpg|thumb|EDSAC monitoring desk<ref>Description of three displays (counter, memory and sequence control): {{cite news |title=Two new EDSAC videos: EDSAC's VDU screens |url=http://www.tnmoc.org/news/edsac/two-new-edsac-videos |work=The National Museum of Computing |date=11 December 2015 |language=en}}</ref>]] The early programmers had to make use of techniques frowned upon todayβin particular, the use of [[self-modifying code]]. As there was no index register until much later, the only way of accessing an array was to alter which memory location a particular instruction was referencing. [[David Wheeler (computer scientist)|David Wheeler]], who earned the world's first Computer Science PhD working on the project, is credited with inventing the concept of a subroutine. Users wrote programs that called a routine by jumping to the start of the subroutine with the [[Return statement|return address]] (i.e. the location-plus-one of the jump itself) in the accumulator (a [[Wheeler Jump]]). By convention the subroutine expected this, and the first thing it did was to modify its concluding jump instruction to that return address. Multiple and nested subroutines could be called so long as the user knew the length of each one in order to calculate the location to jump to; [[Recursion (computer science)|recursive calls]] were forbidden. The user then copied the code for the subroutine from a master tape onto their own tape following the end of their own program. (However, [[Alan Turing]] discussed subroutines in a paper of 1945 on design proposals for the NPL [[Automatic Computing Engine|ACE]], going so far as to invent the concept of a return-address stack, which would have allowed recursion.{{sfn|Turing|1945|loc=reprinted in Copeland (2005), p. 383}}) The lack of an index register also posed a problem to the writer of a subroutine in that they could not know in advance where in memory the subroutine would be loaded, and therefore they could not know how to address any regions of the code that were used for storage of data (so-called "pseudo-orders"). This was solved by use of an initial input routine, which was responsible for loading subroutines from punched tape into memory. On loading a subroutine, it would note the start location and increment internal memory references as required. Thus, as Wilkes wrote, "the code used to represent orders outside the machine differs from that used inside, the differences being dictated by the different requirements of the programmer on the one hand, and of the control circuits of the machine on the other".<ref>{{cite book |last1=Wilkes |first1=M. V. |title=Automatic digital computers |date=1956 |publisher=Methuen |location=London |pages=93β95}}</ref> EDSAC's programmers used special techniques to make best use of the limited available memory. For example, at the point of loading a subroutine from punched tape into memory, it might happen that a particular constant would have to be calculated, a constant that would not subsequently need recalculation. In this situation, the constant would be calculated in an "interlude". The code required to calculate the constant would be supplied along with the full subroutine. After the initial input routine had loaded the calculation-code, it would transfer control to this code. Once the constant had been calculated and written into memory, control would return to the initial input routine, which would continue to write the remainder of the subroutine into memory, but first adjusting its starting point so as to overwrite the code that had calculated the constant. This allowed quite complicated adjustments to be made to a general-purpose subroutine without making its final footprint in memory any larger than had it been tailored to a specific circumstance.<ref>{{cite book |last1=Wilkes |first1=M. V. |title=Automatic digital computers |date=1956 |publisher=Methuen |location=London |pages=108β109}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
EDSAC
(section)
Add topic