Jump to content

  • Log In with Google      Sign In   
  • Create Account

How low a level do you understand between 'SW' and HW?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
13 replies to this topic

#1 rAm_y_   Members   -  Reputation: 481

Like
0Likes
Like

Posted 14 July 2014 - 01:18 PM

Now I am not 100% sure what to ask here as I still don't haven't joined all the dots. So, how well do you understand the underlying connection between hardware and software.

 

For example, we use the word abstraction at this topical level, we can code some assembly language(which I know very little of), assembly it, and hey presto the 'mouse cursor' moves over the screen, or we could colour some pixels in.

 

But what is actually going on at the very base level. If you download mikeOS - a small OS written in assembly - well it is pretty cool, it displays a console type menu and also has a basic compiler. But it's really fundamental compared to modern OS's and I am trying to understand it, but that will be hard until I learn assembly language.

 

So we type in human readable language into the editor, compile/link it, and it magically switches on and off electrical transistors.

 

So say you were given a PC with a blank HD and you were asked to just create a mouse/icon tht you could move around the screen how would set about doing this. I understand that 80/90's 8-bit assembly programmers will have a good idea about this.

 

Where is the root point where we can start everything, does the hardware like mouse input have it's own firmware/software pre-built in that allow use it communicate with it?

 

If an assembler is the most fundamental piece of software how would you load it onto the HD/memory in the first place?

 

I think my real problem is that I just don't understand the complexity/structure and in built software of the hardware itself so I still can't make that connection between the 'software/text' that we see on the screen and the electronics themselves.

 

 



Sponsor:

#2 Washu   Senior Moderators   -  Reputation: 5417

Like
2Likes
Like

Posted 14 July 2014 - 01:43 PM

Well, there's actually already software built onto your mobo which does a bunch of pre-setup work for you when the machine boots (BIOS for example). Then you have the fact that most CPUs actually run micro-code which means they're not just taking instructions, but can be flashed to get around buggy bits of silicon, etc.

 

and all of this is assuming its actually a real COMPUTER you're running on, since it could be entirely virtualized and thus you may not be talking to hardware at all, but software.


In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
ScapeCode - Blog | SlimDX


#3 Promit   Moderators   -  Reputation: 7572

Like
0Likes
Like

Posted 14 July 2014 - 01:57 PM

There are a lot of pieces, and all of them are more complex than they appear at first glance. Core classes in operating systems and computer architecture help to clarify a lot of it, as do classes in computer and electrical engineering. Working on the various pieces (eg Linux kernel hacking) can also be very enlightening. But this is not a small or simple topic, and really having a thorough understanding of everything is limited to a relatively small number of people.



#4 AgPF6   Members   -  Reputation: 165

Like
1Likes
Like

Posted 14 July 2014 - 02:20 PM

One of things that you have to remember is that your concept of "mouse" is really just an area in video memory being written to in a certain way which would produce a recognizable image as "cursor". this is accomplished by operations at the cpu level that produce a value that the video output understands to be a certain "color". The reason why I use quotations is because these concepts dont exist to the computer, but are manufactured so that you as the user can intetact with the system to produce meaningful results. Assembly is just a human readable form of binary data, and what a higher end compiler does is translate its easier to read langauge into binary instructions for the cpu to assign memeory locations a value that can later be used to do something.

#5 Buckeye   Crossbones+   -  Reputation: 6214

Like
0Likes
Like

Posted 14 July 2014 - 02:21 PM


how well do you understand the underlying connection between hardware and software.

 

That's a philosophy question, in that, at a very basic level, "software" is just a pattern stored in hardware, both on magnetic media and in RAM. A clock outputs pulses which cause a hardware state somewhere to change based on the state somewhere else in hardware. happy.png


Edited by Buckeye, 14 July 2014 - 02:23 PM.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.


#6 rAm_y_   Members   -  Reputation: 481

Like
0Likes
Like

Posted 14 July 2014 - 02:28 PM

One of things that you have to remember is that your concept of "mouse" is really just an area in video memory being written to in a certain way which would produce a recognizable image as "cursor". this is accomplished by operations at the cpu level that produce a value that the video output understands to be a certain "color". The reason why I use quotations is because these concepts dont exist to the computer, but are manufactured so that you as the user can intetact with the system to produce meaningful results. Assembly is just a human readable form of binary data, and what a higher end compiler does is translate its easier to read langauge into binary instructions for the cpu to assign memeory locations a value that can later be used to do something.

 

And I know this, to a degree, and this is wha,t I am asking although couldn't put it into absolute words, I think I should really be told, 'go and do a degree in Electrical Engineering' or 'go and work for Intel' or 'buy an old mainframe/punch card computer and start from basic principles'.



#7 Álvaro   Crossbones+   -  Reputation: 13897

Like
6Likes
Like

Posted 14 July 2014 - 04:29 PM

One thing you can try is programming micro controllers (Arduino and the like). You get an environment that is simple enough that you can understand what's going on in detail, without a complicated OS and a complicated BIOS getting in the way. You'll then be able to understand a lot of what a real computer does by analogy.

#8 kseh   Crossbones+   -  Reputation: 2198

Like
0Likes
Like

Posted 14 July 2014 - 04:57 PM

My understanding is that sort of thing is covered pretty well under a CS degree. I would think that would be the place to start looking if you're aim is to make a career in hardware.

