views:

91

answers:

4

A rather strange question: I'm often asking myself with what programming languages things were created. I recently found this toy mini computer I played with when I was 13 or so at home. (Note: It is not one of those toy "notebooks", it's really small and came as an extra with a magazine)

"Features":

Hadware:

  • LCD with a small field of pixels where the games were going on, besides that some stats such as score, highscore etc.

  • Sounds and horrible music when started

  • A really small "keyboard" with a wire

Software:

  • At least 14 or so games, from Snake over Tetris and Breakdown to some abomination of a car racing game

  • A calculator

  • Game selecting menu

  • An alarm clock

Inside there is a really small circuit board, I don't want to open the thing up now, though.

Can you imagine if the games and "Operating System" of this thing where actually programmed using a language?

If yes, what language could it be?

If not with a programming language, how else was it created?

+1  A: 

If I were to hazard a guess I'd say they used C, it's often used with Microcontrollers in devices like that.

klennepette
+1  A: 

The question is really architectural. Is there a microprocessor in there at all? If so it's likely to have been programmed in quite a low-level language - assembler or C are quite common. However, there might conceivably not be a processor; it might be implemented as custom silicon, either an FPGA or (unlikely) an ASIC, either of which you'd program in VHDL or Verilog.

crazyscot
+1  A: 

Anybody's guess. A frequently used tactic when trying to cram a lot of software into a mass-market device (where saving 10c on storage can matter) is to use some kind of bytecode interpreter, where the bytecodes are designed to save space, even if they execute fairly slowly. FORTH used to be popular for this purpose, but there are an awful lot of one-off bytecodes in the world. One that has survived for adventure gaming is the Infocom Z-Machine.

Norman Ramsey
A: 

It's clearly an embedded microcontroller. While in principle it could have been programmed in almost any language, I would be surprised if it were written in anything other than assembly language or C.

My understanding is that all operating systems before 1972 and practically all embedded systems before 1980 or so were written entirely in assembly language, perhaps (as Norman Ramsey pointed out) with a one-off domain specific language (DSL) on top.

Assembly decreased in popularity and the C programming language became the most popular microcontroller programming language. Even up to around 2000, practically all embedded systems used at least a little assembly language to handle the things that no available higher-level language could handle.

Even today, of the thousands of embedded system microcontrollers available, the vast majority of them have no more than 4 programming languages for them available off-the-shelf: assembly language, C, BASIC, and Forth.

(I'm hoping that Python will become available for more microcontrollers -- the Pyastra and PyMite dialects already cover a couple of the most popular microcontrollers).

http://www.faqs.org/faqs/microcontroller-faq/primer/

David Cary