embedded systems developers tools, cross compilers
  Home  |   SwiftX Archive  |   SwiftForth Archive  |

Re: [sftalk] Re: swiftx: 8051 gp bits

From: Leon Wagner <leon_at_forth.com>
Date: Sun, 28 Sep 2003 09:48:04 -0700

I moved the reply to this message over to the SwiftX list which is where it
belongs...

The format for individual bits in SwiftX/8051 is:

<reg> <bit>

Where <reg> is the SFR or bit-addressable RAM location ($20-$2F) and <bit>
is the bit specifier (.0 thru .7). Examples:

ACC .0 IF

$20 .1 C MOV

SwiftX does not supply a method to automatically allocate individual bit
variables. If someone comes up with one, please send it to me! You can use
the standard SwiftX memory allocation words to allocate groups of 8 (one
byte at a time) by declaring a UDATA SECTION and then using CVARIABLE (or
RESERVE or BUFFER:) to allocate blocks of these.

20 2F CDATA SECTION BITRAM

Note that the Config.f files in the SwiftX distribution leaves $20-$2F
available for application use.

> -----Original Message-----
> From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com]On Behalf
> Of Appert, Kevin
> Sent: Friday, September 26, 2003 3:28 PM
> To: sftalk_at_forth.com
> Subject: [sftalk] Re: swiftx: 8051 gp bits
>
>
> They are commonly referred to as "The Naughty Bits" in many
> episodes of Monty Python. In Marine Research applications, they
> are called "The General Porpoise Bits".
>
> But seriously folks, I think he meant this:
> There are 128 general-purpose bit-addressable locations at
> byte addresses 20H through 2FH (8 bits/byte X 16 bytes = 128
> bits). These addresses are accessed as bytes or as bits,
> depending on the instruction. For example, to set bit 67H, the
> following instruction could be used:
> SETB 6Th
> ((Shamelessly quoted from
> http://www.ccse.kfupm.edu.sa/coe/8051fv1/8051_l.htm
>
>
>
> > -----Original Message-----
> > From: Leon Wagner [SMTP:leon_at_forth.com]
> > Sent: Friday, September 26, 2003 3:19 PM
> > To: sftalk_at_forth.com
> > Subject: [sftalk] Re: swiftx: 8051 gp bits
> >
> > What's a "general purpose" bit?
> >
> > > -----Original Message-----
> > > From: sftalk-bounce_at_forth.com
> [mailto:sftalk-bounce_at_forth.com]On Behalf
> > > Of chuck_at_sanna.com
> > > Sent: Friday, September 26, 2003 2:58 PM
> > > To: sftalk_at_forth.com
> > > Subject: [sftalk] swiftx: 8051 gp bits
> > >
> > >
> > > Hello,
> > >
> > > I'm unable to find any info in the docs or source for
> allocating and using
> > > general purpose bits in the 8051 product.
> > >
> > > I found the setb instruction, but the examples only applied
> to the special
> > > function registers, yet it is capable of setting the general
> purpose ones
> > > as well, I just don't know how to get the assembler or compiler to
> > > allocate them.
> > >
> > > Thanks,
> > >
> > > Chuck
> > >
> > >
> > >
> > > ----------------------------------------------------------------------
> > > sftalk_at_forth.com The SwiftForth programming discussion email list
> > > To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> > > For list command help, send subject "help" to sftalk-request_at_forth.com
> > > Message archives are located at http://www.forth.com/archive/sftalk
> > > ----------------------------------------------------------------------
> > > This list is a forum for SwiftForth users. For product
> support and bug
> > > reports, please send email to support_at_forth.com
> > > ----------------------------------------------------------------------
> > >
> > >
> >
> > ----------------------------------------------------------------------
> > sftalk_at_forth.com The SwiftForth programming discussion email list
> > To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> > For list command help, send subject "help" to sftalk-request_at_forth.com
> > Message archives are located at http://www.forth.com/archive/sftalk
> > ----------------------------------------------------------------------
> > This list is a forum for SwiftForth users. For product support and bug
> > reports, please send email to support_at_forth.com
> > ----------------------------------------------------------------------
> >
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and bug
> reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>

----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sun Sep 28 2003 - 09:50:50 PDT

This archive was generated by hypermail 2.2.0 : Fri Dec 05 2008 - 03:04:22 PST