
J'obtient ce plantage que ce soit en uitlisant HomeExecute ou le lanceur de la faq de TIGCC

De plus en lançant le ppg avec ttstart, de la ligne de commande y'a pas de problème
// Lancement d'un prog (tiré de la FAQ de TIGCC)
void launch(const char *prog)
{
HANDLE h;
TRY
push_parse_text(prog);
h=HS_popEStack();
NG_execute(h, FALSE);
HeapFree(h);
ONERR
ST_helpMsg("Lancement impossible");
ENDTRY
}
slubman
a écrit : Le ONERR est la pour ces cas la quand même???
Kevin Kofler a écrit :
Utiliser HS_popEstack dans un TSR est une très mauvaise idée, parce que ce ROM_CALL prélève tout le contenu de la pile d'expressions, même ce qui pourrait y avoir été mis par AMS!
ExtendeD
a écrit : Mais pourquoi dans un programme normal ça ne gène pas ?
Et comment faire à part en executant le programme directement (en désarchivant, Ex_patchant, ...) ?
ID utilise ça
lea end_of_name(pc),a0 move.b #'(',(a0) move.b #')',1(a0) lt: tst.b -(a0) bne lt pea 1(a0) move.l push_parse_text*4(a6),a0 ;push it and parse it jsr (a0) lea end_of_name(pc),a0 clr.b (a0) addq.l #6,a7 ;reset the stack tst.w d0 ;test for error bne.s no_error2 dc.w $A38E ;throw an error no_error2: move.l top_estack*4(a6),a0 move.w 2(a0),d3 ;get top of estack as a word sub.w a2,d3 ;get the difference from the old top of estack addq.w #2,d3 ;increase it move.w d3,-(a7) ;put it onto the stack clr.w -(a7) ;turn word into a long subq.w #2,d3 ;decrease d3 move.l HeapAllocHigh*4(a6),a0 jsr (a0) ;allocate memory move.w d0,-62(a5) ;put the allocated handle into the save position move.w d0,-(a7) move.l HLock*4(a6),a0 ;gratuitously call heap lock jsr (a0) move.w d3,(a0)+ ;will be offset to the tag move.w d3,-(a7) ;place size as a long on the stack clr.w -(a7) pea 1(a2) ;place the source move.l a0,-(a7) ;place the destination move.l memcpy*4(a6),a0 ;copy memory jsr (a0) move.w -62(a5),-(a7) ;put handle on the stack move.l HeapUnlock*4(a6),a0 jsr (a0) clr.w -(a7) ;executing flags move.w -62(a5),-(a7) ;handl of stuff to execute move.l NG_execute*4(a6),a0 ;ng_execute jsr (a0) move.l HeapFree*4(a6),a0 ;heapfree jsr (a0)