Babbage (programming language)
From Wikipedia, the free encyclopedia
For other uses, see Babbage (disambiguation).
|
|
The topic of this article may not meet Wikipedia's general notability guideline. Please help to establish notability by adding reliable, secondary sources about the topic. If notability cannot be established, the article is likely to be merged, redirected, or deleted. (October 2011) |
| This article relies on references to primary sources or sources affiliated with the subject, rather than references from independent authors and third-party publications. Please add citations from reliable sources. (October 2011) |
| Paradigm(s) | procedural, structured, High-level assembler |
|---|---|
| Appeared in | around 1971 |
| Stable release | 308 |
| Influenced by | BCPL |
| OS | COS, GEC DOS, OS4000 |
Babbage is the high level assembly language for the GEC 4000 series minicomputers.[1] It was named after Charles Babbage, an English computing pioneer.
[edit] Example
PROCESS CHAPTER FACTORIAL
ENTRY LABEL ENTRYPOINT
LITERAL TO = 4 // Assume using the default proforma
EXTERNAL ROUTINE
OPEN,
PUT,
CLOSE,
TOCHAR
VECTOR [0,19] OF BYTE ANSWER = "factorial x = xxxxxx"
HALF COUNT
HALF VALUE
FULL RESULT
//******************************************************************************
ROUTINE FACT(VALUE)
// return factorial of RA.
VALUE => RESULT
WHILE DECREMENT VALUE GT //0// DO
<<
RESULT * VALUE => RESULT
>>
RETURN(RESULT)
END
//******************************************************************************
ENTRYPOINT:
OPEN(TO, 1)
// Print factorials for numbers 1 through 9
1 => RA
REPEAT
<<
RA => COUNT
FACT(RA) => RA
TOCHAR(RA, 7, ANSWER + 13)
TOCHAR(COUNT, 2, ANSWER + 9)
PUT(TO, 20, ANSWER)
COUNT + 1 => RA
>>
WHILE RA LT 10
CLOSE(TO)
STOP(0)
END
//******************************************************************************
[edit] See also
[edit] References
- ^ Salomon, David (1992). Assemblers and Loaders. Ellis Horwood. pp. 184–185. ISBN 0130525642. http://www.scribd.com/doc/7326575/Assembly-Language.
| This programming language-related article is a stub. You can help Wikipedia by expanding it. |