From: krw on
In article <48C5F151.67347D1C(a)hotmail.com>,
rabbitsfriendsandrelations(a)hotmail.com says...
>
>
> krw wrote:
>
> > rabbitsfriendsandrelations(a)hotmail.com says...
> > > Joerg wrote:
> > > > Rich Grise wrote:
> > > > > TT_Man wrote:
> > > > >> ">>
> > > > >>>>>> I think he said it was all written in asssembler <yuk>.
> > > > >>>>> On an 8051, asm is really the way to go. The OP was making comments
> > > > >>>>> about DPTR so I suspected asm but vagueness of his descriptions
> > > > >>>>> sounded like a C programmer who doesn't really know what is going on
> > > > >>>>> under the hood. Many C compilers overlay variables on the 8051 if he
> > > > >>>>> is doing interrupts in C code he may be running a routine in the
> > > > >>>>> interrupt code that overlays one of his variables.
> > > > >>>> Not a prayer in hell 100% assembler. :)
> > > > >>> Are you using interrupts?
> > > > >> Everything is interrupt driven. Processor spends 99% in sleep mode.Int
> > > > >> routines set flags and the background processes flags, then goes back to
> > > > >> sleep. Dual 3 of 5 uarts are processed with 125uS RTC.
> > > > >
> > > > > This raises a BIG red flag for me - how long does the uP take to come out
> > > > > of sleep mode? How's the interrupt latency? Did it used to block other
> > > > > interrupts, or could they be stepping on each other?
> > > >
> > > > This is done all the time. First time I used the PCON features on a
> > > > 88C51 was in the early 90's. You have to make sure it does a controlled
> > > > wake up (socks, shoes, brush teeth, etc.) and know the time it takes.
> > > > When you build analog/RF stuff where there needs to be radio silence
> > > > you've got no other choice.
> > >
> > > And IIRC, the recent iterations of 8051 variants have improved the sleep etc
> > > function. It used to be almost useless.
> >
> > I used the sleep function on the 87FC51 in the late '80s without too
> > much trouble (after finding that the databook was wrong). I only
> > used it under battery power where my interrupt latency wasn't a
> > problem (it only had to do intrusion alarm and housekeeping stuff).
> >
> > I rather liked the 8051, though assembler was the only way to fly on
> > such a weird architecture.
>
> Did you ever try PL/M ?

Yes, but saw no point in continuing (I did quite a bit with PLM86).
The macro assembler was just as powerful, and easier to fit code
into the weird x51 architecture..

--
Keith
From: Eeyore on


krw wrote:

> rabbitsfriendsandrelations(a)hotmail.com says...
> > krw wrote:
> > > rabbitsfriendsandrelations(a)hotmail.com says...
> > > > Joerg wrote:
> > > > > Rich Grise wrote:
> > > > > > TT_Man wrote:
> > > > > >> ">>
> > > > > >>>>>> I think he said it was all written in asssembler <yuk>.
> > > > > >>>>> On an 8051, asm is really the way to go. The OP was making comments
> > > > > >>>>> about DPTR so I suspected asm but vagueness of his descriptions
> > > > > >>>>> sounded like a C programmer who doesn't really know what is going on
> > > > > >>>>> under the hood. Many C compilers overlay variables on the 8051 if he
> > > > > >>>>> is doing interrupts in C code he may be running a routine in the
> > > > > >>>>> interrupt code that overlays one of his variables.
> > > > > >>>> Not a prayer in hell 100% assembler. :)
> > > > > >>> Are you using interrupts?
> > > > > >> Everything is interrupt driven. Processor spends 99% in sleep mode.Int
> > > > > >> routines set flags and the background processes flags, then goes back to
> > > > > >> sleep. Dual 3 of 5 uarts are processed with 125uS RTC.
> > > > > >
> > > > > > This raises a BIG red flag for me - how long does the uP take to come out
> > > > > > of sleep mode? How's the interrupt latency? Did it used to block other
> > > > > > interrupts, or could they be stepping on each other?
> > > > >
> > > > > This is done all the time. First time I used the PCON features on a
> > > > > 88C51 was in the early 90's. You have to make sure it does a controlled
> > > > > wake up (socks, shoes, brush teeth, etc.) and know the time it takes.
> > > > > When you build analog/RF stuff where there needs to be radio silence
> > > > > you've got no other choice.
> > > >
> > > > And IIRC, the recent iterations of 8051 variants have improved the sleep etc
> > > > function. It used to be almost useless.
> > >
> > > I used the sleep function on the 87FC51 in the late '80s without too
> > > much trouble (after finding that the databook was wrong). I only
> > > used it under battery power where my interrupt latency wasn't a
> > > problem (it only had to do intrusion alarm and housekeeping stuff).
> > >
> > > I rather liked the 8051, though assembler was the only way to fly on
> > > such a weird architecture.
> >
> > Did you ever try PL/M ?
>
> Yes, but saw no point in continuing (I did quite a bit with PLM86).
> The macro assembler was just as powerful, and easier to fit code
> into the weird x51 architecture..

