{"id":6528,"date":"2019-04-17T05:25:35","date_gmt":"2019-04-17T04:25:35","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=6528"},"modified":"2019-04-17T05:25:35","modified_gmt":"2019-04-17T04:25:35","slug":"fortran-compiler-for-sinclair-zx-spectrum-rediscovered-after-40-years","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=6528","title":{"rendered":"Fortran Compiler for Sinclair ZX Spectrum rediscovered after 40 years"},"content":{"rendered":"<p><strong>It started with a tweet<\/strong><\/p>\n<p>While basking in some geek nostalgia on twitter, I discovered that my first ever microcomputer, the <a href=\"https:\/\/en.wikipedia.org\/wiki\/ZX_Spectrum\">Sinclair Spectrum<\/a>, once had a <a href=\"https:\/\/www.fortran.uk\/fortran-compiler-comparisons\/\">Fortran compiler<\/a><\/p>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-6538\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira-1024x520.png\" alt=\"mira\" width=\"800\" height=\"405\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira-1024x520.png 1024w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira-300x152.png 300w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira-768x390.png 768w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira.png 1216w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>However, that compiler was seemingly lost to history and was declared Missing in Action on <a href=\"https:\/\/www.worldofspectrum.org\/\">World of Spectrum<\/a>.<\/p>\n<p><a href=\"http:\/\/www.worldofspectrum.org\/infoseekid.cgi?id=0011908\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6539\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira2-300x89.png\" alt=\"mira2\" width=\"300\" height=\"89\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira2-300x89.png 300w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira2.png 605w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>A few of us on Twitter enjoyed reading the <a href=\"http:\/\/www.crashonline.org.uk\/45\/tips.htm\">1987 review of this Fortran Compiler<\/a>\u00a0but since no one had ever uploaded an image of it to the internet, it seemed that we&#8217;d never get the chance to play with it ourselves.<\/p>\n<p><strong>I never thought it would come to this<\/strong><\/p>\n<p>One of the benefits of <a href=\"https:\/\/twitter.com\/walkingrandomly\">5000+ followers on Twitter<\/a> is that there&#8217;s\u00a0usually someone who knows something interesting about whatever you happen to tweet about and in this instance, that somebody was my fellow <a href=\"https:\/\/www.software.ac.uk\/about\/fellows\">Fellow of the Software Sustainability Institute<\/a>,\u00a0<a href=\"https:\/\/twitter.com\/geospacedman\">Barry Rowlingson<\/a>.\u00a0 Barry was fairly sure that he&#8217;d recently packed a copy of the Mira Fortran Compiler away in his loft and was blissfully unaware of the fact that he was sitting on a missing piece of microcomputing history!<a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-6540\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira3-1024x225.png\" alt=\"mira3\" width=\"800\" height=\"175\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira3-1024x225.png 1024w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira3-300x66.png 300w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira3-768x169.png 768w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/03\/mira3.png 1266w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>He was right! He did have it in the attic&#8230;and <a href=\"https:\/\/twitter.com\/jorallan\/status\/1100900560948129793\">members of the community<\/a> considered it valuable.<\/p>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/04\/mira_box.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-6553\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/04\/mira_box-747x1024.png\" alt=\"mira_box\" width=\"747\" height=\"1024\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/04\/mira_box-747x1024.png 747w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/04\/mira_box-219x300.png 219w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/04\/mira_box-768x1053.png 768w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/04\/mira_box.png 1222w\" sizes=\"auto, (max-width: 747px) 100vw, 747px\" \/><\/a><\/p>\n<p>As Barry mentioned in his tweet, converting a 40 year old cassette to an archivable .tzx format is a process that could result in permanent failure.\u00a0 The attempt on side 1 of the cassette didn&#8217;t work but fortunately, side 2 is where the action was!<\/p>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/04\/makeTzx.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-6554\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/04\/makeTzx-984x1024.png\" alt=\"makeTzx\" width=\"800\" height=\"829\" \/><\/a><\/p>\n<p>It turns out that everything worked perfectly.\u00a0 On loading it into a Spectrum emulator, Barry could enter and compile Fortran on this platform for the first time in decades! Here is the source code for a program that computes prime numbers<\/p>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/04\/prime_source.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-6555\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/04\/prime_source-1024x905.png\" alt=\"prime_source\" width=\"800\" height=\"705\" \/><\/a><\/p>\n<p>Here it is running<\/p>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/04\/running_primes.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6556\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/04\/running_primes.png\" alt=\"running_primes\" width=\"645\" height=\"562\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/04\/running_primes.png 645w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2019\/04\/running_primes-300x261.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/a><\/p>\n<p>and here we have Barry giving the sales pitch on the advanced functionality of this compiler :)<\/p>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/04\/high_res.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6557\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2019\/04\/high_res.png\" alt=\"high_res\" width=\"800\" height=\"636\" \/><\/a><\/p>\n<p><strong>How to get the compiler<\/strong><\/p>\n<p>Barry has made the compiler, and scans of the documentation, available at\u00a0<a href=\"https:\/\/gitlab.com\/b-rowlingson\/mirafortran\">https:\/\/gitlab.com\/b-rowlingson\/mirafortran<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It started with a tweet While basking in some geek nostalgia on twitter, I discovered that my first ever microcomputer, the Sinclair Spectrum, once had a Fortran compiler However, that compiler was seemingly lost to history and was declared Missing in Action on World of Spectrum. A few of us on Twitter enjoyed reading the [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[34,7,10],"tags":[],"class_list":["post-6528","post","type-post","status-publish","format-standard","hentry","category-fortran","category-programming","category-retro-computers"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-1Hi","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6528"}],"version-history":[{"count":10,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6528\/revisions"}],"predecessor-version":[{"id":6565,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6528\/revisions\/6565"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}