Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / November 2005



Tip: Looking for answers? Try searching our database.

old programmer in a brand new world ...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pan@datasync.com - 14 Nov 2005 22:18 GMT
The last time I did any programming it was on dos or university
mainframes ( Multics, Univac 1100 ). One of the great truths that
helped me then was that memory is always a single dimensioned array of
byte.

Now I am faced with Objective C/Cocoa and the Xcode 1.5 IDE. I'm not
sure I *can* get to memory anymore.

Hello, world.

I promise not to wax nostalgic, although I may use an old reference to
understand new information.
Patrick Machielse - 15 Nov 2005 00:13 GMT
> The last time I did any programming it was on dos or university
> mainframes ( Multics, Univac 1100 ). One of the great truths that
[quoted text clipped - 3 lines]
> Now I am faced with Objective C/Cocoa and the Xcode 1.5 IDE. I'm not
> sure I *can* get to memory anymore.

Well, it is still C underneath. So rest assured, there is plenty of
opportunity to mess up ;-) Programming in Objective-C still involves
'semi-automatic' memory management. Much has changed since mainframes
ruled the world, yet much has stayed the same...

patrick
Gregory Weston - 15 Nov 2005 00:43 GMT
> > The last time I did any programming it was on dos or university
> > mainframes ( Multics, Univac 1100 ). One of the great truths that
[quoted text clipped - 8 lines]
> 'semi-automatic' memory management. Much has changed since mainframes
> ruled the world, yet much has stayed the same...

Well, now... Some of us, when we hear "mainframe" think of systems for
which dynamic memory allocation wasn't a provided technology. There was,
as the OP wrote, just a massive array of values that could be read or
written and it was up to the programmer to not step on his own data.

Signature

Goal 2005: Convincing James Hetfield to cover the Strawberry Shortcake
"Are You Berry Berry Happy?" song.

Don Bruder - 15 Nov 2005 03:22 GMT
> > > The last time I did any programming it was on dos or university
> > > mainframes ( Multics, Univac 1100 ). One of the great truths that
[quoted text clipped - 13 lines]
> as the OP wrote, just a massive array of values that could be read or
> written and it was up to the programmer to not step on his own data.

Or his own code... Nothing like blowing your pointer arithmetic and
pointing something like an input buffer into the guts of the program. Or
worse, the heart of the OS. It might not fully "explode" right away, but
once the PC is pointing at the data that overwrote the code that should
have been there, Hooo boy... Things tend to "get real western" in a big
hurry.

DAMHIKT! :)

Signature

Don Bruder - dakidd@sonic.net - If your "From:" address isn't on my whitelist,
or the subject of the message doesn't contain the exact text "PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd> for more info

Mark Haase - 15 Nov 2005 04:17 GMT
> Or his own code... Nothing like blowing your pointer arithmetic and
> pointing something like an input buffer into the guts of the program. Or
[quoted text clipped - 4 lines]
>
> DAMHIKT! :)

I imagine that most bytes wouldn't be valid opcodes, in which case the
processor would halt or throw some kind of error interrupt, right? Or
did it just keep executing through the gibberish?

|\/|  /|  |2  |<
mehaase(at)gmail(dot)com
pan@datasync.com - 15 Nov 2005 04:28 GMT
It would execute the data,
which was the point if one were writing self modifying code.

Some memories are not sweet.

Let's focus on the novelty of inheritance and forget calculated offset
branch arrays.
Don Bruder - 15 Nov 2005 17:09 GMT
> > Or his own code... Nothing like blowing your pointer arithmetic and
> > pointing something like an input buffer into the guts of the program. Or
[quoted text clipped - 8 lines]
> processor would halt or throw some kind of error interrupt, right? Or
> did it just keep executing through the gibberish?

That depends *ENTIRELY* on the processor type (and sometimes on the
individual processor chip) involved...

An "unenhanced" Apple IIe with a 6502 processor is a prime example, even
though it isn't a mainframe like the thread originally started with -
Some 6502s would hit certain "enhanced" (65C02) instructions, and
depending on whether it was a western digital chip or somebody else's,
might execute a useful (but only to be counted on when running on *THAT
SPECIFIC CHIP*) function that you had to figure out the details of for
yourself if you were crazy enough to try to actually *USE* it, while the
next one would hit the same instruction and send the machine into a hard
lockup, another would spew a string of random bits all through memory,
and yet another one would treat that instruction exactly the same as a
NOP, leaving you without any idea that it had ever encountered a "bad"
instruction.

Signature

Don Bruder - dakidd@sonic.net - If your "From:" address isn't on my whitelist,
or the subject of the message doesn't contain the exact text "PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd> for more info

Tom Harrington - 15 Nov 2005 18:31 GMT
> Or his own code... Nothing like blowing your pointer arithmetic and
> pointing something like an input buffer into the guts of the program. Or
[quoted text clipped - 4 lines]
>
> DAMHIKT! :)

You don't have to be using a mainframe for that to happen.  Some
embedded operating systems implement this "feature" just fine.  I had
this exact problem at my last job, and that was on generic Pentium
boxes.  In my case it was more like having a stack limited to 8kB, and
Bad Things would happen if you blew past that limit.  Among other
interesting limitations.  :-)

Signature

Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0:  Delocalize, Repair Permissions, lots more.
See http://www.atomicbird.com/

Oliver Bandel - 17 Nov 2005 23:39 GMT
> In article <uce-D38542.19435514112005@comcast.dca.giganews.com>,
[...]
> Or his own code... Nothing like blowing your pointer arithmetic and
> pointing something like an input buffer into the guts of the program. Or
[quoted text clipped - 4 lines]
>
> DAMHIKT! :)

No, not hell... this is heaven of self-reprogramming software. :)

It's, what modern computer science and artificial intelligence is
looking for: it's a living organism... ;-)
Don Bruder - 18 Nov 2005 02:17 GMT
> > In article <uce-D38542.19435514112005@comcast.dca.giganews.com>,
> [...]
[quoted text clipped - 11 lines]
> It's, what modern computer science and artificial intelligence is
> looking for: it's a living organism... ;-)

Self-modifying code *ON PURPOSE* is one thing... Bungled pointer math
turning the guts of your code into an array of credit card numbers,
addresses, or similar "not really program", is a nightmare.

Signature

Don Bruder - dakidd@sonic.net - If your "From:" address isn't on my whitelist,
or the subject of the message doesn't contain the exact text "PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd> for more info

pan@datasync.com - 18 Nov 2005 03:09 GMT
I made a joke in my last post on this thread.

Either nobody got it, or I'm in the dark on how inheritance is actually
compiled.

Which is it?
Don Bruder - 18 Nov 2005 08:26 GMT
> I made a joke in my last post on this thread.
>
> Either nobody got it, or I'm in the dark on how inheritance is actually
> compiled.
>
> Which is it?

Ummmm... Going back and looking at your post, I presume you mean the "I
wonder if I *can* get to memory..." part?

<shrug> Depends on how you code... Go all whacky, and you might find
yourself wondering where the RAM went, but if you want access to it,
it's there, dangling off the end of a pointer someplace. Just a question
of how many layers deep you decide to bury it.

Signature

Don Bruder - dakidd@sonic.net - If your "From:" address isn't on my whitelist,
or the subject of the message doesn't contain the exact text "PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd> for more info

pan@datasync.com - 18 Nov 2005 12:09 GMT
Nope .. this :

"Let's focus on the novelty of inheritance and forget calculated offset

branch arrays."

My best guess is these are one in the same. Too big a leap to be
recognized and funny even if I'm correct. Oh well.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.