OpenCores
URL https://opencores.org/ocsvn/m1_core/m1_core/trunk

Subversion Repositories m1_core

[/] [m1_core/] [trunk/] [tools/] [bin/] [dump2hex.php] - Rev 64

Go to most recent revision | Compare with Previous | Blame | View Log

#!/usr/bin/php -q
<?php

  
// Open the stdin
  
$fp fopen("php://stdin""r");

  
// Discard first lines
  
for($i=0$i<6$i++) fgets($fp);

  
// Print only the opcodes to stdout
  
while (!feof($fp)) {
    
$line fgets($fp);
    
$opcode substr($line68);
    
$caratteri strlen($opcode);
    if(
$caratteri != 0){
        echo 
$opcode."\n";
    }
    else{
        for(
$i=0$i<1$i++) fgets($fp);
     } 
    }

  
// Close the input file
  
fclose($fp);

?>
     

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.