GithubHelp home page GithubHelp logo

frialey63 / cag-mnemonic-code Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 4.84 MB

Java implementation of the City & Guilds Mnemonic Code

License: Apache License 2.0

Java 100.00%
cityandguilds code mnemonic school

cag-mnemonic-code's Introduction

Java implementation of the City & Guilds Mnemonic Code

Background

This project is a Java implementation of the City & Guilds Mnemonic Code language which originates from 1964. The language was the first that I ever encountered as part of my Computer Science A-Level in 1981 at Ashmole School. My year was the first at the school to include a full class in this new A-Level. As I recall, most of our usage of this language was in the form of "paper work" exercises. We did have a facility by which programs could be dispatched to the computer centre at Barnet College for entry on the mainframe and then accessed remotely using the teleterminal at the school. (This was certainly the way in which I developed code for my later FORTRAN project.) I have never forgotten the Mnemonic Code language and a summary paper "Appendix B" has resided in my pile of papers as a TODO item for many years. Note I thought that I had some examples of my work in the language stored in a box in my loft but sadly this does not appear to be the case although the search will continue... However, with some extra time on my hands now it seemed a good time to resurrect the language in Java, the modern language which has been the foundation of my career in recent years.

For those who are not familiar (and there will be very few who are!) the Mnemonic Code is an assembly language of the most primitive form. It is an language which appears to have been invented for instruction only, i.e. it was never directly linked with the machine language of any computer hardware. As previously noted, it originated in 1964 at Elliott Computers where it was implemented on the Elliott 903 computer. The first reference below describes this implementation and is the primary source for my development of this Java implementation. The data processing business of Elliott Computers was taken over by ICT (aka ICL) in 1968 and so knowledge of the language transferred to ICL. At ICL in 1967 it was specified into a form which was suitable for incorporation into the City & Guilds examinations 319 and 320. This specification is closely related to the original Elliott implementation of 1964. A bit later in 1968 the specification was revised by ICL also for the City & Guilds examination 319, see references below.

So by the time I encountered the Mnemonic Code in 1980 it was already a fairly old language. At some time in the lead-up to 1980 the AEB examination board in England decided to adopt the City & Guilds Mnemonic Code language to support the teaching of their syllabus.

Dedicated to Mr Cook and Mr Cooke my computer science and mathematics teachers at Ashmole School.

Design Notes

The scope of this Java implementation is strictly that of the machine independent aspects of the Mnemonic Code language. No attempt has been made to simulate the behaviour of the Elliott 903 host involving its numeric representation, math library and character set. (The details of these are available in the references and more knowledgeable programmers have undertaken this development for other projects.) Similarly the operational procedures involved in controlling the translator and interpreter on the Elliott 903 are outside the scope of this Java implementation.

The Mnemonic Code is a simple language and consequently the Java software necessary for its implementation is relatively simple. For the technically inclined there are a couple of interesting features of the software design which are worth noting. The assembly process performed by the Assembler class makes use of pattern matching with regular expressions to parse the input text and extract Orders, i.e. instructions and directives. The interpretation process performed by the Interpreter class utilises reflection to lookup the machine instruction corresponding to a stored instruction. Instructions are mechanised through a common Executable interface which defines an "execute" operation. A significant focus of the development effort was to accurately reproduce the I/O instructions in group 5 albeit with Java devices and files. Also, the error checking as described for the original Elliot implementation has been faithfully reproduced just with the addition of a full description in the error report.

A Java 8 JDK was used to implement the software and it was developed using the Eclipse 2020 IDE in conjunction with the Maven 3.6.3 build system. JUnit test coverage is 90%, a custom Checkstyle ruleset (derived from Sun) has been imposed and static code analysis has been applied with FindBugs (default settings). The repo includes the Eclipse project files and when imported as a Maven project it will build automatically and launchers are provided to run the JUnit tests and one example program. Of course it is also possible to build the software without Eclipse by means of the usual Maven incantations.

Usage

Option       Description
------       -----------
-a           assemble only
-d           dump contents of store
-f <String>  file for data
-t           trace enable

References

Andrew Herbert's Documentation Archive

The City and Guilds Computer

City & Guilds 319 Mnemonic Code (1967)

City & Guilds 319 Mnemonic Code (1968)

Elliott 900 Series Computers

Elliott Computers

Terry Froggatt's Home Page

Elliott Brothers

Elliott 803 Simulation

Computer Conservation Society

Resurrection - The CCS Journal

Computer Resurrection Issue 71

City & Guilds Mnemonic Code

Centre for Computing History

Centre for Computing History

Memories of a Programmer - Helen Young

Computing in Schools - The Early Years (by Tony Goodhew)

ICL Computer Education in Schools

ICL Computer Education in Schools

City & Guilds Mnemonic Code

Originals

cag-mnemonic-code's People

Contributors

frialey63 avatar

Stargazers

Wiseman Lim avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.