Skip to content

Latest commit

 

History

History
36 lines (30 loc) · 543 Bytes

README.md

File metadata and controls

36 lines (30 loc) · 543 Bytes

Formal languages course

Assembler interpreter (see here)

Example program:

MOV A, 0;
MOV CX, [0];

cycle:
    CMP CX, 0;
    JE end;
    ADD A, [CX];
    DEC CX;
    JMP cycle;
end:
    PRINT A;
    ret;
Interpreter of a language (see here)

Example program:

x := 1;
y := not y;
print y;
z := (x or y) and not 0;
print z;

print 1 xor 0;
print (1 xor ((1 or 1 xor 0 and 1)));
print not 1 xor 0 and 1;
print (not 1 xor 0) and 1;
print not (1 xor 0) and 1;