CC65 is a cross compiler for 6502 based computers.
It works also with the oric.
Linux : install cc65 package and cc65-atmos package
.export _print_char .import popa ; import internal popa primitive ; print_char(char car) when function called, cc65 calls a pusha (8 bits) primitive, which push parameter car on stack, last parameter push is the first pulled _print_char: jsr popa ; Fetch car value sta $bb80 ; put it on the screen rts
These primitives are defined in libsrc/runtine/zeropage.s of cc65
sp: .res 2 ; Stack pointer sreg: .res 2 ; Secondary register/high 16 bit for longs regsave: .res 4 ; slot to save/restore (E)AX into ptr1: .res 2 ptr2: .res 2 ptr3: .res 2 ptr4: .res 2 tmp1: .res 1 tmp2: .res 1 tmp3: .res 1 tmp4: .res 1 regbank: .res 6 ; 6 byte register bank