Add Memory Controllers for SP and PP, add Instruction Set

This commit is contained in:
2020-05-10 21:17:12 +02:00
parent ee896160b3
commit fda22052b8
17 changed files with 189 additions and 141 deletions

View File

@@ -1,14 +1,16 @@
<?php
use Automata\Machine;
use Automata\Tool;
use Automata\ToolData;
require_once __DIR__ . '/../vendor/autoload.php';
$machine = new Machine();
$machine->toolMemory->save(new Tool(1, 5500, 2));
$machine->toolMemory->save(new Tool(2, 3000, 61379));
$machine->TM->write(new ToolData(1, 5500, 2));
$machine->TM->write(new ToolData(2, 3000, 61379));
(new ProgramLoader)->loadPrograms($machine);
$machine->loadProgram(9002);
$machine->start();
while ($machine->PPMC->ready()) {
$machine->step();
}