%import textio %import floats %import syslib %zeropage basicsafe ; Note: this program is compatible with C64 and CX16. main { sub start() { float fl fl = getfloat() floats.print_f(fl) txt.chrout('\n') testX() } sub chrin() -> ubyte { return 99 } sub getstr() -> str { @($d020)++ return "foobar" } sub getfloat() -> float { float xx xx = 123.456789 return xx } sub mcp(uword from, uword dest, ubyte length) { txt.print_uw(from) txt.print_uw(dest) txt.print_ub(length) } asmsub testX() { %asm {{ stx _saveX lda #13 jsr txt.chrout lda _saveX jsr txt.print_ub lda #13 jsr txt.chrout ldx _saveX rts _saveX .byte 0 }} } }