I've forgotten a lot of my micro-controller education which I took back in the mid 90's (I just don't use it in my day to day work). About 10 years ago I came across the xGameStation.com website and bought one of their educational packages they offered at the time. Though I never started working with I found that the books, CDs, and equipment that were included covered everything that my college course had. I think the main difference was that they provided a PCB to work with while my college course had us wire wrapping IC sockets.



#9 AlzPatz   Members   -  Reputation: 162

Like
1Likes
Like

Posted 15 July 2014 - 07:25 AM

There's an awesome book called 'CODE' which is a great read. It doesn't get you all the way there (and gets a bit lighter / fluffy near the end through necessity), but is enough in my view to feel comfortable about what is going on at the very lowest level - atleast in a simplified / early computer way. Modern computers and various layers from OS upwards are just extensions / additions. you won't regret reading it.

http://www.amazon.co.uk/Code-Language-Computer-Hardware-Software/dp/0735611319/ref=sr_1_1?ie=UTF8&qid=1405430673&sr=8-1&keywords=CODE

 



#10 aregee   Members   -  Reputation: 1026

Like
1Likes
Like

Posted 15 July 2014 - 11:23 AM

If you are interested to learn low level assembly language on the PC, the "easiest" way is probably to install DOS Box, which is a nice piece of software that you can use to run really ancient software on modern computers.  Mac version is called Boxer.  The thing with DOS Box is that it emulates the environment of old, old "IBM compatible" computers as it were back then, with BIOS, VESA graphics, sound blaster, and all.   Another nice thing with good old dos, is that it ran in something called 'real mode', which basically is non-protected, segmented memory model.  Translated to more understandable phrases, that means you can take over the whole computer, set any graphics mode you want, play audio at the "lowest" level, or take over all interrupts without the operating system protesting at all.  Switching to a VESA graphics mode is fairly easy.  It is just calling one interrupt that is set up by the BIOS.  Then you can write directly into video memory to create all the graphics you want, all without the hassle to write a basic operating system yourself, with complex pre-loaders and loaders and kernel and hard drive interfacing and all those really hard, complex things.  I think what I used back in the day, was masm.



#11 BeerNutts   Crossbones+   -  Reputation: 2999

Like
2Likes
Like

Posted 16 July 2014 - 02:49 PM

If you are interested to learn low level assembly language on the PC, the "easiest" way is probably to install DOS Box, which is a nice piece of software that you can use to run really ancient software on modern computers.  Mac version is called Boxer.  The thing with DOS Box is that it emulates the environment of old, old "IBM compatible" computers as it were back then, with BIOS, VESA graphics, sound blaster, and all.   Another nice thing with good old dos, is that it ran in something called 'real mode', which basically is non-protected, segmented memory model.  Translated to more understandable phrases, that means you can take over the whole computer, set any graphics mode you want, play audio at the "lowest" level, or take over all interrupts without the operating system protesting at all.  Switching to a VESA graphics mode is fairly easy.  It is just calling one interrupt that is set up by the BIOS.  Then you can write directly into video memory to create all the graphics you want, all without the hassle to write a basic operating system yourself, with complex pre-loaders and loaders and kernel and hard drive interfacing and all those really hard, complex things.  I think what I used back in the day, was masm.

 

If someone wanted to how software was run on a processor at a low level, I'd advice looking to a RISC processor assembly 1st, like MIPS.  MIPS assembly is easy to understand (compared to intel), and the commands fit nicely into 32-bit machine code.  SPIM is a nice MIPS simulator that you can use to practice assembly.


My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

#12 superman3275   Crossbones+   -  Reputation: 2061

Like
0Likes
Like

Posted 26 July 2014 - 06:29 PM

I suggest you read CODE. I had the same questions you had, and this book does a great job of clarifying it. I don't think anyone here can explain this better than the author of that book.


I'm a game programmer and computer science ninja ph34r.png!

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

 

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here smile.png!


#13 Tutorial Doctor   Members   -  Reputation: 1688

Like
1Likes
Like

Posted 26 July 2014 - 11:11 PM

I looked everywhere to find the relationship between hardware and software, and nothing did it better than Carl Heralds series on Binary and C.

http://m.youtube.com/watch?v=0qjEkh3P9RE

But first try Eli the Computer guy:

http://m.youtube.com/watch?v=lJnvq0A_7WQ

There is this electronics video saw also, but I can't find it right now, I will tomorrow.

They call me the Tutorial Doctor.


#14 King Mir   Members   -  Reputation: 2050

Like
0Likes
Like

Posted 30 July 2014 - 09:27 AM

Where is the root point where we can start everything, does the hardware like mouse input have it's own firmware/software pre-built in that allow use it communicate with it?

Ultimately everything is built on analog circuits. But for where software starts, it's at a higher level. Micro controllers and CPUs are circuits that take machine code as part of their operation. This is what allows them to be so general purpose; if you don't need your computer operation to be mutable you can use an application-specific integrated circuit(ASIC). All software is compiled into machine code.
 

If an assembler is the most fundamental piece of software how would you load it onto the HD/memory in the first place?

Memory has a controller built into the CPU. Machine code has instructions for interacting with memory, and the CPU makes memory do the right thing.

A hard disk has a built in controller chip in the enclosure, quite possibly an ASIC. There is a protocol for talking to harddisks and other peripheral hardware (ie hardware that's not part of the CPU operation), usually by mapping certain memory addresses to talk to the device.

Machine code is bit code for assembler, and assembler is source code for machine code; one is efficiently packed, the other is human readable. All software in some form or other becomes machine code, although higher level languages may have an interpreter in the pipeline.


I think my real problem is that I just don't understand the complexity/structure and in built software of the hardware itself so I still can't make that connection between the 'software/text' that we see on the screen and the electronics themselves.

That's computers for you. Layers on layers of abstraction. In fact the point is that you don't need to just to write programs. How machine code is converted into the operations it specifies is the field of computer architecture, which basically describes in digital logic, the silicon in a CPU. Talking to peripherals is it's own field. So is the design of peripherals so that they can talk to the CPU.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS