FileWriter out = new FileWriter(filename);
for (Map.Entry<AbsoluteAddress,Instruction> entry : program.getAssemblyMap().entrySet()) {
AbsoluteAddress pc = entry.getKey();
Instruction instr = entry.getValue();
StringBuilder sb = new StringBuilder();
SymbolFinder symFinder = program.getModule(pc).getSymbolFinder();
if (symFinder.hasSymbolFor(pc)) {
sb.append(Characters.NEWLINE);
sb.append(symFinder.getSymbolFor(pc));
sb.append(":").append(Characters.NEWLINE);
}
sb.append(pc).append(":\t");
sb.append(instr.toString(pc.getValue(), symFinder));