void EmitLink(LinkRef lref)
        {
            RxLinkRef link = lref as RxLinkRef;

            link.PushOffsetPosition(curpos);
            Emit((ushort)0);
        }
        public void ResolveLink(LinkRef link)
        {
            RxLinkRef l = link as RxLinkRef;

            for (int i = 0; i < l.current; i += 2)
            {
                int offset = curpos - l.offsets [i];
                if (offset > ushort.MaxValue)
                {
                    throw new NotSupportedException();
                }
                int offsetpos = l.offsets [i + 1];
                program [offsetpos]     = (byte)offset;
                program [offsetpos + 1] = (byte)(offset >> 8);
            }
        }
        void BeginLink(LinkRef lref)
        {
            RxLinkRef link = lref as RxLinkRef;

            link.PushInstructionBase(curpos);
        }