private void print(String what, ASTNode where) { String addr = StringUtil.addrToString(segment.getCurrentAddress()); modulePrinter.println( segment.getName() + " @ " + addr + ": " + what + " on line " + where.getLeftMostToken().beginLine); }
protected void addItem(Item i) { itemList.add(i); segment.advance(i.itemSize()); }
// .byte directive public void reserveBytes(Expr e, Expr f) { // TODO: fill section with particular value int result = e.evaluate(segment.getCurrentAddress(), this); modulePrinter.println("reserveBytes(" + e + ") -> " + result); addItem(new Item.UninitializedData(segment, result)); }
// .org directive public void setOrigin(Expr.Constant c) { int result = c.evaluate(segment.getCurrentAddress(), this); modulePrinter.println("setOrigin(" + c + ") -> " + result); segment.setOrigin(result); }