simplified mapping of builtin functions to just a jsr

This commit is contained in:
Irmen de Jong 2019-08-01 21:03:21 +02:00
parent 6394841041
commit b740b079db

View File

@ -56,15 +56,10 @@ internal class BuiltinFunctionsAsmGen(private val program: Program,
translateFunctionArguments(fcall.arglist) translateFunctionArguments(fcall.arglist)
asmgen.out(" inx | lda $ESTACK_LO_HEX,x | sta $ESTACK_HI_PLUS1_HEX,x") asmgen.out(" inx | lda $ESTACK_LO_HEX,x | sta $ESTACK_HI_PLUS1_HEX,x")
} }
"memset" -> { else -> {
translateFunctionArguments(fcall.arglist) translateFunctionArguments(fcall.arglist)
asmgen.out(" jsr prog8lib.func_memset") asmgen.out(" jsr prog8_lib.func_$functionName")
} }
"memsetw" -> {
translateFunctionArguments(fcall.arglist)
asmgen.out(" jsr prog8lib.func_memsetw")
}
else -> TODO("builtin function $functionName")
} }
} }