public void labelmath2()
        {
            z80assembler z = new z80assembler();
             z.loadcommands();
             z.ramstart = 0x4000;
             z.reset();

             var wasCalled = false;
             z.DoErr += delegate(string file, int line, string description) { wasCalled = true; };

             string lines = " .global test\n nop\n nop\ntest: .db 10,20,30";

             z.parse(lines, "");
             Assert.IsFalse(wasCalled);

             z.link();
             Assert.IsFalse(wasCalled);

             lines = " .extern test\n nop\n nop\n ld a,(test+1)";

             z.partialreset();
             z.parse(lines, "");
             Assert.IsFalse(wasCalled);

             z.link();
             Assert.IsFalse(wasCalled);

             z.finallink();
             Assert.IsFalse(wasCalled);
        }
        public void globals2()
        {
            z80assembler z = new z80assembler();
             z.loadcommands();
             z.ramstart = 0x4000;
             z.reset();

             var wasCalled = false;
             z.DoErr += delegate(string file, int line, string description) { wasCalled = true; };

             string lines = " nop\n nop\n nop\ntest: ld hl,test \n nop\n";
             z.parse(lines, "");
             z.link();
             z.partialreset();

             Assert.IsFalse(wasCalled);

             lines = " .extern test \n nop\n nop\n nop\n ld hl,(test) \n nop\n";
             z.parse(lines, "");

             z.link();

             Assert.IsFalse(wasCalled);

             z.finallink();

             Assert.IsTrue(wasCalled);
        }