If you have a fixed number of primitive functions that you want to call from your scripting language, you can just add instructions in your VM for them. See for instance Betz, "Embedded languages", Byte 13 #12 (Nov 1988) 409–416 (if you can find a copy).
However, it is more flexible to bind the names at run time. For this, you need to implement an environment for holding global variables and functions and an API to register them from C. In all, a sizeable piece of design and work. See for instance how Lua handles this in Passing a Language through the Eye of a Needle.