Пример #1
0
  public int getVariable(AbstractToken tok) {
    String name = labelName(tok);

    Integer v = (Integer) constants.get(name);
    if (v == null) {
      Item.Label li = (Item.Label) labels.get(name);
      if (li == null) ERROR.UnknownVariable(tok);
      if (li.segment == programSegment && !useByteAddresses) return li.getByteAddress() >> 1;
      else return li.getByteAddress();
    } else return v.intValue();
  }
Пример #2
0
  public LegacyRegister getRegister(AbstractToken tok) {
    String name = labelName(tok);
    LegacyRegister reg = LegacyRegister.getRegisterByName(name);
    if (reg == null) reg = (LegacyRegister) definitions.get(name);

    if (reg == null) ERROR.UnknownRegister(tok);
    return reg;
  }