x86 Assembly program that works without OS

Status
Not open for further replies.

Sputnik

Full Member level 3
Joined
Oct 19, 2004
Messages
150
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Location
South Africa
Activity points
1,667
I would like to learn assembly, so I have downloaded tutorials and read through them. What I would to develop is a program for interfacing a robot through a 486 motherboard. I don't want to run a program under Windows (prone to crashing, possibly). I could use DOS.

My scenario: I would like to know if it would be possible to write a program that is the OS built into the program, ie. not OS running program. 'Cause all these ASM tutorials speak about compiling to EXE, but EXE won't run without an OS. So I want CPU to directly run program, and not through an OS, program basically acts as an OS with no other features except to control the robot. You getting the picture?

Would I have to incorporated EXE support into my OS-program to run my program? Then how will I get the computer to boot up with my program?

I feel this explaination is a bit dodgy! Ask anything you are unclear about.

Thanks (if you understand)
Sputnik :idea:
 

specs-bbs101.pdf

Key issue here will be to dis-assembly BIOS (motherboards from different manufacturers will use different BIOS').
This piece of software resides in EProm(s) on the motherboard.

You wll also need a detailed schematic diagram of the motherboard.

Armed with these two you can try to write your own code (assembly), burn it into EProm and fit it back. Now the CPU will execute your code ..
 

bios source code pdf assembly

No need to reinvent the BIOS, use it. It provides basic functions like "write a sector to disk". It's a *long* time since I've done anything that low-level on a PC (think 8086 CPU overclocked by soldering in a faster oscillator).

Remember, the BIOS consists of the BIOS's of expansion cards as well, for instance the graphics card. You'll need (for ease) to stick with a really simple graphics card, no fancy 3D unless you want to make life difficult.

The operating system (think DOS) is just a program that talks to the BIOS and runs user programs.

The PC will boot whatever program you put on a disk, if you follow the BIOS's expected boot format. Could be MS-DOS, could be your own program instead.

You'll need to check up on the basic functions that the BIOS (including the video BIOS) provides and the booting procedure. I can't recall the exact details, but it'll be on the web.

Also, examine the code (source or disassembled) for MS-DOS (3.3 is nice and easy if you can find it). You can 'borrow' some of the routines. If you prefer, look at some Linux code, or even CP/M. The basic boot process and talking to the BIOS is the same, it has to be. Check out the "Master Boot Record" (MBR) of any bootable disk - that's where the BIOS looks for what to load.

Try here for some open-source DOS versions, some with source code available:

**broken link removed**

Also, a good source for all the assembly stuff, if you don't already know it:

http://webster.cs.ucr.edu/ (check out chapter 13)

Check here for the basic boot procedure:

**broken link removed**
**broken link removed**

It's not really that difficult if you just need basic stuff, it gets a bit more difficult if you need higher-level functionality (networking, large HD support, fancy graphics). I once wrote a (very) simple OS/control program for someone's hardware project at university in 3 days. Ahh, they were the days!

You could even, once you've learnt how to use the BIOS, write your own Low-level libraries for use in Turbo C and then code your main stuff in C.

If you fancy completely rewriting everything (including replacing the BIOS) I would start with a simpler hardware system that a 486, like an 8086.

FoxyRick.
 

assembly load bios

I come to know that Scanlon, Leo J. 8086/8088/80286 Assembly Language. Brady, a division of Simon & Schuster, 1988. ISBN 0-13-246919-7.
Is a very good and famous book for assembly language . anybody got this? please upload.

thanks
 

asm programming motherboard

EcraZ,

The proper place to ask is in the ebooks request forum. You'll have more chance there as well.

FoxyRick.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…