Aufbau der Maschine
pattern = 32bit wort
links höchstwertige bit
8 32bit-Register
max. 2^32 durchnummerierte Arrays, die 32bit-Worte enthalten
im Array mit Nummer 0 steht das Programm
character = 8bit
Initialzustand:
das 0-Array wird von einer Programm-Rolle geladen
alle Register sind 0
der Program Counter (PC) ist 0 (zeigt auf das erste Feld im 0-Array)
Aufbau eines MaschinenWortes:
bits 31-28 → Operator
bits 27- →
bits 8-6 → Register A
bits 5-3 → Register B
bits 2-0 → Register C
Operatoren
#0. if (C != 0) A=B;
#1. A = Array(B)
C
;
#2. Array(A)
B
= C;
#3. A = (B + C) % 2^32
#4. A = (B * C) % 2^32
#5. if (C != 0) A = (B / C);
#6. A = not(B and C)
#7. stop();
#8. B = new Array with size C and initialized with 0s;
#9. Array.free(C);
#10. if(0 ⇐ C ⇐ 255) print(C);
#11. if (!
EOF
) C = blocking_input(); else C = (2^32-1);
#12. 0-Array = Array.copy(B); PC = C;
computing
,
programming contests
,
haskell