| 1 |
Test comparators in asm |
| 2 |
CLI |
| 3 |
asm - -a x86_64 -f hexfmt |
| 4 |
STDIN |
| 5 |
if ($A == 0) goto end |
| 6 |
if ($A == 0) goto end, else goto kill |
| 7 |
if ($A != 0) goto end |
| 8 |
if ($A != 0) goto end, else goto kill |
| 9 |
if ($A > 0) goto end |
| 10 |
if ($A > 0) goto end, else goto kill |
| 11 |
if ($A <= 0) goto end |
| 12 |
if ($A <= 0) goto end, else goto kill |
| 13 |
if ($A >= 0) goto end |
| 14 |
if ($A >= 0) goto end, else goto kill |
| 15 |
if ($A < 0) goto end |
| 16 |
if ($A < 0) goto end, else goto kill |
| 17 |
if ($A & 0xff) goto end |
| 18 |
if ($A & 0xff) goto end, else goto kill |
| 19 |
if !($A & 0xff) goto end |
| 20 |
if !($A & 0xff) goto end, else goto kill |
| 21 |
|
| 22 |
return ERRNO(1) # separator |
| 23 |
end: return ALLOW |
| 24 |
kill: return KILL |
| 25 |
STDOUT |
| 26 |
"\x15\x00\x10\x00\x00\x00\x00\x00", |
| 27 |
"\x15\x00\x0f\x10\x00\x00\x00\x00", |
| 28 |
"\x15\x00\x00\x0e\x00\x00\x00\x00", |
| 29 |
"\x15\x00\x0e\x0d\x00\x00\x00\x00", |
| 30 |
"\x25\x00\x0c\x00\x00\x00\x00\x00", |
| 31 |
"\x25\x00\x0b\x0c\x00\x00\x00\x00", |
| 32 |
"\x25\x00\x00\x0a\x00\x00\x00\x00", |
| 33 |
"\x25\x00\x0a\x09\x00\x00\x00\x00", |
| 34 |
"\x35\x00\x08\x00\x00\x00\x00\x00", |
| 35 |
"\x35\x00\x07\x08\x00\x00\x00\x00", |
| 36 |
"\x35\x00\x00\x06\x00\x00\x00\x00", |
| 37 |
"\x35\x00\x06\x05\x00\x00\x00\x00", |
| 38 |
"\x45\x00\x04\x00\xff\x00\x00\x00", |
| 39 |
"\x45\x00\x03\x04\xff\x00\x00\x00", |
| 40 |
"\x45\x00\x00\x02\xff\x00\x00\x00", |
| 41 |
"\x45\x00\x02\x01\xff\x00\x00\x00", |
| 42 |
"\x06\x00\x00\x00\x01\x00\x05\x00", |
| 43 |
"\x06\x00\x00\x00\x00\x00\xff\x7f", |
| 44 |
"\x06\x00\x00\x00\x00\x00\x00\x00", |