lsmith@CLI.COM (Larry Smith) (12/15/89)
I diddled my code a little and got a different error. So here it is:
[20] anderson:ls cat example.c
struct tty_device {
char data, ignore1, command;
};
extern struct tty_device
TTY_A, /* = 0X600000 in PROM.s */
TTY_B; /* = 0X600004 in PROM.s */
#define readB(reg) ( {asm(" moveb #%1,%0+2" : "i" (TTY_B) : "n" (reg) ); \
TTY_B.command;})
main()
{ register char c;
c = readB(3);
}
[21] anderson:ls gcc -v -s example.c
/usr/local/lib/gcc-cpp -v -undef -D__GNU__ -Dmc68000 -Dsun -Dunix -Dm68k example.c /tmp/cca24334.cpp
0: unknown flag -v
/usr/local/lib/gcc-cc1 /tmp/cca24334.cpp -quiet -dumpbase example.c -noreg -version -o /tmp/cca24334.s
GNU C version 1.18 (68k, MIT syntax) compiled by CC.
gcc: Program cc1 got fatal signal 6.
[22] anderson:ls lsmith@CLI.COM (Larry Smith) (12/15/89)
Why didn't I gather these up all at once?
The first also caused the error #6; the second did not.
----------------cut here----------------
struct tty_device {
char data, ignore1, command;
};
extern struct tty_device
TTY_A, /* = 0X600000 in PROM.s */
TTY_B; /* = 0X600004 in PROM.s */
extern char ttyAcommand;
main()
{ char c;
asm("moveb %1,%0" : "o" (TTY_A.command) : "i" (0) );
}
----------------cut here----------------
extern char ttyAcommand;
main()
{ char c;
asm("moveb %1,%0" : "o" (ttyAcommand) : "i" (0) );
}
----------------cut here----------------