kids encyclopedia robot

Babbage (programming language) facts for kids

Kids Encyclopedia Facts
Quick facts for kids
Babbage
Paradigm procedural, structured, High-level assembler
First appeared around 1971; 54 years ago (1971)
Stable release
308
OS COS, GEC DOS, OS4000
Influenced
BCPL

Babbage is a special computer language. It was made for older computers called the GEC 4000 series minicomputers. Think of it as a way to tell these computers exactly what to do. It's named after Charles Babbage, who was a very important person in early computer history.

What is Babbage?

Babbage is known as a 'high-level assembly language'. This means it's a bit like a very detailed instruction manual for a computer. It lets programmers write commands that are close to how the computer's brain works. But it is still easier for humans to understand than raw machine code.

It was created around 1971. It helped people write programs for GEC 4000 series minicomputers. These were powerful computers for their time. They were used in places like businesses and universities.

How Babbage Code Looks

Computer languages like Babbage have their own special rules and words. Programmers use these words to write instructions for the computer. The example below shows what Babbage code looks like. It's a program that calculates something called a "factorial." A factorial is when you multiply a number by all the whole numbers smaller than it. For example, the factorial of 4 (written as 4!) is 4 × 3 × 2 × 1 = 24.

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

//'''**************************************************************************'''

See also

kids search engine
Babbage (programming language) Facts for Kids. Kiddle Encyclopedia.