DCPU-16
1 program
Added 2026-03-17T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: DCPU16, DCPU-16 Assembly
Provenance: commit 619193f7b9 · authored 2026-03-17T05:57:06+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Memory Copy Loop and Subroutine
Provenance: commit 619193f7b9 · authored 2026-03-17T05:57:06+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
; DCPU-16 example: memory copy loop and subroutine call
; From the original DCPU-16 specification by Notch (Markus Persson)
SET I, 10 ; set loop counter to 10
SET A, 0x2000 ; set A to base address
:loop SET [0x2000+I], [A] ; copy memory word at [A] to [0x2000+I]
SUB I, 1 ; decrement counter
IFN I, 0 ; if I != 0
SET PC, loop ; jump back to loop
; Call a subroutine
SET X, 0x4 ; set X to 4
JSR testsub ; call subroutine testsub
SET PC, crash ; jump to crash if subroutine returns normally
; Subroutine: shifts X left by 4
:testsub SHL X, 4 ; X = X << 4 (should become 0x40)
SET PC, POP ; return from subroutine
; Hang forever (X should be 0x40 if everything went right)
:crash SET PC, crash ; infinite loop