|
The good old CDP1802 must be one of the oldest CPUs which still in production. I used it in my first self built computer (which still exists and works). The 1802's instruction set foreshadowed the later RISC processors and therefore is no horror at all.
For a beginner a CDP180X (all CPUs of that line had almost identical instruction sets) there can be no friendlier processor to program. A very compact instruction set, few addressing modes, 16 registers for general purpose use (just take two of them as you like as PC and SP), one single bit (DF) which elegantly serves as status flag for all processor operations...
And, as I hear, the little 'horror' still does it's job after more than 30 years in space in the Voyager probes.
And yes, it had a real hardware horror: A multiplexed address bus.
|
|
|
|
|
CDP1802 wrote: I used it in my first self built computer
My aims were somewhat grander - I managed to talk our rep into a sample of a 68000 (an 8MHz version if I recall) when they cost in the hundreds of pounds. I still have it somewhere. The outcome was somewhat poorer than yours, although I did use it to flash a LED I never got round to building the computer, bought an 8086 box instead.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
Take a look here:
http://www.cosmacelf.com/gallery.htm[^]
The first one on the second page of the gallery resembles mine, but of course no two of those machines were absolutely alike. I was a kid back then and it was the only way to get my hands on a computer. My parents did not know what to think of this, sometimes they still wonder today
|
|
|
|
|
Boy, does that bring back memories. My stepdad built one of those with a hex keypad and two digit display. We even found a Tiny Basic interpreter for it. I fat-fingered it in (all 1.5K) about three times before I got it all right. He also renovated a KSR-33 teletype as an I/O device.
The most ambitious thing John ever did with it was to write a mortgage amortization table program for it. This was a pretty neat trick, considering that Tiny Basic only gave you 26 16-bit integer variables (A through Z, of course). His program worked. I remember it chugged away, printing the table on that freight train of a teletype all night.
|
|
|
|
|
CDP1802 wrote: But I often wonder how people fare, who started out with something like .Net and Java.
"OMG! What is this? Which forum do I go to to ask for a solution for THAT!!!???"
|
|
|
|
|
|
I just looked into my last project and also found _asm there. Must be getting old
|
|
|
|
|
While we're talking, couldn't a asm programmer use inline asm{} as the entire code and claim it to be C++ code? (or something like that)
Dim SomethingAboveMyHead As LightBulb<br />
Let Go = Grip.Release()
|
|
|
|
|
You mean declaring classes as usual, but then using inline assembly only in the implementation of the methods? Yes, that's certainly possible, but does not make much sense.
90% or even more of the code would not benefit very much from assembly code, so why make it harder to read without a gain? Take the user interface. It usually is idle while waiting for some event to occur. Then it briefly handles the events and sits there and waits for the next event again. Handling events comes in two flavors: Quick enough (so why use assembly?) or much too long. Often so much too long, that no optimization can bring it into the quick enough category. Opening and synchronizing a worker thread for this is certainly better done in C++. If the execution time of this thread then still is an issue, assembly optimization at a few well-selected spots may do the trick. The rsult is a much more maintainable and readable code. Also, there is still the option to use an assembler to write critical functions and to link the object files with your C++ project.
Personally, I don't like mixing up different languages in one source file. My best argument against it is a typical PHP script with HTML, PHP and occasionaly embedded JavaScript merrily mixed into one ugly spaghetti code. I would even prefer to use Visual Basic and gladly suffer all the consequences than ever to do serious work with PHP.
|
|
|
|
|
REPLACE(dvel.Notes, '
', ' ')
T-SQL: Replaces newline with space.
Last modified: 4hrs 41mins after originally posted --
Pits fall into Chuck Norris.
|
|
|
|
|
In what language?
|
|
|
|
|
Sorry, T-SQL. Fixed now.
Pits fall into Chuck Norris.
|
|
|
|
|
Bah, small fries.
I've seen:
Something = ISNULL(somecolumn, NULL)
|
|
|
|
|
What if the newline was also followed by a carriage return. Would you end up with a sequence of space, carriage return? That's pretty bizarre.
|
|
|
|
|
It's replacing a 'literal' new line, so it would replace the CRLF combo with a space. The horror is not explicitly saying, DON'T REMOVE THIS LINE BREAK!
Pits fall into Chuck Norris.
|
|
|
|
|
\n would have been better here
|
|
|
|
|
Then the replace should happen before the data hits the database.
|
|
|
|
|
Technically, it is. The query is to extract data destined for a target database that doesn't like newlines. It's an edge case, as other target databases are happy with the newlines.
Pits fall into Chuck Norris.
|
|
|
|
|
Uah looks terrible.
|
|
|
|
|
I don't see it, obviously the guy who wrote that used XVI32 and doesn't see anything wrong with it...
|
|
|
|
|
Spacix
One wrote: doesn't see anything wrong with it...
That's the horror. What don't you see? The ambiguity between a line wrap and a line break in a SQL statement?
Pits fall into Chuck Norris.
|
|
|
|
|
Well, I mean the guy who wrote it must have been using a Hex editor and the link break was just another two bytes to him, as he could only see "0D 0A" which looks normal, to him...
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
Recently came across this gem.
<br />
protected void Foo()<br />
{<br />
PreProcess(arg);<br />
}<br />
<br />
<br />
private void PreProcess(string arg)<br />
{<br />
try<br />
{<br />
return;<br />
}<br />
catch(Exception ex)<br />
{<br />
}<br />
}<br />
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson Because programming is an art, not a science. Marc Clifton
|
|
|
|
|
Future extension?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
probably the coder wants the program to do nothing..
.....
|
|
|
|