Click4
		
		
		
		
		
		Jump to navigation
		Jump to search
		
		
	
Click4 (pronounced click-ah) is a fantasy console based around nibbles.
Capabilities
- Program memory: 64x64 nibbles (2,048 bytes)
- RAM: Shared with Program memory
- Screen: 64x64, 16 colors
- Instruction set: 16 instructions
- Sounds: Sound queue with 16 sounds (A-G#, plus a rest and three other noises)
Instructions
| Value | Color | Op | Args | ShortInfo | Sound | 
|---|---|---|---|---|---|
| 0 | NOP | 0 | nop | Rest | |
| 1 | SET | 2 | *ARG1=ARG2 | A | |
| 2 | COPY | 2 | *ARG1=*ARG2 | A# | |
| 3 | INC | 1 | *ARG1=*ARG1+1 | B | |
| 4 | DEC | 1 | *ARG1=*ARG1-1 | C | |
| 5 | NAND | 3 | *ARG1=*ARG2&*ARG3 | C# | |
| 6 | CRSZ | 1 | *ARG==0?PC=PC+2 | D | |
| 7 | JMP | 4 | PC=X[*ARG1*16+*ARG2]+Y[*ARG3*16+*ARG4] | D# | |
| 8 | RJMP | 1 | PC=PC+ARG1+1 | E | |
| 9 | LOAD | 0 | R0=X[R*16+R2]+Y[R3*16+R4] | F | |
| 10 | SAVE | 0 | X[R*16+R2]+Y[R3*16+R4]=R0 | F# | |
| 11 | INPUT | 1 | *ARG1=INPUT | G | |
| 12 | DRAW | 0 | Draw X[R0*16+R1],Y[R2*16+R3] with W[R4],H[R5] to X[R6*16+R7],Y[R8*16+R9 | G# | |
| 13 | QSND | 1 | enqueue_sound(*ARG1) | Alt1 | |
| 14 | N/A | 0 | n/a | Alt2 | |
| 15 | N/A | 0 | n/a | Alt3 | 
Controls
To begin or stop execution, press Tab.
To show console information, Press R.
To access primary functions or change a value in memory, click on the 64x64 grid. A context menu containing the following will appear:
- 0-15: Change the selected memory value.
- X,Y PC: The current X, Y location and the raw index.
- Save: Save the current program to cart.png
- Load: Load the current program from cart.png
- Reset: Clear the entire cart in memory.
- Show: Show the file location of cart.png
To change the scale of the console, Press - or +.
To close the context menu, press Escape.
