コード例 #1
0
 private void emitDB() {
   int ln = operands.size();
   for (int i = 0; i < ln; i++) {
     Object o = operands.get(i);
     if (o instanceof Integer) {
       stream.write8(((Integer) o).intValue());
     } else if (o instanceof String) {
       byte[] bytes = ((String) o).getBytes();
       int bln = bytes.length;
       for (int j = 0; j < bln; j++) {
         stream.write8(bytes[j]);
       }
     } else {
       throw new IllegalArgumentException("Unknown data: " + o);
     }
   }
 }
コード例 #2
0
 private void emitRESD() {
   for (int i = 4 * ((Integer) operands.get(0)).intValue(); i-- > 0; stream.write8(0)) ;
 }