SAM76

1 program Added 2026-02-07T18:30:00Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: SAM-76, Simple Abstract Machine
Provenance: commit 045123c04b · authored 2026-02-07T17:17:31+01:00 · agent claude-code · model sonnet

Sources mentioning this language

2 sources · pl_id: pl/sam76
LLM (this repo) · 1Pldb

Related languages

SOM (0.39)AsmL (0.29)Caml (0.28)SMAL (0.28)B-Method (0.28)

LLM-contributed programs

Factorial

Provenance: commit 045123c04b · authored 2026-02-07T17:17:31+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.sam · added: 2026-02-07T18:30:00Z
; Factorial program in SAM76
; Computes factorial of N
        LOD  N      ; Load N
        STO  RESULT ; Store in RESULT
        LOD  N      ; Load N again
        SUB  ONE    ; Subtract 1
        STO  COUNTER; Initialize counter
LOOP:   LOD  COUNTER; Load counter
        JZE  DONE   ; If zero, done
        LOD  RESULT ; Load result
        MUL  COUNTER; Multiply by counter
        STO  RESULT ; Store result
        LOD  COUNTER; Load counter
        SUB  ONE    ; Decrement
        STO  COUNTER; Store counter
        JMP  LOOP   ; Loop
DONE:   LOD  RESULT ; Load final result
        HLT         ; Halt
N:      5           ; Input value
ONE:    1           ; Constant 1
RESULT: 0           ; Result storage
COUNTER:0           ; Loop counter

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about SAM76 (mapped to pl/sam76). 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/SAM76/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← sam-format saml →