/* Close the file */
fclose (F);
- Print (stdout, 1, "Loaded `%s' at $0200-$%04X\n", ProgramFile, Addr - 1);
+ Print (stderr, 1, "Loaded `%s' at $0200-$%04X\n", ProgramFile, Addr - 1);
}
ExecuteInsn ();
if (MaxCycles && (GetCycles () >= MaxCycles)) {
Error ("Maximum number of cycles reached.");
- exit (-99); /* do not ues EXIT_FAILURE to avoid conflicts with the
+ exit (-99); /* do not use EXIT_FAILURE to avoid conflicts with the
same value being used in a test program */
}
}
unsigned SP = MemReadZPWord (0x00);
unsigned Args = SP - (ArgC + 1) * 2;
- Print (stdout, 2, "PVArgs ($%04X)\n", ArgV);
+ Print (stderr, 2, "PVArgs ($%04X)\n", ArgV);
MemWriteWord (ArgV, Args);
static void PVExit (CPURegs* Regs)
{
- Print (stdout, 1, "PVExit ($%02X)\n", Regs->AC);
+ Print (stderr, 1, "PVExit ($%02X)\n", Regs->AC);
exit (Regs->AC);
}
}
while (Path[I++]);
- Print (stdout, 2, "PVOpen (\"%s\", $%04X)\n", Path, Flags);
+ Print (stderr, 2, "PVOpen (\"%s\", $%04X)\n", Path, Flags);
switch (Flags & 0x03) {
case 0x01:
unsigned FD = GetAX (Regs);
- Print (stdout, 2, "PVClose ($%04X)\n", FD);
+ Print (stderr, 2, "PVClose ($%04X)\n", FD);
RetVal = close (FD);
unsigned Buf = PopParam (2);
unsigned FD = PopParam (2);
- Print (stdout, 2, "PVRead ($%04X, $%04X, $%04X)\n", FD, Buf, Count);
+ Print (stderr, 2, "PVRead ($%04X, $%04X, $%04X)\n", FD, Buf, Count);
Data = xmalloc (Count);
unsigned Buf = PopParam (2);
unsigned FD = PopParam (2);
- Print (stdout, 2, "PVWrite ($%04X, $%04X, $%04X)\n", FD, Buf, Count);
+ Print (stderr, 2, "PVWrite ($%04X, $%04X, $%04X)\n", FD, Buf, Count);
Data = xmalloc (Count);
while (I < Count) {