Ejemplo n.º 1
0
        public ushort[] Assemble(AssemblyContext ctx)
        {
            ctx.FullyResolvedLabels = text.Labels.Concat(globals.Labels).ToList();

            return text.Assemble(ctx)
                .Concat(globals.Assemble(ctx))
                .ToArray();
        }
Ejemplo n.º 2
0
        public ushort[] Assemble(AssemblyContext ctx)
        {
            var image = new ushort[instructions.AssembledLength()];
            ushort memoryIndex = 0;

            foreach (var instruction in instructions)
            {
                Buffer.BlockCopy(instruction.Assemble(ctx), 0, image, memoryIndex * 2, instruction.AssembledLength * 2);
                memoryIndex += instruction.AssembledLength;
            }

            return image;
        }
Ejemplo n.º 3
0
        public ushort[] Assemble(AssemblyContext ctx)
        {
            ctx.FullyResolvedLabels = text.Labels.Resolve(0).ToList();

            return text.Assemble(ctx);
        }
Ejemplo n.º 4
0
 public ushort[] Assemble(AssemblyContext ctx)
 {
     throw new NotImplementedException();
 }