(Item item)
| 68 | public abstract void writeHeader() throws IOException; |
| 69 | |
| 70 | public void writeSyntacticItem(Item item) throws IOException { |
| 71 | int d = out.length(); |
| 72 | // Write opcode |
| 73 | out.write_u8(item.getOpcode()); |
| 74 | // Write operands |
| 75 | writeOperands(item); |
| 76 | // Write data (if any) |
| 77 | writeData(item); |
| 78 | // |
| 79 | int size = out.length() - d; |
| 80 | record(item.getOpcode(),size); |
| 81 | // Pad to next byte boundary |
| 82 | out.pad_u8(); |
| 83 | } |
| 84 | |
| 85 | private void writeOperands(Item item) throws IOException { |
| 86 | // Determine operand layout |