Arghhh What is wrong with this asm code? (must be something stupid...)
Yes.
move.l consolename,d1
There are two erros in this single line.
it should either read
move.l #consolename,d1
or
lea consolename(pc),a0
move.l a0,d1
First error is that you load the contents instead of the address into d1, second error is that consolename is on an odd address which makes move.l fail on a 68000 ("dos.library",0,0 are 13 bytes).
And of course I totally agree that leading error: into text is not a very user friendly handling. And I also agree that with C this would be a trivial.
#include
int main (void)
{
BPTR f;
if (f = Open("con:/[b][/b]///bla/CLOSE/WAIT",MODE_OLDFILE))
{
Write (f,"whatever",8);
Close (f);
}
return (0);
}
Bye,
Thomas