1. A method comprising: (a) receiving a first amount of code, wherein the first amount of code includes an allocate instruction and an API (Application Programming Interface) call, wherein the allocate instruction includes a symbol, wherein the API call is a call to perform an operation on one of a plurality of non-memory resource instances, wherein the API call also includes the symbol, and wherein said one of the non-memory resource instances is indicated by the symbol of the API call; (b) replacing the API call in the first amount of code with a plurality of API instructions; (c) allocating a value to be associated with the symbol, wherein the value is one of a plurality of values, and wherein each value of the plurality of values corresponds to a respective one of the plurality of non-memory resource instances; and (d) generating a second amount of code, wherein the second amount of code includes the API instructions, and wherein the API instructions are for using the value allocated in (c) to generate an address of a register and are for using the address of the register to perform an access of the register, wherein the register is a register within said one of the non-memory resource instances.