PDA

View Full Version : how was the first program made without SDK,can i write an app with machine language ?


hus2005
04-30-2007, 12:23 AM
i am new to programming.

I know that u need an SDK to write a program in c++.


i heard about programming with machine language.

but i am confused ,how could i write an app with machine language ??


and how did The programmers make the SDK,like Directx sdk or Win sdk ????

salmonmoose
04-30-2007, 08:52 AM
You don't actually need an SDK to make software in c++ you just need a c++ compiler.

SDKs like MFC, and Direct X are merely bunches of code that has already been written for you. Mostly this stops you from having to do the hard stuff yourself, and provides a uniform way to do things.

Interestingly you can write a compiler in just about any language (naturally some more suited than others), so current c++ compilers are likely mostly actually written in c, however the very first compilers would have been written in native machine code.

That's a pretty simplistic answer :)

hus2005
04-30-2007, 10:47 AM
can somebody give me an idea how could i write
an app or a compiler in native machine code???




and how could i write an operating System in c++ ?

mummey
04-30-2007, 01:46 PM
http://www.google.com/search?q=x86%20assembly%20language

http://www.google.com/search?hl=en&safe=off&q=principles+of+operating+systems

There's much more you need to worry about than the language an OS is written in.

el_diablo
04-30-2007, 07:13 PM
I was interested in os programming for years. The simplest way to dip your toes in was the os kit package http://www.cs.utah.edu/flux/oskit/

however it seems its not activly maintained anymore.

www.osnews.com is another fine resource. Also you could analise linux source.

and how could i write an operating System in c++ ?

Line by line I guess. It could take a few years though.

UrbanFuturistic
04-30-2007, 08:19 PM
Thinking about it the first programs were done entirely in binary. In assembler each command represent the binary code for the CPU instruction and all data is binary underneath this basic layer of abstraction. Characters, string, arrays, pointers, memory addresses, all just collections of binary data.

But at the beginning there wasn't even that and everything was stored on punch cards, in raw binary. Woe betide the man who spilled his coffee at the IBM data centre in those days :D There go the financial records for the last month :cry:

salmonmoose
05-01-2007, 03:56 AM
Thinking about it the first programs were done entirely in binary. In assembler each command represent the binary code for the CPU instruction and all data is binary underneath this basic layer of abstraction. Characters, string, arrays, pointers, memory addresses, all just collections of binary data.

But at the beginning there wasn't even that and everything was stored on punch cards, in raw binary. Woe betide the man who spilled his coffee at the IBM data centre in those days :D There go the financial records for the last month :cry:

I still have a collection of my father's punch card lying around somewhere - I wonder if Vista will recognize them.

Novak002
05-08-2007, 01:42 PM
Writing a operating system may take you lots of years and experiance, its not something you can do in a weekend. Thers so much to learn. Maybe try with something simular like making a program that displays Hi in a message box.

Hugh
05-08-2007, 09:06 PM
Interestingly you can write a compiler in just about any language (naturally some more suited than others), so current c++ compilers are likely mostly actually written in c, however the very first compilers would have been written in native machine code.


A programming language is classed as "mature" when you can write a compiler for the language using the language itself....

CGTalk Moderation
05-08-2007, 09:06 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.