[comp.sys.m6809] SETDP directive

mcrw@hobbit.gandalf.ca (Mark Woodward) (04/05/91)

Hi,

I'm trying to compile a 6809 src file with the motorola cross assembler.
I run across a small problem with SETDP $C0. The docs says that its not
supported but to use the <> convention. Anyone got any ideas or a suggestion
as to a work around. Everything else in the file compiles once I remove the 
SETDP.
Any help would be appreciated....

--== Mark ==--

Disclaimer: 'You can take a horse to water... but a pencil must be lead!'
-----------------------------------------------------------------------------
Gandalf Data Ltd.    Tel: (613)723-6500 Ext 8702
130 Colonnade Rd S.  Fax: (613)226-1717
Nepean, Ontario     
Canada K2E 7M4     email: mcrw@hobbit.gandalf.ca 
----------------------------------------------------------------------------
-- 

Disclaimer: 'You can take a horse to water... but a pencil must be lead!'
-----------------------------------------------------------------------------
Gandalf Data Ltd.    Tel: (613)723-6500 Ext 8702

jal@acc.flint.umich.edu (John Lauro) (04/05/91)

In article <1991Apr4.201738.26003@hobbit.gandalf.ca> mcrw@hobbit.gandalf.ca (Mark Woodward) writes:
>
>Hi,
>
>I'm trying to compile a 6809 src file with the motorola cross assembler.
>I run across a small problem with SETDP $C0. The docs says that its not
>supported but to use the <> convention. Anyone got any ideas or a suggestion
>as to a work around. Everything else in the file compiles once I remove the 
>SETDP.
>Any help would be appreciated....

I don't understand the problem.  Using SETDP is an optimization and
most code that uses it, will work without it.  (Removing the SETDP
shouldn't cause any major problems, the final program will just be
slightly larger and slower.)

The work around is to use the <> convention on the instructions the
assembler would have normally saved one byte on.  (Of course, simply
removing SETDP is also a work around.)  

Note: I haven't programmed the 6809 in about 3 years, and may be
getting something confused.

   - John_Lauor@ub.cc.umich.edu

pete@wlbr.imsd.contel.com (Pete Lyall) (04/05/91)

What's the matter with using the '<' notation? Example

	lda #PAGENUM
	tfr a,dp
	lda <5

	or 

	lda #PAGENUM
	tfr a,dp
	lda <woof

The first will load the A register with location 5 from the 256 byte
page pointed to by the direct page register (DP).

The second does the same thing, only it uses the symbolic address
'woof'.

Pete Lyall

-- 
Pete Lyall [GTE]   Compuserve: 76703,4230   Internet: pete@wlbr.imsd.contel.com
                UUCP: {hacgate,jplgodo,voder}!wlbr!pete 
"... So I picked up my pride from beneath the pay phone, and combed his breath 
right outta my hair. And sometimes, it's not so easy ..." J. Hendrix/My Friend