An assembler for assembling code is disclosed. The assembly language code
includes a plurality of code blocks associated with resource-needs, such
as variables, and resources, such as registers, I/O locations, memory
locations, and coprocessors. A technology is provided that allows the
global assignment of resource-needs to resources such that run time
resource conflicts are avoided. A grammar for allowing resources to be
defined and managed, a grammar for allowing the resource-needs to be
defined and managed, a grammar providing definition of code blocks, and a
grammar for associating resources with code blocks are also provided.