private void addLabel(BufferedWriter bw, int address) throws IOException {
		// add label
		if(rom.label[address] != null || rom.labelType[address] != 0) {
			String label = rom.getLabel(address);
			if(rom.labelType[address] > 1)
				label += ": ; "+prettyPrintAddress(address);
			if(rom.labelType[address] > 2) {
				//if(addNewLine)
					bw.write("\n");
				if(rom.accesses[address] == null)
					bw.write("; no known jump sources\n");
				else {
					Iterator<Integer> ii = rom.accesses[address].iterator();
					bw.write("; known jump sources: "+prettyPrintAddress(ii.next()));
					while(ii.hasNext())
						bw.write(", "+prettyPrintAddress(ii.next()));
					bw.write("\n");
				}
			}
			bw.write(label + "\n");
		}
	}