I think you might be able to use a PROC for that. Dig through the _PROC.txt goal and see how Larian was able to define custom and specific calls