RGBASM

1 program Added 2026-03-17T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: RGBDS Assembly, Game Boy Assembly (RGBDS)
Provenance: commit f731d61a30 · authored 2026-03-17T01:06:49+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)
LLM (this repo) · 1

Related languages

MIPS Assembly (0.25)AVR Assembly (0.24)MSP430 Assembly (0.22)SPARC Assembly (0.22)Assembly (0.22)

LLM-contributed programs

Fibonacci Sequence

Provenance: commit f731d61a30 · authored 2026-03-17T01:06:49+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.asm · license: MIT · added: 2026-03-17T10:00:00Z
; Fibonacci sequence in RGBDS Game Boy Assembly (RGBASM)
; Computes successive Fibonacci numbers using WRAM variables

SECTION "Variables", WRAM0

FibPrev:    ds 1    ; Previous Fibonacci number
FibCurr:    ds 1    ; Current Fibonacci number

SECTION "Main", ROM0[$150]

Main::
    ; Initialize: fib(0)=0, fib(1)=1
    xor a
    ld [FibPrev], a     ; FibPrev = 0
    inc a
    ld [FibCurr], a     ; FibCurr = 1

    ld c, 8             ; Compute 8 more iterations

.loop:
    ld a, [FibPrev]     ; a = FibPrev
    ld b, a             ; b = FibPrev (save it)
    ld a, [FibCurr]     ; a = FibCurr
    ld [FibPrev], a     ; FibPrev = old FibCurr
    add a, b            ; a = old FibCurr + old FibPrev
    ld [FibCurr], a     ; FibCurr = sum

    dec c
    jr nz, .loop        ; Repeat 8 times

    ; FibCurr now holds fib(9) = 34

.done:
    halt
    nop
    jr .done

Contribute — propose a file extension

Tell us where to find evidence about RGBASM (mapped to pl/rgbasm). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/RGBASM/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← RGB4D Rgbl →