Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mkrivos
samcoupecode
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
samcoupecode
/
pack_utils
/
CrunchCode.z80sym
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
21 lines (21 loc) · 993 Bytes
main
Breadcrumbs
samcoupecode
/
pack_utils
/
CrunchCode.z80sym
Copy path
Top
File metadata and controls
Code
Blame
21 lines (21 loc) · 993 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; Symbols for CrunchCode (foreign SAM Coupe statistical cruncher, load &8000)
LMPR: equ 0x00fa
HMPR: equ 0x00fb
VMPR: equ 0x00fc
IO_F8: equ 0x00f8
; --- entries ---
crunch: equ 0x800e ; pack
decrunch: equ 0x8025 ; unpack (depacker)
decrunch_out: equ 0x803f ; unpack, then stream result out via OTDR to port &F8
; --- packer (frequency analysis + 2-bit rank coding) ---
crunch_core: equ 0x807f
rle_pass: equ 0x80b0 ; RLE pre-pass
run_count: equ 0x80d2 ; count a run of equal bytes
emit_codes: equ 0x814c ; write the 2-bit rank-code stream
bit_write: equ 0x81bb ; write 2 bits to the output bitstream
histogram: equ 0x81cb ; count byte frequencies into &8400 (256 x 16-bit)
find_escape: equ 0x81f1 ; pick the least-frequent byte (-> &9C40)
build_ranktab: equ 0x8212 ; bytes sorted by frequency (-> &9C41, up to 84)
; --- depacker ---
decrunch_core: equ 0x8256
bit_read: equ 0x82fd ; read a 2-bit code from the bitstream
You can’t perform that action at this time.