Add full compiler toolchain, libc, examples and reference docs

First substantive commit: the entire Sprinter C compiler tree on top of
the bare README+gitignore initial commit.

What's in here:
  bin/sprinter-cc        — driver script invoking SDCC + linker + mkexe
  libc/                  — Sprinter-specific libc layer over ESTEX/BIOS
                           (conio, gfx, io, mem, stdio + headers)
  runtime/               — crt0 variants (default/small/banked/minimal)
                           + heap + bank trampolines
  toolchain/             — mkexe (SprintEXE packer, C + tests)
  examples/              — 30 demo programs (gfx, file I/O, env, time, …)
  lib/Makefile           — builds the libc archive (sprinter.lib)
  docs/                  — converted Sprinter manuals + asm reference samples
  third_party/           — solid-c reference compiler dump + sdcc setup script
  release_docs/          — packaging / release notes

gitignore overhaul:
  • Drop dangerous blanket patterns: *.asm (would hide docs/samples/*.asm)
    and *.exe (case-insensitive match was hiding third_party/solid-c/*.EXE
    on macOS APFS).  Replaced with examples/*/*.{asm,exe,…} and lib/*.lib.
  • Restore tracking of toolchain/mkexe/tests/{one,big}.bin — those are
    INPUT fixtures, not build outputs.
  • Collapse the duplicated SDCC/C/Sdcc sections into one section per
    concern (build outputs / vendored / OS-junk).
  • Add .sprinter-cc-*/, build/ (catches lib/build/ too), .claude/.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-03 16:13:21 +03:00
parent f542608b3f
commit c71e249a4e
404 changed files with 75155 additions and 58 deletions
+134
View File
@@ -0,0 +1,134 @@
;Subprograms
set_vmode
ld a,#82
ld bc,#50
rst #10
ret
open_video_mem
push af
in a,(win1)
ld (previous),a
ld a,#50
out (win1),a
pop af
ret
open_video_mem1
push af
in a,(win1)
ld (previous),a
ld a,#58
out (win1),a
pop af
ret
close_video_mem
push af
ld a,(previous)
out (win1),a
pop af
ret
previous defb 0
clear_screen
ld b,a
and %00001111
rlca
rlca
rlca
rlca
or b
ld (clear_color),a
in a,(win1)
push af
ld a,#50
out (win1),a
ld b,0
clear_screen1 push bc
ld a,b
out (port_y),a
ld hl,#4000
ld de,#4001
ld bc,320
ld a,0
clear_color equ $-1
ld (hl),a
ldir
pop bc
djnz clear_screen1
pop af
out (win1),a
ret
wait_a_key
ld c,#30
rst #10
ret
wait_q_key
ld c,#31
rst #10
jr z,wait_q_key
cp "Q"
ret z
cp "q"
ret z
jp wait_q_key
wait_a_click
push af
;waitclick1
; ld a,(mouse_keys)
; bit 0,a
; jr z,waitclick1
; pop af
; ret
setpalette
;Set your palette
ld hl,palette ;Addr. of palette
ld e,0 ;Start colour
ld d,16 ;Quantity of colours (16 colours for 640x256 mode)
ld b,#ff ;Palette mask
ld a,0 ;Palette page
ld c,#a4 ;System function
rst #8 ;Call BIOS
ret
palette
;b,g,r,0
;16 colours of your palette
; BBB GGG RRR
defb #00,#00,#00,#00 ;0 -Black
defb #BF,#00,#00,#00 ;1 -
defb #00,#00,#FF,#00 ;2 -Red
defb #FF,#00,#FF,#00 ;3 -
defb #00,#BF,#00,#00 ;4 -Green
defb #DF,#DF,#00,#00 ;5 -
defb #00,#FF,#FF,#00 ;6 -
defb #FF,#FF,#FF,#00 ;7 -White
defb #7F,#7F,#7F,#00 ;8 -
defb #BF,#BF,#BF,#00 ;9 -Gray
defb #DF,#DF,#DF,#00 ;10-
defb #97,#97,#97,#00 ;11-Dark gray
defb #00,#00,#00,#00 ;12-
defb #00,#00,#00,#00 ;13-
defb #00,#00,#00,#00 ;14-
defb #00,#00,#00,#00 ;15-
font
*B c:\speccy\aedit\6x8.fnt
;*B 6x8.fnt