String name
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java
Objects.requireNonNull(name);

        return labels.containsKey(name)
                || macros.containsKey(name)
                || constants.containsKey(name)
                || variables.containsKey(name);
    private <T> boolean addIdentifier(Map<String, T> identifiers, T identifier, String name) {
        if (identifiers.get(name) == identifier) {
            return true;
boolean identifierExists(String name)
Label label
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java
return addIdentifier(labels, label, label.getName());
boolean addLabel(Label label)
PseudoMACRO macro
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java
return addIdentifier(macros, macro, macro.getName());
        return macros.get(name);
    public boolean addConstant(PseudoEQU constant) {
        return addIdentifier(constants, constant, constant.getName());
    public PseudoEQU getConstant(String name) {
        return constants.get(name);
    public boolean setVariable(PseudoVAR variable) {
        if (identifierExists(variable.getName()) && !variables.containsKey(variable.getName())) {
            return false;
boolean addMacro(PseudoMACRO macro)
int val
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java
return 1;
int getSize(int val)
val <= 65535 && val >= -32768
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java
return 2;
else if (val <= 65535 && val >= -32768)
val <= 16777215 && val >= -8388608
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java
return 3;
        return 4;

        if (size < neededSize) {
            size = neededSize;
else if (val <= 16777215 && val >= -8388608)
String name
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java
if (defLabels.containsKey(name)) {
            return true;
boolean idExists(String name)
Label l
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java
String n = l.getName();
        if (idExists(n) == true) {
boolean addLabelDef(Label l)
PseudoMACRO m
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java
String n = m.getName();
        if (idExists(n) == true) {
            return false;
boolean addMacroDef(PseudoMACRO m)
PseudoEQU e
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java
String n = e.getName();
        if (idExists(n) == true) {
            return false;
boolean addEquDef(PseudoEQU e)
String name
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java
return defEqus.get(name);
    // prida alebo prepise existujucu definiciu
    // pridava sa samozrejme az v pass2
    public boolean addVarDef(PseudoVAR s) {
        defVars.put(s.getName(), s);
    public PseudoVAR getVar(String name) {
        return defVars.get(name);
        defLabels.remove(name);
        defMacros.remove(name);
        defEqus.remove(name);
        defVars.remove(name);
        Iterator<?> i = defLabels.values().iterator();
        while (i.hasNext()) {
            env.addLabelDef((Label) i.next());
        i = defMacros.values().iterator();
        while (i.hasNext()) {
            env.addMacroDef((PseudoMACRO) i.next());
        i = defEqus.values().iterator();
        while (i.hasNext()) {
            env.addEquDef((PseudoEQU) i.next());
        i = defVars.values().iterator();
        while (i.hasNext()) {
            env.addVarDef((PseudoVAR) i.next());
        return (Row) passNeed.get(index);
    public void clearPassNeeds() {
        passNeed.clear();
PseudoEQU getEqu(String name)
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/tree/Address.java
return value;
int getAddress()
ArrayList<DataValue> vec
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/tree/DataNode.java
list.addAll(vec);
void addAll(ArrayList<DataValue> vec)
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/tree/Row.java
return this.current_address;
int getCurrentAddress()
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java
if (value <= 255 && value >= -128) {
            return true;
boolean is8Bit()
int val
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java
return true;
boolean is8Bit(int val)
double val
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java
return Math.log(val) / Math.log(2.0);
double log2(double val)
int val
plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java
int y = (int) (Math.ceil(log2(val + 1) / 8.0));
        return (y == 0) ? 1 : y;
        for (int j = size; j < neededSize; j++) {
            s += "00";
int getSize(int val)