635Fermer637
FarewellLe 21/05/2013 à 19:53
Tiens, faisons l'essai : gDXf

Et voici le texte pour que tu nous le montre sous OSX (et même Windows si t'as le courage grin)
code
;===============================================================================
;
;       pdtlib::ParseConfigFile
;
;	in	a1	char**	argv
;		d0.b	char	comment char
;
;		4(sp)	CMDLINE* cl
;		8(sp)	void*	 Data
;		12(sp)	char*	 SwitchesList
;		16(sp)	ushort	 (*Error)      (void* Data asm (a0),
;						char* ErrorToken (a1))
;		20(sp)	ushort	 (*ArgSwitch1) (void* Data asm (a0),
;						short Sign asm (d1.w)
;					       )
;		24(sp)	(*)	...
;
;       out
;
;       destroy std
;
;       Parse the config file of the calling program
;
;===============================================================================

	DEFINE	pdtlib@0011

	movem.l	d3-d6/a2-a3,-(sp)

	;-----------------------------------------------------------------------
	;	The reject string of strcspn is built dynamically,
	;	to include comment char
	;-----------------------------------------------------------------------

	move.l	#$20090D00,d4		; Space, htab, EOL, NULL
	move.b	d0,d4			; Comment char

	;-----------------------------------------------------------------------
	;	Write the config file name in a stack frame, stripping forlder name
	;-----------------------------------------------------------------------

	lea	-18(sp),sp
	movea.l	sp,a2
	RAMT	RAM_kernel::SystemDir
\Dir:	move.b	(a0)+,(a2)+
	bne.s	\Dir
	subq.l	#1,a2

	movea.l	(a1),a0
\Strip:	move.b	(a0)+,d0
	bne.s	\Bs
		movea.l	(a1),a0