指令實際上包括兩種信息即操作碼和地址碼
阿新 • • 發佈:2018-07-29
ktr lean int port origin data 指令 turn final
一條指令實際上包括兩種信息即操作碼和地址碼。操作碼(OperationCode,OP)用來表示該指令所要完成的操作(如加、減、乘、除、數據傳送等),其長度取決於指令系統中的指令條數。
地址碼用來描述該指令的操作對象,它或者直接給出操作數,或者指出操作數的存儲器地址或寄存器地址(即寄存器名)。
1 package Com.TableText; 2 3 import java.io.BufferedInputStream; 4 import java.io.BufferedOutputStream; 5 import java.io.File; 6 import java.io.FileInputStream;7 import java.io.FileOutputStream; 8 import java.util.zip.ZipEntry; 9 import java.util.zip.ZipOutputStream; 10 11 12 public class TableText_04 { 13 static final int BUFFER = 2048; 14 15 public static boolean zip( String[] filename ,String outname){ 16 17 booleantest = true; 18 try { 19 BufferedInputStream origin = null; 20 FileOutputStream dest = new FileOutputStream(outname); 21 ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream( 22 dest)); 23 byte data[] = newbyte[BUFFER]; 24 25 26 for (int i = 0; i < filename.length; i++) { 27 File file = new File(filename[i]); 28 FileInputStream fi = new FileInputStream(file); 29 origin = new BufferedInputStream(fi, BUFFER); 30 ZipEntry entry = new ZipEntry(file.getName()); 31 out.putNextEntry(entry); 32 int count; 33 while ((count = origin.read(data, 0, BUFFER)) != -1) { 34 out.write(data, 0, count); 35 } 36 origin.close(); 37 } 38 out.close(); 39 } catch (Exception e) { 40 test = false; 41 e.printStackTrace(); 42 } 43 return test; 44 } 45 46 47 public static void main(String argv[]) { 48 String[] filenames = new String[]{"H:\\ch.doc"}; 49 zip(filenames,"H:/ch.zip"); 50 } 51 }
指令實際上包括兩種信息即操作碼和地址碼