code wiki / _hdl_build / _pe_abround_test.nx
_pe_abround_test.nx source
↩ module page · 20 lines · 543 B
1// AUTHORED BY THE NISHI BUILDER (pattern: STATE_MACHINE test) -- KATs computed from the table at emit time
2import "_pe_abround.nx"
3import "nx_syscalls.nx"
4func main() -> i64 {
5 let ev: *i64 = sys_mmap(128) as *i64
6 ev[0] = 0
7 ev[1] = 1
8 ev[2] = 2
9 ev[3] = 4
10 ev[4] = 0
11 ev[5] = 1
12 ev[6] = 2
13 ev[7] = 4
14 if _pe_abround_run(ev, 8, 0) == 0 {
15 if _pe_abround_step(0, 1) == 0 - 1 {
16 if _pe_abround_step(5, 0) == 0 - 1 {
17 if _pe_abround_run(ev, 8, 0) == 0 { sys_exit(0) } } } }
18 sys_exit(1)
19 return 1
20}