37Fermer39
PpHdLe 25/02/2008 à 21:50
Martial Demolins (./37) :
Je fais mal un truc ? La variable doit être créée ?


Non. Elle existe pas, c'est tout:

ShellRestartAPD:
	lea	APD_str(Pc),a2
	bsr	getenv			; getenv("apd")
	move.l	a0,d0
	beq.s	\End			; Symbol not found.
	bsr	atol			; Transform it to a number
	cmpi.w	#APD_MIN,d0		; Check if out of range
	blt.s	\End			; APD min is 10s 
	cmpi.w	#APD_MAX,d0		; APD max is 1000s
	bgt.s	\End
		mulu.w	#20,d0		; x20 -> second
		move.l	d0,-(a7)	; Push ticks time
		move.w	#2,-(a7)	; Push timer #
		bsr	OSFreeTimer	; Free APD timer
		bsr	OSRegisterTimer	; Set new value of APD
		addq.l	#6,a7		; Pop stack
\End:	rts