out8( ) problem

Hi there,

I am new to QNX. I wrote a very simple code to test ports. The hardware is fine since I tested it under DOS6.x and Turbo C. But the QNX would not run:

#include <stdlib.h>
#include <stdio.h>
#include <hw/inout.h>

int main(int argc, char *argv[]) {
printf(“Welcome to the Momentics IDE\n”);
out8(0X19C,0x7F);
out8(0x19A, 0x0F);
printf(“The test is done!\n”);
return EXIT_SUCCESS;
}

Actually, it would not output the second “printf”. I got the following when I perform the debug:


MsgNak received - resending
attach 217099
Warning: /cygdrive/e/QNX632/ide4-workspace/My2nd/E: No such file or directory.
Warning: /cygdrive/e/QNX632/ide4-workspace/My2nd/E: No such file or directory.
Warning: /cygdrive/e/QNX632/ide4-workspace/My2nd/E: No such file or directory.
Warning: /cygdrive/e/QNX632/ide4-workspace/My2nd/E: No such file or directory.
No symbol table is loaded. Use the “file” command.
No symbol table is loaded. Use the “file” command.
Stopped due to shared library event
No source file named My2nd.c.
No source file named My2nd.c.
Stopped due to shared library event


I wonder what’s the problem? Could anybody help ? I really appreciate that.

Regards,

Do you have sufficient rights to write to the adresses?

I think the root of the problem is that you didn’t read the documentation on out8:

qnx.com/developers/docs/6.3. … /out8.html