The CHIP-8 computer programming language was originally developed by a design engineer named Joe Weisbecker at RCA Labs, USA (1975-76). Its raison d’être was simply to allow users of low-cost microcomputers to write their own video games without the hassle of dealing with lower-level machine code.
The programmer used a hexadecimal keyboard to enter data. The keyboard typically produces Row and Column signal lines that can be scanned by the Computer to determine which Keys were pressed. This programming method was a significant step up from binary coding, which was very tedious to input and required a deep understanding of the internal architecture of microprocessors.
The first computer to have resident CHIP-8 was RCA’s COSMAC VIP.
CHIP-8 is an interpreter-based language and is usually found in ROM (Read Only Memory), within the processors memory map. Because of this, it can be called – the Computer Operating System (CHIPOS).
The limitations of using Vintage are: a graphic display of only 64×32 pixels resolution, with a small program address space of only 4K bytes. This is due to the 12-bit width of the memory pointer – Register I.
Monochrome graphic display. Color was not initially supported.
The user program resides in RAM (random access memory) starting at address 0200 hexadecimal.
Each programming instruction is two bytes long (4 hexadecimal digits).
The instruction set consists of 33 instructions.
There are 16 one-byte variables – V0 to VF that can be modified using a variety of arithmetic/logical and conditional branch instructions.
It bears repeating: the memory pointer (Register I) is 12 bits long, giving an addressing range of 4K bytes. A huge limitation by today’s standards.
Machine code programs can be called within CHIP-8 programs.
The CHIP-8 computer screen is organized in X,Y format. The X coordinates range from 0 to 63, and the Y coordinates range from 0 to 31. The 0.0 coordinate is at the top left of the screen.
Here is an example of CHIP-8 code that amplifies the simplicity of how a character can be written to the screen:
Like all CHIP-8 programs, this program starts at address 0200 Hex –
SHOW 5 @ VA, VB
At address 210 hexadecimal are the data: F0,10,F0,80,F0,00
When run, this program will write the number 2 to the screen, at coordinate 0,0.