{"id":38488716,"url":"https://github.com/gerph/riscos64-clib","last_synced_at":"2026-02-16T01:23:00.995Z","repository":{"id":247144846,"uuid":"825039032","full_name":"gerph/riscos64-clib","owner":"gerph","description":"A C library for RISC OS 64.","archived":false,"fork":false,"pushed_at":"2026-01-11T11:02:57.000Z","size":687,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-11T15:33:08.844Z","etag":null,"topics":["riscos","riscos64"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gerph.png","metadata":{"files":{"readme":"README.md","changelog":"changelogs/changelog.py","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["gerph"]}},"created_at":"2024-07-06T15:41:05.000Z","updated_at":"2026-01-11T10:59:47.000Z","dependencies_parsed_at":"2024-08-24T22:28:44.290Z","dependency_job_id":"53f2f744-98be-4dcc-a3ba-c4c893b48bf0","html_url":"https://github.com/gerph/riscos64-clib","commit_stats":null,"previous_names":["gerph/riscos64-simple-binaries","gerph/riscos64-clib"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/gerph/riscos64-clib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerph%2Friscos64-clib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerph%2Friscos64-clib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerph%2Friscos64-clib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerph%2Friscos64-clib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gerph","download_url":"https://codeload.github.com/gerph/riscos64-clib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerph%2Friscos64-clib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28500598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["riscos","riscos64"],"created_at":"2026-01-17T05:39:42.271Z","updated_at":"2026-01-17T05:39:42.354Z","avatar_url":"https://github.com/gerph.png","language":"C","funding_links":["https://github.com/sponsors/gerph"],"categories":[],"sub_categories":[],"readme":"# RISC OS 64 C library and binaries\n\nThis repository contains a C library for AArch64 RISC OS (RISC OS 64). The library is in the process of being developed to allow modules and absolutes to be used within a 64-bit RISC OS environment.\n\n## Usage\n\nThere are multiple directories within this repositories that contain binaries:\n\n* `clib` contains the C library. This must be built first.\n* `absolutes` contains absolute files (AIF).\n* `modules` contains module files.\n* `utilities` contains utilities.\n\nTo build these on a POSIX system you will require Docker for the cross compiler.\n\n### C library\n\nThe C library can be built with:\n\n    make\n\nThe C library is limited in functionality, but provides sufficient implementation\nfor simple tools to be ported. Additional functions can be added as necessary.\nThe library is usable with both absolutes and modules.\n\n### Absolutes\n\nThe absolute test files can be built with:\n\n    make all\n\nIndividual files can be built with:\n\n    make TARGET=\u003cfilename\u003e\n\nThe binaries will be produced as `,ff8` suffixed files. There is also a `.map`\nsuffixed file, which contains a description of where the content lives within\nthe file.\n\n### Modules\n\nThe module test files can be built with:\n\n    make all\n\nIndividual files can be built with:\n\n    make TARGET=\u003cfilename\u003e\n\nThe binaries will be produced as `,ffa` suffixed files. Again a `.map` file is\npresent.\n\n### Utilities\n\nSample utility files can be built with:\n\n    make all\n\nIndividual files can be built with:\n\n    make TARGET=\u003cfilename\u003e\n\nThe binaries will be produced as `,ffc` suffixed files. Again a `.map` file is\npresent.\n\n### Exported libraries\n\nThe exported libraries and tools are built automatically by the GitHub build system.\nThe exported directory can be downloaded from the [Releases](https://github.com/gerph/riscos64-clib/releases)\nand used on POSIX systems (Linux, macOS, WSL2). To install the tooling, use:\n\n    bin/robuild64 install \u003ctarget-dir\u003e\n\nThis will install the tools:\n\n* `riscos64-cc` - compiler\n* `riscos64-link` - linker\n* `riscos64-libfile` - library tool\n* `riscos64-as` - assembler\n\nall of which will work with RISC OS 64-bit binaries.\n\nFor example:\n\nTo build a single source into an executable, you might use:\n\n    riscos64-cc main.c\n\nWhich would build 64-bit executable called `main,ff8`.\n\nAlternatively, the compile and link process can be done separately, for example:\n\n    riscos64-cc -c main.c -o main.o\n    riscos64-link -aif main.o -o main,ff8\n\n\n## AIF Format\n\nThe 64-bit AIF format has been defined as follows:\n\n| Offset | Value       | Instructions | Meaning |\n| ------ | ----------- | ------------ | ------- |\n| \u0026000   | `\u0026e1a00000` | ARM32: `NOP`             | ARM32 decompression |\n| \u0026004   | `\u0026e1a00000` | ARM32: `NOP`             | ARM32 reloc |\n| \u0026008   | `\u0026e1a00000` | ARM32: `NOP`             | ARM32 zero init |\n| \u002600C   | `\u0026eb00000b` | ARM32: `BL      entry`   | ARM32 image entry |\n| \u0026010   | `\u0026ef000011` | ARM32: `SWI     OS_Exit` | explicit OS_Exit |\n| \u0026014   | variable    | code + static data size  | read only size |\n| \u0026018   | variable    | R/W data size| read write size |\n| \u002601C   | `\u00260`        | - | debug size |\n| \u0026020   | variable    | zero init size | zero init size |\n| \u0026024   | `\u00260`        | - | debug type |\n| \u0026028   | `\u00268000`     | - | linked base address |\n| \u002602C   | `\u00260`        | - | workspace size (obsolete) |\n| \u0026030   | `\u002640`       | - | address mode |\n| \u0026034   | `\u00260`        | - | data base address |\n| \u0026038   | `\u00260`        | - | reserved |\n| \u002603c   | `\u00260`        | - | reserved |\n| \u0026040   | `\u0026e28f0000` | ARM32: `entry: ADR     r0, error_block`    | ARM32 error report |\n| \u0026044   | `\u0026ef00002b` | ARM32: `SWI     OS_GenerateError`          |  |\n| \u0026048   | `\u00260`        | ARM32: `error_block: DCD     0` |  |\n| \u002604c   | string      | ARM32: `= \"AArch64 binaries cannot be run on 32-bit RISC OS\", 0` |  |\n| \u002607c   | `\u00260`        | ARM32: `DCD     0` |  |\n| ... |\n| \u0026100   | `\u0026D503201F` | ARM64: `NOP` | AArch64 decompression |\n| \u0026104   | `\u002694000004` | ARM64: `BL zeroinit` | AArch64 zero init |\n| \u0026108   | `\u00269400001F` | ARM64: `BL entry` | AArch64 entry point |\n\nThis follows the pattern defined in https://riscos.com/support/developers/riscos6/programmer/codeformats.html for Absolute files, with 64 (\u002640) in place of the bitness.\n\n## Module Format\n\nThe 64-bit module format is only slightly varied from that defined previously, following the definition in https://pyromaniac.riscos.online/pyromaniac/prm/kernel/modules/modules-supplement.html.\n\nFrom the standard 32-bit module, there are the following differences:\n\n* The initialisation offset has bit 30 set. This indicates that the module is not ARM. The architecture is defined within the feature flags.\n* The feature flags bits 4-7 contains the architecture type:\n    * 0 = AArch32\n    * 1 = AArch64\n    * 2 = x86 64-bit\n    * 15 = Python\n* The feature flags bit 2 indicates that a zero-initialisation size is present following the feature flags.\n* The module will have its zero-initialisation area initialised to 0.\n* The module will always be allocated on a page boundary plus 4. That is, the base address of the module in hex will always end in `004`. This allows the standard mechanism for referencing addresses using the `ADRP` instruction to be used.\n* Modules will never be multiply instantiated.\n* All module entry points follow the pattern of the CMHG entry points, rather than the original register assignments, with the exception of `r12` which remains in `x12`.\n    * The initialisation entry point:\n        * `x0` -\u003e start string\n        * `x1`  = instance number (always 0)\n        * `x12` = private word pointer\n    * The finalisation entry point:\n        * `x12` = private word pointer\n    * The SWI entry point:\n        * `x0`  = SWI offset\n        * `x1` -\u003e register block (x0-x9 on entry)\n        * `x12` = private word pointer\n    * The command entry point:\n        * `x0` -\u003e argument string\n        * `x1`  = count of arguments\n        * `x2`  = command number\n        * `x12` = private word pointer\n* All module entry points which can return an error pointer, must return the error pointer in `r0`, or 0. The `V` flag need not be set. This follows the pattern of CMHG entry points.\n* All interfaces are assumed to use the frame pointer for a call chain, and should not 0 this value on entry.\n\n\n## Utility format\n\nUtilities, like AIF files, have an ARM 32-bit header. This follows the standard utility file format defined at https://riscos.com/support/developers/riscos6/programmer/codeformats.html\n\nThe format has been extended, thus:\n\n| Offset | Value       | Instructions             | Meaning |\n| ------ | ----------- | ------------------------ | ------- |\n| \u0026000   | `\u0026ea000005` | ARM32: `B       \u00261C`     | ARM32 entry |\n| \u0026004   | `\u002679766748` | -                        | magic 1 |\n| \u0026008   | `\u0026216c6776` | -                        | magic 2 |\n| \u002600c   | variable    | code + static size       | Read-only size |\n| \u0026010   | variable    | R/W data size            | Read-write size |\n| \u0026014   | `\u002600000040` | -                        | Bitness + flags |\n| \u0026018   | variable    | -                        | offset of ARM64 entry |\n| \u002601c   | `\u0026e28f0004` | ARM32: `ADR     r0, \u002624` | ARM32 error report |\n| \u0026020   | `\u0026e3500102` | ARM32: `CMP     r0, #\u002680000000` | |\n| \u0026024   | `\u0026e1a0f00e` | ARM32: `MOV     pc, lr`  | |\n| \u0026028   | `\u002600000000` | ARM32: error number      | |\n| \u002602c   | `\u002663724141` | ARM32: `= \"AArch64 binaries cannot be run on 32-bit RISC OS\" ,0` | |\n\nThe utility file will be entered at the offset given at offset \u002618.\n\nFuture versions of this specification may require that the utility be loaded at a page boundary plus 4 bytes, as modules are.\n\n## Change history\n\nSee [Changes](https://github.com/gerph/riscos64-clib/wiki/Changes) for summary of the changes in each release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgerph%2Friscos64-clib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgerph%2Friscos64-clib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgerph%2Friscos64-clib/lists"}