On Thu, 26 Jun 2014 09:02:21 +0100, Tom Gardner <spamjunk@blueyonder.co.uk> wrote:>For example, given a liked-list of nodes/structs where >IX+2 contained a pointer to the next node/struct in the >linked list. You couldn't move to the next node using >LD IX,(IX+2) so IIRC IX had to moved into HL via the >stack(!), incremented, then moved back via the stack. > >That was appalling when traversing a linked list to find >the relevant node - much easier just to keep everything >in the HL register.For a single linked list, why would anyone put the link to next object pointer anywhere else than in the top of the structure at (IX) ? For double linked lists, you of course had to put the backlink at (IX+2), but how often do you need double linked lists and how often are items accessed by backlinks in normal operation ?
filling remaining array elements with fixed value
Started by ●June 12, 2014
Reply by ●June 26, 20142014-06-26
Reply by ●June 26, 20142014-06-26
On Thu, 26 Jun 2014 10:30:44 +0100, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: <Discussion about the merits of various 8-bitters>>> *All* of these processors were total *dogs* when it came to >> HLL's! :< > >I'll disagree, for embedded systems at least. The code emitted >by ?WhiteSmith's? C compiler for the Z80 was perfectly >respectable. The only graunch I remember was i/o to a computed >address having to be done by constructing the code on the stack, >then executing it.I still think that the PL/M-80 for 8080/8085 was a reasonable HLL at the time. Of course, one can argue, are PL/M-80/86 or C HLLs :-) Today, a C-compiler for PICs is useful, so you do not have to write everything in the awkward assembler. The nice thing about any high/intermediate level languages compared to most assemblers is that you can create easily readable control blocks (if/then/else and for/while/loop).
Reply by ●June 26, 20142014-06-26
On 26/06/14 10:40, upsidedown@downunder.com wrote:> On Thu, 26 Jun 2014 09:02:21 +0100, Tom Gardner > <spamjunk@blueyonder.co.uk> wrote: > >> For example, given a liked-list of nodes/structs where >> IX+2 contained a pointer to the next node/struct in the >> linked list. You couldn't move to the next node using >> LD IX,(IX+2) so IIRC IX had to moved into HL via the >> stack(!), incremented, then moved back via the stack. >> >> That was appalling when traversing a linked list to find >> the relevant node - much easier just to keep everything >> in the HL register. > > For a single linked list, why would anyone put the link to next object > pointer anywhere else than in the top of the structure at (IX) ? > > For double linked lists, you of course had to put the backlink at > (IX+2), but how often do you need double linked lists and how often > are items accessed by backlinks in normal operation ?I can't remember the details, but I expect it was (or I was anticipating) a doubly linked list or a node being in multiple lists. I can't recall if having the link in (IX+0) made the code significantly simpler or faster. Either way, my conclusion was that the space/time tradeoff didn't favour the Z80 over the 8080 - although the code was, arguably, a bit more readable in come circumstances. Later, I ignored the 8088's segments and Intel's insistence that it was a transparent migration to 80286 and 80386. A few years later microsoft showed how painful it was. Quelle surprise.
Reply by ●June 26, 20142014-06-26
On 2014-06-25, Don Y <this@is.not.me.com> wrote:> Hi Simon, > > [apologies for forgetting this greeting on my previous post :< ] > > On 6/25/2014 12:55 PM, Simon Clubley wrote: > >>> >>> This is true of other languages, as well. E.g., foo =- 2; >>> >>> Every language (tool) you rely upon in a project creates a dependency >>> on that tool and the staff who must be able to *use* it. Try taking >>> someone accustomed to (i.e., recent grad) C11 and sit them down in >>> front of a C89 codebase WITH C89 TOOLS (because your industry requires >>> tools to be formally certified prior to use). They will spend >>> countless hours wondering why their "perfect" code is throwing >>> compiler errors. >> >> Oh, that could be interesting. :-) > > You have an odd definition of "interesting"! :> I would > use a phrase more along the lines of "<Fexpletive> annoying!" >Another loss of British subtlety when expressed in written text. :-) Such a statement really means: you sit down as an observer and then observe the sparks start to fly as the sequence of events starts to unfold. :-)> > E.g., nowadays, a "kid" (new grad) might be startled to encounter > 16b int's. And, at a complete *loss* to understand why his code > is compiling yet *crashing* -- until this is made evident to him. >Twenty years from now, will new people be startled to encounter 32 bit integers ?>> >> I'll admit I didn't realise the 6502 was still around - I last used >> it back in the BBC Model B days (ie: my school days). At the time I >> seem to remember preferring the Z80 (can't remember why) although >> some classmates seemed to prefer the 6502 architecture. [*] > > It's the essence of the Moto v Intel argument (in that time frame). > Lots of registers or *few* registers (with a "fast access" bank > of memory). I have a particular fondness for the Z80/180/etc. > but admit it is a helluva kludge. For its generation, it seemed > to have "the right number" of registers -- you weren't continually > doing loads and stores from A/B, etc. >The other postings are bringing back memories of syntax long since forgotten by me.> The 6502, OTOH, is a tiny, relatively clean architecture (if you're > discussing "programmable calculators" :> ) > >> What is the 6502 still used in ? > > The folks that have inquired most in recent memory have been > split between military and (very) high-volume consumer goods. > E.g., put the processor on a tiny die with whatever other > mixed mode stuff you need and have a true "single chip" > solution to <whatever> problem. >Interesting. I looked on Farnell's website, and could see the Z80 was still available, but I could find no trace of the 6502. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
Reply by ●June 26, 20142014-06-26
On Thu, 26 Jun 2014 12:13:16 +0000 (UTC), Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:> >> >> E.g., nowadays, a "kid" (new grad) might be startled to encounter >> 16b int's. And, at a complete *loss* to understand why his code >> is compiling yet *crashing* -- until this is made evident to him. >> > >Twenty years from now, will new people be startled to encounter 32 bit >integers ?Be realistic. 16 bits (4 decimal digits) was on the low side of most real word applicatications, 24 bits (7 decimal digits) would have been enough for most real world problems, while 32 bits (9 decimal digits) is far enough for most day to day applications.
Reply by ●June 26, 20142014-06-26
Hi Simon, On 6/26/2014 5:13 AM, Simon Clubley wrote:> On 2014-06-25, Don Y<this@is.not.me.com> wrote:>>>> Every language (tool) you rely upon in a project creates a dependency >>>> on that tool and the staff who must be able to *use* it. Try taking >>>> someone accustomed to (i.e., recent grad) C11 and sit them down in >>>> front of a C89 codebase WITH C89 TOOLS (because your industry requires >>>> tools to be formally certified prior to use). They will spend >>>> countless hours wondering why their "perfect" code is throwing >>>> compiler errors. >>> >>> Oh, that could be interesting. :-) >> >> You have an odd definition of "interesting"! :> I would >> use a phrase more along the lines of "<Fexpletive> annoying!"<grin> By that notion, having a root canal would be "entertaining"!> Another loss of British subtlety when expressed in written text. :-) > Such a statement really means: you sit down as an observer and then > observe the sparks start to fly as the sequence of events starts to > unfold. :-) > >> E.g., nowadays, a "kid" (new grad) might be startled to encounter >> 16b int's. And, at a complete *loss* to understand why his code >> is compiling yet *crashing* -- until this is made evident to him. > > Twenty years from now, will new people be startled to encounter 32 bit > integers ?I suspect not. 32b is a rather impressive size for an integer datum. Instead, I think the surprise may be NOT finding hardware floating point support, etc. E.g., Limbo initially tried the "Why use lead when you can use gold?" attitude wrt data sizes. Then, scaled back on this due to the present day practicalities (i.e., "gold" is still expensive!)>>> I'll admit I didn't realise the 6502 was still around - I last used >>> it back in the BBC Model B days (ie: my school days). At the time I >>> seem to remember preferring the Z80 (can't remember why) although >>> some classmates seemed to prefer the 6502 architecture. [*] >> >> It's the essence of the Moto v Intel argument (in that time frame). >> Lots of registers or *few* registers (with a "fast access" bank >> of memory). I have a particular fondness for the Z80/180/etc. >> but admit it is a helluva kludge. For its generation, it seemed >> to have "the right number" of registers -- you weren't continually >> doing loads and stores from A/B, etc. > > The other postings are bringing back memories of syntax long since > forgotten by me.I lament the loss of *choice*. There were a lot more options available "back then" wrt CPU, etc. Many were technically far better than their survivors! So much for the "wisdom of the Market"! Of course, some were also incredibly costly to produce! (F11?) And, some made very bad predictions as to where technology would be headed (e.g., the 99000's WSP).>> The 6502, OTOH, is a tiny, relatively clean architecture (if you're >> discussing "programmable calculators" :> ) >> >>> What is the 6502 still used in ? >> >> The folks that have inquired most in recent memory have been >> split between military and (very) high-volume consumer goods. >> E.g., put the processor on a tiny die with whatever other >> mixed mode stuff you need and have a true "single chip" >> solution to<whatever> problem. > > Interesting. I looked on Farnell's website, and could see the Z80 was > still available, but I could find no trace of the 6502.I think it exists as a core, nowadays. Or, as bastardized variants (e.g., isn't the 2A03 a 6502?). It was a *really* tiny core -- like 3500 Q's. When you consider the i4004 was *almost* that big (ca. 2500 Q's) the difference in capability and ease of use was night and day! (*TRUST* me on that one! :> )
Reply by ●June 26, 20142014-06-26
On 2014-06-26, Don Y <this@is.not.me.com> wrote:> [The other best thing was using the alternate register set for very > low latency IRQ's!]I worked on firmware for one product (a cellular phone), where we used the two Z80 register sets to implment very low overhead co-routines. It was pretty slick... -- Grant Edwards grant.b.edwards Yow! Do you guys know we at just passed thru a BLACK gmail.com HOLE in space?
Reply by ●June 26, 20142014-06-26
On 2014-06-26, Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:>>> What is the 6502 still used in ? >> >> The folks that have inquired most in recent memory have been >> split between military and (very) high-volume consumer goods. >> E.g., put the processor on a tiny die with whatever other >> mixed mode stuff you need and have a true "single chip" >> solution to <whatever> problem. >> > > Interesting. I looked on Farnell's website, and could see the Z80 was > still available, but I could find no trace of the 6502.The only people I've heard of using the 6502 in recent years were using it in toys as a custom-die-on-board under a glob of black epoxy. -- Grant Edwards grant.b.edwards Yow! Am I SHOPLIFTING? at gmail.com
Reply by ●June 26, 20142014-06-26
On 2014-06-26, upsidedown@downunder.com <upsidedown@downunder.com> wrote:> On Thu, 26 Jun 2014 12:13:16 +0000 (UTC), Simon Clubley ><clubley@remove_me.eisner.decus.org-Earth.UFP> wrote: > >> >>> >>> E.g., nowadays, a "kid" (new grad) might be startled to encounter >>> 16b int's. And, at a complete *loss* to understand why his code >>> is compiling yet *crashing* -- until this is made evident to him. >>> >> >>Twenty years from now, will new people be startled to encounter 32 bit >>integers ? > > Be realistic. >I was. :-) However, the word "default" is missing from that reply which is what I really meant. I also mentally inserted the word "default" into Don's comment and replied to that. People obviously still (to use Don's example) use 16 bit integers today but it's not the default integer size unless you are working on certain microcontroller platforms. However, back in the early 1990s it was still a common default integer size, but that doesn't change the fact a default size of 16 bits for int would be something most newcomers today simply would not expect. Likewise, after 64-bit platforms have been established for a couple of decades, will it still make any sense to have 32-bits as a default integer size ? Simon.> 16 bits (4 decimal digits) was on the low side of most real word > applicatications, 24 bits (7 decimal digits) would have been enough > for most real world problems, while 32 bits (9 decimal digits) is far > enough for most day to day applications. >-- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
Reply by ●June 26, 20142014-06-26
On 2014-06-26, Don Y <this@is.not.me.com> wrote:> Hi Simon, > > On 6/26/2014 5:13 AM, Simon Clubley wrote: >> On 2014-06-25, Don Y<this@is.not.me.com> wrote: >>> E.g., nowadays, a "kid" (new grad) might be startled to encounter >>> 16b int's. And, at a complete *loss* to understand why his code >>> is compiling yet *crashing* -- until this is made evident to him. >> >> Twenty years from now, will new people be startled to encounter 32 bit >> integers ? > > I suspect not. 32b is a rather impressive size for an integer datum. > Instead, I think the surprise may be NOT finding hardware floating > point support, etc. >I've just mentioned in another post what I meant was 32 bit _default_ integer sizes.> > And, some made very bad predictions as to where technology would > be headed (e.g., the 99000's WSP). >That's still true today, ie: IA-64. (Yes, VMS is a part of my day job.)>>> The 6502, OTOH, is a tiny, relatively clean architecture (if you're >>> discussing "programmable calculators" :> ) >>> >>>> What is the 6502 still used in ? >>> >>> The folks that have inquired most in recent memory have been >>> split between military and (very) high-volume consumer goods. >>> E.g., put the processor on a tiny die with whatever other >>> mixed mode stuff you need and have a true "single chip" >>> solution to<whatever> problem. >> >> Interesting. I looked on Farnell's website, and could see the Z80 was >> still available, but I could find no trace of the 6502. > > I think it exists as a core, nowadays. Or, as bastardized variants > (e.g., isn't the 2A03 a 6502?). >According to Wikipedia, that MCU (which I didn't know about until now) was discontinued in 1994, but yes, it was a 6502. There's also a number of other 6502 variants listed: http://en.wikipedia.org/wiki/Ricoh_2A03 Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world







