Babbage (programming language)
Encyclopedia
Babbage is the high level assembly language
High-level assembler
High-level assemblers in computing are assemblers for assembly language that incorporate features found in high-level programming languages.Some high-level assemblers are Borland's TASM, Microsoft's MASM, IBM's HLASM , Alessandro Ghignola's Linoleum, and Niklaus Wirth's PL/360.High-level assemblers...

 for the GEC 4000 series
GEC 4000 series
The GEC 4000 was a series of 16/32-bit minicomputers produced by GEC Computers Ltd. of the UK during the 1970s, 1980s and early 1990s.- History :...

 minicomputers. It was named after Charles Babbage
Charles Babbage
Charles Babbage, FRS was an English mathematician, philosopher, inventor and mechanical engineer who originated the concept of a programmable computer...

, an English
English people
The English are a nation and ethnic group native to England, who speak English. The English identity is of early mediaeval origin, when they were known in Old English as the Anglecynn. England is now a country of the United Kingdom, and the majority of English people in England are British Citizens...

computing pioneer.

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

//******************************************************************************

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK