mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-04-20 03:03:25 -04:00
39 lines
576 B
NASM
39 lines
576 B
NASM
machine Main {
|
|
|
|
degree 16;
|
|
|
|
DifferentSignatures sub;
|
|
|
|
reg pc[@pc];
|
|
reg X[<=];
|
|
reg Y[<=];
|
|
reg A;
|
|
|
|
instr identity X -> Y = sub.identity
|
|
instr one -> Y = sub.one
|
|
instr nothing = sub.nothing
|
|
|
|
function main {
|
|
start:
|
|
A <== one();
|
|
return;
|
|
}
|
|
}
|
|
|
|
// A machine exposing functions of different signatures
|
|
machine DifferentSignatures {
|
|
|
|
reg pc[@pc];
|
|
|
|
function identity x: field -> field {
|
|
return x;
|
|
}
|
|
|
|
function one -> field {
|
|
return 1;
|
|
}
|
|
|
|
function nothing {
|
|
return;
|
|
}
|
|
} |