From 8e0fdf0d28df347c18500aca9302a718de928900 Mon Sep 17 00:00:00 2001 From: ShatteredMINT Date: Mon, 31 Aug 2026 10:08:44 +0200 Subject: [PATCH] start readme --- README.md | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44ed975..f492266 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,36 @@ -# symphony_stdlib +# Symphony Stdlib + +This is a standard library for symphony. +It is both intended as a practical toolkit to develop more complex software as well as a teaching resource. + +If you just want to use the standard library [stdlib.asm] is your main header, include it after your code. +You'll also need to include globals.asm in the first line of your main assembly file. + +If you are using it as a learning resource have a look at the [teaching folder](teaching). + +If you are intersted in contributing have a look at [CONTRIBUTING.md] + +--- + +## ABI + +### Calling Convention +n.a. zr +preserved: sp, r8 - r12 +scratch: flags, r1 - r7 +arguments: r1 - r7 (r1 = 1st argument, r6 = 6th arg/stack args, r7 = 7th arg/stack res) +result: r1, r2 (r1 = low word, r2 = high word) +return address: r13 + +### Stack +grows downwards from top of memory +arguments are passed in reverse order with the stack so: +lowest address = 1st stack arg +highest address = last stack arg + +### Types + +#### String +Strings are stored in memory as null terminated sequences of bytes encoding ascii characters. +They should be passed by reference. -standard library for symphony \ No newline at end of file