public void AddLabel(String label) {
		for (Label lp : labels) {
			if (lp.label.equals(label)) {
				if (lp.ref == null) {
					// redefine label 
					NormalError("label " + label + 
						" redefinition line " + lp.line + 
						" and " + reader.GetLineNo());
				} else {
					// delete label
					LabelRef chain = lp.ref;
					lp.line = reader.GetLineNo();
					lp.ref = null;
					lp.jmp_addr = command_buffer.position();
					while (chain != null) {
						if (DEBUG_REF_VALUE) {
							trace("===>ref label_ref_address:" + chain.label_ref_address);
						}
						LabelRef next = chain.next;
						if (DEBUG_WRITE_LABEL) {
							trace("<<<< write address: " + chain.label_ref_address + " , value: " + command_buffer.position());
						}
						WriteIntByAddress(chain.label_ref_address, command_buffer.position());
						chain = null;
						chain = next;
					}
					if (DEBUG_REF_VALUE) {
						trace("===>set label_ref:" + label + "\t" +
								lp.line + "\t" +
								command_buffer.position());
					}
				}
				return;
			}
		}
		//new label
		labels.add(new Label(label, reader.GetLineNo(), command_buffer.position(), null)); // ncommand, null));
		if (DEBUG_REF_VALUE) {
			trace("===>new Label:" + label + "\t" + 
					reader.GetLineNo() + "\t" +
					command_buffer.position());
		}
	}