NAME=load qnx
FILE=bins/qnx/test.x
CMDS=iI~bintype
EXPECT=<<EOF
bintype  QNX
EOF
RUN

NAME=entry point of qnx
FILE=bins/qnx/test.x
CMDS=ie=~addr
EXPECT=<<EOF
paddr=0x0000021c vaddr=0x0000021c haddr=-1 type=program
EOF
RUN


NAME=sections of qnx
FILE=bins/qnx/test.x
CMDS=iS
EXPECT=<<EOF
nth paddr        size vaddr       vsize perm flags type name
------------------------------------------------------------
0   0x00000044   0xf6 0x00000044   0xf6 ---- 0x0   ---- LMF_LOAD
1   0x00000152  0x6c3 0x00000152  0x6c3 ---- 0x0   ---- LMF_LOAD
EOF
RUN

NAME=sections 16 bits content
FILE=bins/qnx/test.x
CMDS=px 16 @ 0x00000152
EXPECT=<<EOF
- offset -  5253 5455 5657 5859 5A5B 5C5D 5E5F 6061  23456789ABCDEF01
0x00000152  0000 0000 0000 cd00 9090 9090 0000 0000  ................
EOF
RUN

NAME=get signature info
FILE=bins/qnx/test.x
CMDS=iC
EXPECT=<<EOF
2692336605
EOF
RUN

NAME=get header info
FILE=bins/qnx/test.x
CMDS=iH
EXPECT=<<EOF
QNX file header:
version : 0x190H
cflags : 0x16H
cpu : 0x182H
fpu : 0x0H
code_index : 0x0H
stack_index : 0x1H
heap_index : 0x1H
argv_index : 0x1H
spare2[4] : 0x0H
code_offset : 0x21cH
stack_nbytes : 0x8000H
heap_nbytes : 0x1000H
image_base : 0xa000H
spare3[2] : 0x0H
EOF
RUN
