Initial implementation of instruction set
This commit is contained in:
17
bin/app.php
17
bin/app.php
@@ -1,16 +1,15 @@
|
||||
<?php
|
||||
|
||||
use Automata\Machine;
|
||||
use Automata\NC;
|
||||
use Automata\ToolData;
|
||||
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
$machine = new Machine();
|
||||
$machine->TM->write(new ToolData(1, 5500, 2));
|
||||
$machine->TM->write(new ToolData(2, 3000, 61379));
|
||||
(new ProgramLoader)->loadPrograms($machine);
|
||||
$nc = new NC();
|
||||
$nc->TM->write(new ToolData(1, 5500, 2));
|
||||
$nc->TM->write(new ToolData(2, 3000, 61379));
|
||||
(new ProgramLoader)->loadPrograms($nc);
|
||||
|
||||
$nc->loadProgram(9002);
|
||||
$nc->run();
|
||||
|
||||
$machine->loadProgram(9002);
|
||||
while ($machine->PPMC->ready()) {
|
||||
$machine->step();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user