42Fermer44
deleted2Le 18/07/2009 à 22:41
J'ai un souci avec l'archivage : quand j'archive le fichier avant de l'exécuter, PedroM refuse de le lancer : "Not a program" Il s'arrête au niveau de kernel::exec. Mais il est bien créé et archivé (ls -l confirme). Si je le lance juste après en ligne de commande, il marche. Voici mon script :
:> eexec -arg 4e444e750000 -add off -arc
Error (not a program)
:> ls -l
eexec 1335 0000 F3 008dc8
off   0007 0200 F3 4a0014
:> off
=> extinction !


Voici mon code pour archiver, puis lancer le programme (a2 est un SYM_STR* sur "off", d4.w le handle du programme) :
	pea.l	ERROR_FRAME(%fp)			|*frame
	RC	ER_catch
	tst.w	%d0
	beq.s	HandlerSet
		moveq.l	#ERROR_ADD_SYM,%d7
		bra	ThrowError
HandlerSet:
	pea.l	(%a2)					|ok, we can add it
	RC	SymAdd					|create symbol
	move.l	%d0,(%sp)				|push and test its HSYM
	beq	ThrowError				|shit...
		RC	DerefSym			|get SYM_ENTRY *
		move.w	%d4,12(%a0)			|and store handle
		RC	ER_success
		bset.b	#FLAG_SYM_ADDED,%d6		|set success flag
		btst.l	#FLAG_ARC,%d6			|must archive ?
		beq.s	ExecuteFile			|no, can execute file now
			moveq.l	#ERROR_ARC_SYM,%d7
			clr.l	(%sp)			|no HSYM
			pea.l	(%a2)			|but SYM_STR *
			RC	EM_moveSymToExtMem	|push it in archive
			tst.w	%d0			|success ?
			beq	ThrowError		|no

|===============================================================
|
|	Now run the file ! No protection, no register saved etc, the kernel handles that.
|
|===============================================================
ExecuteFile:
	btst.l	#FLAG_NORUN,%d6				|dry run ?
	bne.s	Quit					|ok, quit now
	move.w	%d4,%d0					|handle, arg of kernel::exec
	jsr	KERNEL_EXEC(%fp)			|go !


Que pasa ? confus sad

(puis j'aimerais bien résoudre ça, je sors une bêta quand c'est fixé, j'ai plus que de l'optimisation à faire (parce que j'ai encore réécrit 50% depuis la dernière fois grin))