The only response I can offer is that PL/M51 seems a doddle to me. It was just so nice
to use. It had aspects of a HLL mixed with near ASM commands. Can't beat that in my
book.

It's a treat IMHO.

Graham

From: MooseFET on
On Sep 11, 3:05 pm, krw <k...(a)att.bizzzzzzzzzz> wrote:
[....]
> > In the ASM51, you could run with no declared bank by not putting a
> > USING into the code.  This is handy when you want to make code that is
> > bank independent.
>
> > My 32 bit math library is bank independent so it can be used in
> > interrupts etc.
>
> As long as R0-7 isn't used there is no problem.

You can use R0-7 if you never absolutely address them as AR0-7. Since
all instructions that use the registers, use the bank selection, it
works nicely. The 64 / 32 = 32,32 divide uses every register. R0
points to the 64 bit area and R1 points to the 32 bit area. The
others hold counters and saved pointers etc.

From: krw on
In article <48CA2994.E5DD04FC(a)hotmail.com>,
rabbitsfriendsandrelations(a)hotmail.com says...
>
>
> krw wrote:
>
> > rabbitsfriendsandrelations(a)hotmail.com says...
> > > krw wrote:
> > > > rabbitsfriendsandrelations(a)hotmail.com says...
> > > > > krw wrote:
> > > > > > rabbitsfriendsandrelations(a)hotmail.com says...
> > > > > > > krw wrote:
> > > > > > >
> > > > > > > > There is nothing wrong with PL/M, other than there is hasn't been
> > > > > > > > support for it for a quarter century.
> > > > > > >
> > > > > > > What would it need support for ?
> > > > > >
> > > > > > Bugs (the OS variety, if nothing else). I don't use orphanware on
> > > > > > new projects. I don't need to add risk to projects.
> > > > >
> > > > > Which bugs would those be ? The product is so mature it's untrue.
> > > >
> > > > Try reading. I can't take the risk of bugs cropping up in
> > > > unsupported software. If there are no bugs in the compiler (don't
> > > > believe it) Windows will install them.
> > >
> > > Ir runs under DOS.
> >
> > ...assuming DOS still runs. You do like to take risks!
>
> What a silly comment. DOS is the only stable product ever to come from Microsoft.

You got a USB driver for DOS?

> NO risks whatever plus the compile time on a modern PC is in the blink of an
> eyelid. Shame really since even with fast ATs it was time enough to go get a
> coffee.
>
> I can remember when applications NEVER crashed.

Irrelevant. That was then.

--
Keith
From: krw on
In article <48CA2B6C.7E8E3B41(a)hotmail.com>,
rabbitsfriendsandrelations(a)hotmail.com says...
>
>
> krw wrote:
>
> > kensmith(a)rahul.net says...
> > > krw <k...(a)att.bizzzzzzzzzz> wrote:
> > > > rabbitsfriendsandrelati...(a)hotmail.com says...
> > > > > krw wrote:
> > > > > > rabbitsfriendsandrelati...(a)hotmail.com says...
> > > > > > > krw wrote:
> > > >
> > > > > > > > You don't do subroutines or interrupts?
> > > >
> > > > > > > declare procedure XYZ interrupt(1) using 1; (register bank 1) MAIN > > > > >
> > defaults to register bank zero.
> > > >
> > > > > > > code
> > > >
> > > > > > > end;
> > > >
> > > > > > > For example. The interrupt number defines the int source.
> > > >
> > > > > > Return address? USING only declares the register bank, it doesn't
> > > > > > set it.
> > > >
> > > > > Uh ? Bloody well does unless you have a different understanding of 'does' to me.
> > > >
> > > > Not when I was using Intel's software. USING was only a directive
> > > > to get the compiler to point R0-7 to the right place. It didn't
> > > > actually load the pointers selecting the bank.
> > >
> > > You remember wrong. USING tells the compiler what to assume is in the
> > > PSW.4, PSW.3 bits.
> >
> > Right, it doesn't actually point R0-7 to the appropriate hardware.
>
> Well, I can tell you it works or hundreds of thousands of products out there would be having awful
> problems.
>
> When developing code I use an issue number like 0.3 for beta releases. Then 1.x for production
> release etc. A major revision would take it 2.0 etc. One product we launched with a version 0.9
> expecting *someone* to report a bug so we could be smug and then up it to 1.0 for production. But
> no-one ever did find a bug, so for its entire lifetime this product was shipped with version 0.9
> software ! Makes me chuckle every time that does. Furthermore it even announced it on the VFD
> display.
>
>
> > > In PLM it most likely also results in a move into
> > > the PSW.
> >
> > Not that I remember, though I didn't use PLM/51 very long. I saw no
> > advantage over assembler, armed with suitable macros.
>
> Speed of writing code. Excellent readability, no need to track memory freed by temporary variables
> resulting in superb memory usage, you name it

No speed advantage at all, for a half-competent assembly programmer.

--
Keith