Author Topic: the truth about stuff  (Read 24496 times)

Offline roboticmehdi

  • Jr. Member
  • *
  • Posts: 3
the truth about stuff
« on: April 15, 2011, 10:43:52 PM »
If a programming language is written using programming language, then how was the first programming language written ?
And, how assemblers are written, using what ?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: the truth about stuff
« Reply #1 on: April 15, 2011, 11:51:58 PM »
Well... Nasm is written in C. Not all of the C is "hand written", some of it's generated using Perl.

The first assembler was presumably "written" using front-panel switches. Probably jacks and cables before that. I understand that the first programming tool wanted was a linker. Programmers didn't mind entering their code a bit at a time, but they didn't want to re-do it every time, so they wanted something to relocate pieces of code so they could be reused. Before an assembler will do you much good, you need an editor. Everything in its turn... Can't have been easy!

All before my time. I'm old enough (not really), but I didn't get into computers until late in life...

Best,
Frank


Offline roboticmehdi

  • Jr. Member
  • *
  • Posts: 3
Re: the truth about stuff
« Reply #2 on: April 17, 2011, 04:21:31 PM »
Assembler is a lower level language than C. How come NASM is written in C ?? No way i can understand that   :-\   Note: when i mean "written" i mean "compiled using...". It seems to me like a paradox. Programs are created using compilers, which are also programs. So how is that the first compiler was created?  :-\

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: the truth about stuff
« Reply #3 on: April 17, 2011, 04:33:22 PM »
I can explain it to ya, but I can't understand it for ya!

Best,
Frank


Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: the truth about stuff
« Reply #4 on: April 17, 2011, 07:30:12 PM »
Quote from: roboticmehdi via email
The following post, "Re: the truth about stuff" by Frank Kotler has been reported by roboticmehdi on a board you moderate:

http://forum.nasm.us/index.php?topic=1046.msg3824#msg3824

The reporter has made the following comment:
abusive and wrongly posted message, i ask question he replies whatever comes to his balls

Regards,
The NASM - The Netwide Assembler Team.


Frank is one of the most accommodating people I've ever known when it comes to helping people understand programming basics. He has spent countless hours helping people who, for all intents and purposes, are simply too lazy to RTFM, STFW or give any sort of due diligence to the learning process -- even those who obviously post from a university network in an attempt to find quick answers -- involving minimal effort on their behalf.

Frank's response of "I can explain it to ya, but I can't understand it for ya!" is dead on and not abusive in the least. He is simply trying to convey that you need to dig further to understand the fundamentals of which you are trying to build these mental models on top of.

A simple Google Search for "first programming language" would have revealed a myriad of information regarding this topic.

Your abuse report is an unwarranted and ungrateful response. A more appropriate response would have been "OK, I will read further and come back with more questions if I have them." or even simply "I still don't understand.", instead of lashing out at the person who is helping you.



Now that I've made myself abundantly clear, and the fact that I am willing to dismiss your reaction as a misunderstanding due to language/cultural differences, you have three options:

1.) Apologize to Frank as a reply to this thread, which will allow you to continue participating here... no harm, no foul.
2.) Leave quietly, perhaps coming back later to execute option 1 when you realize how impatient you were.
3.) Become belligerent about the situation and get banned.

Your choice.

This topic will be locked, if you do not respond within 3 days.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: the truth about stuff
« Reply #5 on: April 17, 2011, 08:16:29 PM »
Thanks, Keith! No apology necessary. Perhaps I was abrupt (If you had seen an abusive message from me, you would know!).

Lemme try again on the actual questions...

"How come Nasm was written in C???"

You'd have to ask the original authors, but I assume for "portablity". While Nasm will emit machine code (what a "program" is) for x86(_64) only, it was intended that Nasm could be run on any machine. Nasm jumps through hoops to guarantee that it will emit little-endian code, even if it's running on a big-endian machine. At the time Nasm was written, the most commonly available build system available was C.

Now when we come to the "first program"... a "program" is a series of bytes - opcodes and their operands (and "data" for these to operate on). What you need to create a "program" is some way to place bytes in consecutive memory locations. I understand "front panel switches" were pretty early, although I suspect that even more primitive methods were used at "first". A byte was constructed a bit at a time, and a button(?) was pressed to enter it into memory, and set the next memory location for the destination for the next byte. When finished, the "run" (from whatever address we started at) was pressed. As soon as possible, I imagine, one wanted to enter a few bytes that would "read N bytes from the paper-tape reader (or whatever), load them consecutively starting from memory location M, and jump to M". Keyboards came later...

As I said, all this was before my time...

Best,
Frank


Offline roboticmehdi

  • Jr. Member
  • *
  • Posts: 3
Re: the truth about stuff
« Reply #6 on: April 17, 2011, 09:01:49 PM »
I do not need to be banned because I leave the forum, cant stay is a place where older guys group against newer ones, even if they are wrong. came here to find answers, but didn't know that will face people like you.

Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: the truth about stuff
« Reply #7 on: April 18, 2011, 12:12:36 AM »
I do not need to be banned because I leave the forum, cant stay is a place where older guys group against newer ones, even if they are wrong. came here to find answers, but didn't know that will face people like you.

Arrogance diminishes wisdom. ~ Arabian Proverb

In light of your response, I recommend reading Hasty Generalization @ Wikipedia.

While I help protect this place and our volunteers from unwarranted abuse, I am only one of many represented here.

As for Frank, you are simply dead wrong about him. Your entitlement attitude is getting in the way of what he has to offer. You'd be hard pressed to find a more amicable person who is willing to offer the fruits of their wisdom and knowledge for nothing in return, time and time again... especially in the world of programming, where egotists rule.

You've seemingly made your choice. However, Frank does not require an apology, so do as you please... but I wouldn't recommend "biting the hand that feeds you" here again, so to speak... otherwise you'll find how truly "intolerant" I really am ;)

Thanks, Keith! No apology necessary. Perhaps I was abrupt (If you had seen an abusive message from me, you would know!).

A fool flatters himself, a wise man flatters the fool. ~ Robert Bulwer-Lytton

Thanks for trying, as always, Frank.