Hi. I've shrinked a bug to the tiny piece of code bellow. Works well when compiled with VBCC but crashes on my bare A1200 with SASC ?!
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <utility/tagitem.h>
#include <exec/ports.h>
#include <dos/dos.h>
#include <dos/dostags.h>
/* Protos */
#include <clib/exec_protos.h>
#include <clib/dos_protos.h>
#include <clib/alib_protos.h>
void CllFnc(void);
int main (int argc, char **argv)
{ struct Process *Proc;
struct TagItem PrcTgs[5];
PrcTgs[0].ti_Tag = NP_Entry;
PrcTgs[0].ti_Data = (ULONG)CllFnc;
PrcTgs[1].ti_Tag = NP_Name;
PrcTgs[1].ti_Data = (ULONG)"TestProcessName";
PrcTgs[2].ti_Tag = NP_Output;
PrcTgs[2].ti_Data = Output();
PrcTgs[3].ti_Tag = NP_CloseOutput;
PrcTgs[3].ti_Data = FALSE;
PrcTgs[4].ti_Tag = TAG_DONE;
if (!(Proc = CreateNewProc(PrcTgs)))
printf("Thread creation error!!!\n");
else
printf("Thread creation successfull\n");
Delay(200); /* Wait 4 seconds. Normally a WaitPort or Wait should be used, */
exit(0); /* but this is just a shrinked piece of code to reproduce the bug */
}
/* Function caller */
void CllFnc(void)
{ Forbid();
printf("Test text working!!!\n");
}