Whether it is possible using Lx51 to create the User Class how it can be made in L166? In L166 creation of the User Class with a certain name is possible and then allocation of the code in this class is possible, putting
#pragma RENAMECLASS (ONE_OF_STANDART_CLASS=NEW_CLASS)
Yes, this is possible. Take a look to the Cx51 User's Guide (C51.PDF), USERCLASS directive.