Implementation of a virtual P-code machine