[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Binutils 2.18 + GCC 4.2.3



Keith Scroggins wrote:
I'm actually unsure who is the culprit of the trouble at this point.

Here is another beautiful program. As it is pure assembly, it can't be affected by a potential MiNTLib bug ! It displays the environment variables. Because of the ARGV protocol, the command line is appended at the end, too.

Try to replace g++, ld, etc. by this program.
If something wrong is displayed, the culprit is the caller !

--
Vincent Rivière
| Display the environment variables
| By Vincent Riviere

	move.l	4(sp),a0
	move.l	44(a0),a3	|p_env
	
nxtvar:	move.l	a3,-(sp)
	move.w	#9,-(sp)
	trap	#1		|Cconws()
	addq.w	#6,sp

	move.l	#crlf,-(sp)
	move.w	#9,-(sp)
	trap	#1		|Cconws()
	addq.w	#6,sp

nxtch:	move.b	(a3)+,d0	|Skip the current variable
	bne.s	nxtch

	tst.b	(a3)		|Another variable next ?
	bne.s	nxtvar

	clr.w	-(sp)
	trap	#1		|Pterm0()

	.data
crlf:	.dc.b	13,10,0