[comp.sys.m68k] Funny M68000 programs

mat65@tukki.jyu.fi (Toivanen Jari) (11/23/88)

Here are a couple of interesting problems for all those who think they can
progam the M68000 processor family.  What does the following very interesting
program do ?

a	move.l	#b,a0
b	move.l	(a0),-(a0)
	bra	a+2

Second and perhaps kinkier question: why does the following program fail to do
the "opposite" of the first program ?

	move.l	#a,a0
a	move.l	(a0)+,(a0)

Anyone with answers, comments or fun ideas like this please email me.  I'll
summarize on the net if there is enough interest.

Otto J. Makela (with poetic license to kill), University of Jyvaskyla

InterNet: makela_otto_@jylk.jyu.fi, BitNet: MAKELA_OTTO_@FINJYU.BITNET
BBS: +358 41 211 562 (V.22bis/V.22/V.21, 24h/d)
Voice phone: +358 41 613 847
Mail: Kauppakatu 1 B 18, SF-40100 Jyvaskyla, Finland, EUROPE