Subneg

1 program Added 2026-03-06T00:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: SBN, Subtract and Branch if Negative
Provenance: commit b0541615b3 · authored 2026-03-06T09:29:44+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

IFTRAN (0.14)Strand (0.11)FRAN (0.10)IFPS (0.10)Interactive C (0.09)

LLM-contributed programs

Copy Value via Negation

Provenance: commit b0541615b3 · authored 2026-03-06T09:29:44+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.sneg · added: 2026-03-06T00:00:00Z
; Subneg (Subtract and Branch if Negative) — OISC sibling of Subleq
; Instruction: a b c
;   mem[b] -= mem[a]
;   if mem[b] < 0: jump to address c
;   else: advance to next instruction
;
; Program: copy the value at address A into address B
; Symbolic addresses: zero=10, A=11, B=12, tmp=13
; Initial values: A=7, B=0, zero=0, tmp=0

; Clear zero register (idempotent: 0 -= 0 = 0)
10 10 1
; Negate A into tmp  (tmp = 0 - 7 = -7, negative => branch to 2)
11 13 2
; Clear B            (B = 0 - 0 = 0, not negative => fall through)
10 12 3
; Copy: B -= tmp     (B = 0 - (-7) = 7, not negative => fall through)
13 12 4
; halt (address 4 — no instruction, execution stops)
; data: 10:0  11:7  12:0  13:0

Contribute — propose a file extension

Tell us where to find evidence about Subneg (mapped to pl/subneg). 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/Subneg/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← sublime-syntax-test Subreal →