; ===== INTRODUCTION ===== ; This is supposed to provide some standard library functionality for stock symphony. ; In particular its supposed to work with an unmodified ISA, that means some choices are not ; optimal (RA being stored in flags for example) ; ===== 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 ===== pub include bit pub include imath