code wiki / _hdl_build / _pe_stealth_test.nx
_pe_stealth_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_stealth.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] = 1
10 ev[4] = 2
11 ev[5] = 1
12 ev[6] = 2
13 ev[7] = 1
14 if _pe_stealth_run(ev, 8, 0) == 2 {
15 if _pe_stealth_step(0, 2) == 0 - 1 {
16 if _pe_stealth_step(5, 0) == 0 - 1 {
17 if _pe_stealth_run(ev, 8, 0) == 2 { sys_exit(0) } } } }
18 sys_exit(1)
19 return 1
20}