Changeset 26 in XOpenSparcT1 for trunk/tools/dump2hex.php
- Timestamp:
- 04/04/11 11:58:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/dump2hex.php
r25 r26 6 6 7 7 // Discard first lines 8 for($i=0; $i< 7; $i++) fgets($fp);8 for($i=0; $i<8; $i++) fgets($fp); 9 9 10 // instruction start at address 10h 11 //echo "@ 10\n"; 12 echo "// inserisco 16 ff per partire da 10h e scrivo op4,op3,op2,op1 \n"; 13 echo "ffff\n"; 14 echo "ffff\n"; 15 echo "ffff\n"; 16 echo "ffff\n"; 17 echo "ffff\n"; 18 echo "ffff\n"; 19 echo "ffff\n"; 20 echo "ffff\n"; 21 echo "ffff\n"; 22 echo "ffff\n"; 23 echo "ffff\n"; 24 echo "ffff\n"; 25 echo "ffff\n"; 26 echo "ffff\n"; 27 echo "ffff\n"; 28 echo "ffff\n"; 10 29 // Print only the opcodes to stdout 11 30 while (!feof($fp)) { 12 31 $line = fgets($fp); 13 /*$opcode = substr($line, 8, 8); 14 $caratteri = strlen($opcode); 32 $opcode1 = substr($line, 6, 2); 33 $opcode2 = substr($line, 9, 2); 34 $opcode3 = substr($line, 12, 2); 35 $opcode4 = substr($line, 15, 2); 36 $caratteri = strlen($opcode1); 15 37 if($caratteri != 0){ 16 echo $opcode."\n"; 17 }*/ 18 19 $opcode = substr($line, 6, 2); 20 $opcode2 = substr($line, 9, 2); 21 $caratteri = strlen($opcode); 22 if($caratteri != 0){ 23 echo $opcode.$opcode2; 38 echo $opcode2.$opcode1; 39 //echo $opcode1.$opcode2; 24 40 echo "\t //".$line; 25 $opcode = substr($line, 12, 2); 26 $opcode2 = substr($line, 15, 2); 27 echo $opcode.$opcode2."\n"; 41 echo $opcode4.$opcode3."\n"; 42 //echo $opcode3.$opcode4."\n"; 28 43 } 29 44 else{
Note: See TracChangeset
for help on using the changeset viewer.