Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

don't understand how system hierarchy works.

Status
Not open for further replies.

Beholder2

Technical User
Sep 27, 2004
31
0
0
US
Hello, I posted this in the qbasic forum because its an old dos program and I have a dos related question that also pertain's to a compiler such as qbasic. In an paragraph in my 'Troubleshooting, maintaining, repairing pc's' book it explains (somewhat) that if you use say print "hello" that the qbasic program(compiler) doesn't access the hardware directly it accesses msdos.sys the kernel and then that accesses the bios which inturn displays the word, and this goes for any qbasic command. Why is this? how does it work? why is it set up like this?
 
In days of yore, when programmers were Real Programmers, everyone accessed the hardware directly and wrote in binary by toggling instructions into the machine.

Since those happy days, operating systems have come along that insulate the programmer from the need to write in binary.

Instead you use a compiler or interpreter for the language you want to use.

In other words, it's a lot easier than programming down at the bare metal.

You could still use instructions to directly access the hardware in operating systems other than NT & XP such as dos, win95, win98.

For security reasons, NT and XP make this much more difficult.

So there's a sort of pyramid: your program, the operating system, the bios, and the hardware.

This reduces (in theory) the amount of effort you put in to writing a program.

 
hm so the os must have done most of the work for you in other words, or at least a good chunk of it. So for example the qbasic statement print "hello" would go to a routine(in memory) in the dos kernel that take's input and displays it on screen, So when the programmers of qbasic first made their "print" command or what have you they didn't have to do as much programming? So its like using dos services..
 
exactly.

The operating system reduces the amount of work you have to do.

The exceptions to this are instructions like peek & poke that will access memory or i/o addresses directly and don't use the operating system at all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top