Dog

CHIP-8 programming language

CHIP-8 programming language

The CHIP-8 computer programming language was originally developed by a design engineer named Joe Weisbecker at RCA Labs, USA (1975-76). The reason for this was simply to allow users of cheap microcomputers to write there own video games without having to deal with lower level machine code.

The programmer uses a hexadecimal keyboard to enter data. A keyboard usually produces signal lines for rows and columns that can be scanned by the computer to determine which keys have been pressed. This programming method was a significant step forward from binary coding, which was very tedious to implement and required a deep understanding of the internal architecture of microprocessors.

The first computer with a resident CHIP-8 was RCA’s COSMAC VIP.

CHIP-8 is an interpreter-based language and is usually located in ROM (read-only memory), on the memory card of processors. Therefore, it can be called – computer operating system (CHIPOS).

Vintage’s limitations in using it are – a graphics screen with a resolution of only 64×32 pixels, with a small program address space of only 4K bytes. This is due to the 12-bit width of the memory pointer – register I.

Other highlights:

Monochrome graphic display. Initially, the color was not supported.

The user program resides in RAM (random access memory) starting at address 0200 Hex.

Each programming statement is two bytes long (4 hexadecimal digits).

The instruction set consists of 33 instructions.

There are 16 single-byte variables – V0 to VF that can be modified using various arithmetic/logical and conditional branch instructions.

It’s worth repeating – the memory pointer (register I) is 12 bits long, giving an addressing range of 4K bytes. A big limitation by today’s standards.

Machine code programs can be called within CHIP-8 programs.

The CHIP-8 computer screen is organized in an 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 reinforces the simplicity of how a character can be written on the screen:

Like all CHIP-8 programs, this program starts at address 0200 Hex –

VA=0

VB=0

i=210

SHOW 5 @ VA,VB

STOP YOURSELF

At address 210 Hex is the data – F0,10,F0,80,F0,00

When run, this program will write the number 2 on the screen, at coordinate 0,0.

#CHIP8 #programming #language

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button