20 lines
421 B
PHP
20 lines
421 B
PHP
|
<?php
|
||
|
require_once("vendor/autoload.php");
|
||
|
|
||
|
|
||
|
use Monolog\Level;
|
||
|
use Monolog\Logger;
|
||
|
use Monolog\Handler\StreamHandler;
|
||
|
use Monolog\Handler\FirePHPHandler;
|
||
|
|
||
|
// Create the logger
|
||
|
$logger = new Logger('simavrphp');
|
||
|
// Now add some handlers
|
||
|
$logger->pushHandler(new StreamHandler('php://stderr'));
|
||
|
|
||
|
$avr = new SimAVRPHP\AVR($logger);
|
||
|
$mem = file_get_contents($argv[1]);
|
||
|
$avr->setMemory($mem);
|
||
|
while(true){
|
||
|
$avr->step();
|
||
|
}
|