“In this article, I show at the transistor and silicon level. I’ve discussed the mathematics of the 6502 overflow flag earlier and thought it would be interesting to look at the actual chip-level implementation. Even though the overflow flag is a slightly obscure feature, its circuit is simple enough that it can be explained at the silicon level.”
Or is this just a slow week? Don’t get me wrong, i like reading about niche hardware, but there are chips from that time one can still buy retail and play with. for example the Z80 is still sold and used in many of the CCC MP4 players sold on Chinamart, one can pick up one of those and try hacking on that.
Heck I’m shocked somebody don’t pay one of the Chinamart vendors for a fully unlocked unit just for hacking, its not like those little Chinese companies are against hacking as all they want is to sell the hardware.
Yup, they’re still being made. http://westerndesigncenter.com/wdc/chips.cfm
isn’T the z80 the architecture with the most produced units?
It was last time I checked. See those cheap MP3/MP4 players at the checkout? Z80. Thermostats? Z80. Car Stereos and car MP3 players? Z80. Honestly they seem to use that chip more now than they did back when it was being sold in mainstream computers. Can’t say as I blame ’em, easy to program for, low power, cheap, and can play most media with the right DSP attached.
Like I said go to Chinamart or any of those Asian vendor sites and you’ll find TONS of units, from gumstick MP3s to game handhelds running the Z80 chip, some of them are pretty fricking awesome. I had one of the “MP4” players that ran on SD cards, it would play NES and Gameboy as well as play music and videos, got halfway decent battery life as well. I ended up giving it to a relative who had a sick kid, kept his mind off being sick all the time to have hundreds of games on an SD card. I’m really gonna have to get me another one one of these days, they are great little units.
Such absolute domination of Z80 is not really the case any more – a lot of Chinese media players (especially those with more processing power requirements; like, when needed for emulation, or software decoding of various media formats) come with RockChip SoCs. And that’s ARM.
http://en.wikipedia.org/wiki/Rockchip
http://www.rockbox.org/wiki/RockChip
I suppose in the simplest devices Z80 is still a fairly safe bet – like in S1 MP3 players: http://en.wikipedia.org/wiki/S1_MP3_player
Edited 2013-01-16 19:20 UTC
If I get you right then you’re missing the point. Linked article is valuable because of three reasons – nostalgia, debunking and learning value.
Nostalgia and correcting wrong information that is blindly repeated doesn’t require clarification.
Learning value does, a bit.
Binary arithmetic didn’t change since then and value of understanding quirks of its implementation on real platforms uncovers new territories for some people.
How many OSN readers know how negative numbers are represented in computer memory ?
Edited 2013-01-18 18:33 UTC
levi,
“How many OSN readers know how negative numbers are represented in computer memory ?”
*Raise hand*
OSNews isn’t as technical as I’d like it to be, but I still can appreciate articles covering the basics. Whether they’re basic or advanced, I like technical articles much more than those catering to the mobile bling crowd, but I’m surely in the minority and it hasn’t helped that there aren’t regular technical writers on staff.
Yes, 6502s are still in use today in the embedded space. Search for “65C02”, there’s also the 16-bit version “65C816”.
Edit: That was supposed to be a reply to above, I got confused with the silly interstitial log in form.
Edited 2013-01-16 13:57 UTC
Yay Kroc, you just justified all our efforts for OSNews 5 .
So, disable the “mobile” version alltogether, it’s just plain silly on my Google Nexus 7 using Opera. When I scroll at the bottom of the page, the text disapears and it’s hard to select “desktop version” at random.
Kochise
I did some brief programming on the 65816 back in the day (it was used in the Super Nintendo amongst others).
I remember going like ‘yay, a 6502 with 16-bit registers!’, unfortunately as I recall there were no separate opcodes for using 8 or 16 bit registers so instead you had to switch between 8/16-bit by setting a ‘mode’ bit in the status register with rep,sep instructions which quickly became tedious.
A lot of optimizations can be done with the CPU flags. The trouble is that high level programming languages don’t expose them, I’m looking at you C. The C language for it’s part assumes the flags don’t exist so that it doesn’t have to emulate them on architectures which don’t have them.
Something as basic as determining whether A+B has overflowed is non-trivial in C, especially considering how overflow logic gets optimized away, see this heated discussion in GCC’s bug tracker:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475
IMHO the lack of overflow flags is a deficiency of most high level languages.
Another flag we don’t see much of is the parity flag, but I’ve found a very interesting way to use parity bits to optimize multi-word multiplication algorithms. An efficient population count function would do the trick too since the least significant bit represents parity. Even though C is thought to be the best low level language, there still exists a gap between it and assembly language.
Edited 2013-01-16 15:52 UTC
It’s easy to forget with all these high level programming languages and modern operating systems used to launch the latest 3D games with the best A.I. bad guys that it’s really ones and zeroes.
Maybe for end users, but I’d have hoped that most OSNews readers found that fact hard to forget.
I hope so, but during my life I have encountered a number of IT people that were seriously lacking any knowledge beyond their own speciality.
Most don’t even know what a nibble is!
It’s a sign of the times I guess. Many financial experts use cheap calculators and have no clue how my HP-12C works, nor had they ever heard of it. I have the HP-16C too, to get back to binairy.
Aren’t they the snakes that used to inhabit that QBasic game which shipped with DOS once upon a time? :p
…In all seriousness, I can forgive people for not knowing what a nibble is; there isn’t much need to deal with half-octets in most cases. But understanding that computers process in binary is pretty much covered in the 1st chapter of “The Idiots Guide To Those Magic Computing-Boxes”.
I once did an AIX course, also present were a number of Microsoft certified chaps. They wanted to know where the GUI was, how to join a domain and if you could rename root to Administrator(!).
Most Microsoft experts know very little of Linux and what they know is wrong.
But they make good money, so it’s possible to be succesful at IT without knowing anything beyond your subject of expertice.
BTW the AIX course came down to: type ‘smit’ and fiddle around with the menu.
So THAT’s the target audience for Fedora 18!
AIX isn’t Linux (or was that a separate point you were making?)
I know what you mean though. I’m a Linux and UNIX administrator by trade, and these days I struggle to fix even basic Windows problems. Back in the days of XP (and every version of Windows that preceded it, both NT and DOS branches), I knew where everything was and how to fix many of even the most obscure of errors. But the last version of Windows I ran at home was Win2000 (I was only familiar with XP because of the similarities) and since then Vista, 7 and 8 have all changed everything around. Now I struggle even just finding networking control panels (in fact I don’t understand how people prefer the new control panel layout as it’s a nightmare if you know where you want to end up but not what hyperlinks you need to click to get there!)
Thankfully Windows does have some CLI tools which have been pretty static over the years. But there’s a hell of a lot in Windows which doesn’t have a CLI to and I end up having to guess to find the GUI on the rare occasions I am called up to fix a Windows PC (which, thankfully, is very rare these days)
The point was <anything> outside <what some people know>. Embarrassingly they thought of AIX as some kind of operating system that does all the Windows thing, only different. Zo they assumed a GUI somewhere, a domain controller, the Administrator, drive letters.
Yes, Microsoft has this annoying habit of moving stuff/settings, almost to a point it could be called deliberate hiding.
The CLI is often helpful, but sometimes thing disappear, like the ‘telnet’ command that was present in Windows 2003, but is left out by default in Windows 2008 and needs to be added.
If management really knew how UNIX/Linux/Windows worked I’m pretty sure it would have a devastating effect on Windows server market share.
Windows works well because of things like group policy and it’s integration with other products.
Integration probably works well, because of excellent development tools and people putting in the effort to integrate.
Personally, from a systems administration point of view, I really dislike Windows servers. They keep improving from version to version and they are good products, but when administering a Linux server it feels very liberating. There are so many more tools, things are much easier to figure out and logging actually yields useful information, unlike the Windows event viewer.
With Linux and UNIX I feel the limiting factor is the knowledge and skills of the administrator. The limiting factor with Windows is for a large part the number of things you are able to click on with the mouse.
But I don’t want to make this a A vs B thing. If someone is happy with Windows than good for him. A number of products only run on Windows, so it’s a valid choice on those occasions.
A lot of the Admin can be done through powershell, however I agree sometimes you just can’t seem to find things.
I am working with TFS and it just stinks compared to other source control systems, just had it completely balls up my solution in VS.
Laurence,
Yea, right? It used to be simple to direct users to the control panel and find something. Not long ago I was trying to find the control appet for a virtual CD rom, ridiculous… The wizards in place today have no hierarchy, you just dive in and start wading through wizards you don’t want until you eventually get what you want. It’s so incoherently organised and difficult to walk someone through over the phone.
Another change I find troubling are the missing icons in the icon tray, which can be extremely helpful in conveying information and controlling system daemons. We can turn it back on of course, but anyone who’s ever given instructions to a technophobe over the phone knows what a PITA it is when windows may or may not have hidden some of the tray icons.
Worse yet, this leads to application vendors engineering around the missing tray icons in windows. Take a look at skype’s solution, which makes the skype program unclosable in the application list. Click the “X”, still there. Right click the running program and click “close”, still there. This is infuriating application behaviour and yet I completely understand why they did it since they were compensating for poor windows behaviour. Users wouldn’t be able to access a skype instance under hidden tray icons.
A far better solution to clean up the icon tray without crippling it IMHO would be to stop vendors from pre-loading all the unwanted bloatware responsible for polluting the icon tray in the first place.
/rant
Edited 2013-01-17 15:07 UTC
Most of it is available via the search box once you are in the control panel.
Very interesting (and very deep) article. As someone who first learned programming on a 6502 (or rather 6510 as it was on a Commodore 64) I never even remotely considered how this worked, just that it did.
I found both this article and the author’s article about the mathematics of the flag to be very interesting. Thank you for linking to them!
This brings back memories. The VIC-20 was my first computer, and several of the popular competitors used the 6502 also. I quickly got into machine/assembly language programming, and even wrote a couple of articles for Commodore’s magazines at the time. Those were the days… ;^)