Re: [bascom] re:saving regs


From "David H Lawrence" <david_hl@usa.net>
Date Thu, 14 Jun 2001 08:54:11 -0700

Hi Robert:

You missed the brackets shown in the example.

I use extensively & just fine.

David H Lawrence

www.rhombusinc.com

----- Original Message -----
From: "robert" <euclid@catskill.net>
To: <bascom@grote.net>
Sent: Wednesday, June 13, 2001 8:53 PM
Subject: Re: [bascom] re:saving regs


> Hi David,
> Thanks for the reply. I tried this:
> dim A as byte
> ldi r16,$01
> sts A, r16
> print A
>
> The problem is Bascom doesn't recognize "A" in 'sts A, r16' as a variable.
> So the results = 0.
> Robert
>
> David H Lawrence wrote:
>
> > Hi Robert:
> >
> > Try this:
> >
> > STS {Bascom Variable},R16
> >
> > and return results with
> >
> > LDS R16,{Bascom Variable}
> >
> > and extend for other than a byte.
> >
> > David H Lawrence
> >
> > US Bascom Sales
> > www.rhombusinc.com
> >
> > ----- Original Message -----
> > From: "robert" <euclid@catskill.net>
> > To: <bascom@grote.net>
> > Sent: Tuesday, June 12, 2001 7:18 PM
> > Subject: Re: [bascom] re:saving regs
> >
> > > Hi Eric,
> > > Thanks for the reply. I'm working in Bascom with AVR's (2313's).
> > > Trying to save my assembly registers to bascom to do the math work
> > > there. I see a note in the help file with Loadadr. I tried it and the
z
> > > reg seems to work but the x comes up 00. maybe i'll play with storing
> > > the reg at a specific address.
> > > Rob
> > >
> > > Eric Le Baron wrote:
> > >
> > > > > How do I save my $asm regs to use there contents in  bascom .
> > > >
> > > > 8051 :
> > > >
> > > > Lets say you want to store the accumulator in variable Test.
> > > >
> > > > Test in internal memory:
> > > >
> > > > mov r0,#{test}
> > > > mov @r0,a
> > > >
> > > > Test in external memory:
> > > >
> > > > mov dptr,#{test}
> > > > movx @dptr,a
> > > >
> > > > Is this what you mean ?
> > > >
> > > > Eric Le Baron
> > > > Wageningen
> > > > The Netherlands
> > >
> > >
> >
> > NetZero Platinum
> > No Banner Ads and Unlimited Access
> > Sign Up Today - Only $9.95 per month!
> > http://www.netzero.net
>
>


NetZero Platinum
No Banner Ads and Unlimited Access
Sign Up Today - Only $9.95 per month!
http://www.netzero.net