[comp.unix.aux] "movem.l" in AU/X's "as"

schiebel@cs.wvu.wvnet.edu (Darrell Schiebel) (04/19/91)

The assembly mnemonic in the "as" assembler with A/UX has the 
following syntax:

		movem.l EA, &I		or
		movem.l &I, EA

The only information for this instruction sayes:

"The immediate operand is a mask designating which registers are to be moved
to memory, or which are to receive memory data. Not all addressing modes are
permitted, and the correspondence between mask bits and register numbers
depends on the addressing mode."

I can find no information about what the mask looks like. The code I'm
tring to port is in HP/UX format:

	movem.l %d6-%d7/%a0-%a4,8(%a5)

I'd really appreciate it if someone could give me some pointers.


						Darrell Schiebel

						(schiebel@a.cs.wvu.wvnet.edu)
						(drs@baks.bell-atl.com)

paul@taniwha.UUCP (Paul Campbell) (04/20/91)

In article <1462@h.cs.wvu.wvnet.edu> schiebel@cs.wvu.wvnet.edu (Darrell Schiebel) writes:
>The assembly mnemonic in the "as" assembler with A/UX has the 
>following syntax:
>
>		movem.l EA, &I		or
>		movem.l &I, EA
>

I don't remember the exact syntax either - but a good way to check out
the assembler is to use the compiler to make some code (use -S) and then 
look at the results ...


	Paul

-- 
Paul Campbell    UUCP: ..!mtxinu!taniwha!paul     AppleLink: CAMPBELL.P
There once was a landlord from Berkeley,Whose apartments were rundown and dirty
He decided to run,			For the rent-board, and won!
Now his tenants are homeless and hurting.

ksand@Apple.COM (Kent Sandvik) (04/22/91)

>In article <1462@h.cs.wvu.wvnet.edu> schiebel@cs.wvu.wvnet.edu (Darrell Schiebel) writes:
>>The assembly mnemonic in the "as" assembler with A/UX has the 
>>following syntax:
>>
>>		movem.l EA, &I		or
>>		movem.l &I, EA

Yes, the non-conventional (non-MPW asm) movem is really a pain in the ***
when moving asm code from other platforms.

I did a quick check in my M68000 Programmer's Reference Manual, and 
the movem register list mask field (i.e. those registers that should
be moved) are specified in two ways. The so called control modes
and postincrement mode addresses list looks like:

15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
A7 A6 A5 A4 A3 A2 A1 A0 D7 D6 D5 D4 D3 D2 D1 D0

So syntax such as 'movem.l 4(%sp),&0x300', would mean
to fetch registers A0 and A1 (0000 0011 0000 0000)2.

Williams book "68030 Assembly Language Reference" has a good
list of things to know when moving asm code to the A/UX platform.

Kent Sandvik, DTS (developer technical sliming)

-- 
Disclaimer: Private and personal activities on USENET, non-company sponsored