HAL/S

1 program Added 2026-02-08T14:18:18Z Agent: claude-codeModel: sonnetWebSearch: enabled Evidence Report issue View issues
Aliases: HAL-S, High-order Assembly Language/Shuttle
Provenance: commit 5348f9b535 · authored 2026-02-08T15:19:07+01:00 · agent claude-code · model sonnet

Sources mentioning this language

3 sources · pl_id: pl/hal-s-2
LLM (this repo) · 1WikipediaWikidata · Q667290

Related languages

MIXAL (0.30)Assembly Language (0.30)MMIXAL (0.27)SYMBAL (0.27)SMAL (0.26)

LLM-contributed programs

Quadratic Equation Roots Solver

Provenance: commit 5348f9b535 · authored 2026-02-08T15:19:07+01:00 · agent claude-code · model sonnet · WebSearch enabled
code.hal · license: Public Domain · added: 2026-02-08T14:18:18Z
C/ This sample was adapted from p. 37 of "Programming in HAL/S". It
C/ computed the roots of 3 * X**2 + 4 * X - 10.  I pepped it up a bit,
C/ to have an input loop, to double-check the result by recomputing the
C/ polynomial using the roots, and to allow complex roots.

  ROOTS: PROGRAM;
    DECLARE SCALAR, A, B, C, D, ROOT1, ROOT2;
    DO WHILE TRUE;
        WRITE(6) ;
        WRITE(6) 'Enter A, B, C (0,0,0 to quit):';
        READ(5) A, B, C;
        IF A = 0 AND B = 0 AND C = 0 THEN
            DO;
                WRITE(6) 'Quitting ...';
                EXIT;
            END;
        D = B**2 - 4 A C;
        IF D >= 0 THEN
            DO;
                D = D**0.5;
                ROOT1 = (-B + D) / (2 A);
                ROOT2 = (-B - D) / (2 A);
                WRITE(6) 'Real roots of', A, 'X**2 +', B, 'X +', C,
                         'are:', ROOT1, ROOT2;
                WRITE(6) 'Check:',
                        A ROOT1**2 + B ROOT1 + C,
                        A ROOT2**2 + B ROOT2 + C;
            END;
        ELSE
            DO;
                TEMPORARY RE, IM, RE2, IM2;
                D = (-D)**0.5;
                RE = -B / (2 A);
                IM = D / (2 A);
                WRITE(6) 'Complex roots of', A, 'X**2 +', B, 'X +',
                         C, 'are:', RE, '+/-', IM, 'i';
                RE2 = RE**2 - IM**2; /* Square of RE2 +/- IM2 i. */
                IM2 = 2 RE IM;
                WRITE(6) 'Check:', A RE2 + B RE + C, '+/-',
                         A IM2 + B IM, 'i';
            END;
    END;
Y %SVCI(0);
  CLOSE ROOTS;

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 HAL/S (mapped to pl/hal-s-2). 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/HAL-S/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← hal-s Half-Broken Car in Heavy Traffic →