Results 1 to 32 of 32

Thread: make a program bootable

  1. #1

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362

    make a program bootable

    How can I make a Console program bootable ?

    I searched in the Net and I found nothing, I want to make a program and to put it on a floppy then restar the computer with the floppy disk and I want the program load instead of loading in Windows... is that possible? I think yes cause old Dos game was bootable... any information about how to do it ?

  2. #2
    New Member
    Join Date
    Jul 2002
    Posts
    8
    Thats pretty easy, just make a Bootup disk then edit the autoexec.bat on the disk and put a yourexename.exe line at the end of it. Just make sure your program is for real mode dos (16 bit) and now a console application (i.e. those made in VC++).

  3. #3
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    I think he wants to make in his own "os" or similar.
    This recuires assembly programming and is a bit tricky...
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  4. #4
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    pscode has a contest winner under c/c++ about making your own OS
    retired member. Thanks for everything

  5. #5
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    Originally posted by GuitarMan
    Just make sure your program is for real mode dos (16 bit) and now a console application (i.e. those made in VC++).
    how would that be done?
    retired member. Thanks for everything

  6. #6
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Use a 16-bit compiler. I think older versions of Turbo-C++ are 16-bit.
    Alcohol & calculus don't mix.
    Never drink & derive.

  7. #7

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    Problem is that I am on Win2k and it doesn't have a BootDisk...well I do not want the boot disk who take 4 diskette!

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Maybe you have a friend with win9x
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    You want to be my friend ?

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You don't need DOS to make it bootable.

    In fact, you're better off without it - you can write pure 32-bit code for a 32-bit processor
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    In fact, you're better off without it - you can write pure 32-bit code for a 32-bit processor

    hummm I am not enough good in ASM to do that and my goal was only to be able to launch a program just by booting the computer.

  12. #12
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    Originally posted by MasterDaok
    Problem is that I am on Win2k and it doesn't have a BootDisk...well I do not want the boot disk who take 4 diskette!
    www.bootdisk.com
    retired member. Thanks for everything

  13. #13
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I "could" write a bootstrap (rather paste and copy) that switches to 32-bit, loads a binary file and transfers control there - that would mean you can write a game that uses direct hardware access and such things without any OS support (not even HDD access), this is very hard but needs no assembly knowledge on your side - only good system programming with C...

    But I'm too busy, sorry.

    Why do you want your app bootable?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  14. #14

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    Because I want to be able just to put a program on a disket and be able to use it just by opening the computer

  15. #15
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    What sort of program are you making? For all but some very trivial ones you normally need the OS support.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  16. #16

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    I remember when I was young that I played old ugly game byt booting on a disket and I just want to be able to do the same, nothing speacial in mind, I just want to be able to do what old programme did 15 years ago.

  17. #17
    Lively Member jayantkumble's Avatar
    Join Date
    Feb 2002
    Posts
    65
    1) get a dos or win9x bootable disk
    2) convert ur program (16-bit dos program .EXE) to binary using some converter which u can search on the net for.
    3) copy ur binary file to the disk and rename it to io.sys

    if u which to use ur .EXE file then search for XOSL at google, download the code and see how to load a .EXE file ( i guess it is in 32-bit mode) at boot time. But here u will have to write an asm code(u will have to assemble it to a binary file) to load ur .EXE and dump it(not the .EXE) on the boot sector of ur floppy disk.

  18. #18
    New Member
    Join Date
    Jul 2002
    Posts
    8
    That was a joke post, right?? If he wants to make a simple bootable program he just needs to put a reference to the exe file in the autoexec.bat file on a normal Win 9x bootdisk.

  19. #19

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    It's not a joke, I am on Win2kPro and I cannot make a disk like Win9x. If you have nothing constructif to tell just shhhh,

    sincerely DAOK

  20. #20
    New Member
    Join Date
    Jul 2002
    Posts
    8
    Hey that was almost nasty, i wasn't talking to you i was talking to jayantkumble who's post doesn't make any sence what-so-ever. If you want to make your program bootable without using DOS then i can give you some information on writing a bootsector which will allow you to do this, however it will involve using assembly.

  21. #21

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    Sorry

    But I thought that you were talking to me with the "he" on your message. I have to be "bitches" so I got a little angry, sorry

  22. #22
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    15 years ago you used an Amiga or C64, they were designed for apps that boot from disk.
    For modern PCs, if you don't have OS support you either need to have device drivers for every graphics card, sound card and input device you support, or use the lowest common denominator: 320x240@16 colors, no sound, only keyboard, maybe mouse.
    The problem is that unlike in DOS times, a reference on how to address devices is not as easily available now. Only the driver programmers need to know about it, the rest is handled by the OS.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  23. #23
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    As I said before, goto pscode.com in the c/c++ section and search for operating system there are two good ones. One is a contest winner that shows you how to do a helloworld, then theres also one that does that, then also loads a C proggy, teaches you about cpu modes and such. Get the second one. You could use c++, but its more difficult, and you cant use things like new and delete unless you spend a few more weeks making a bootloader.

    Also, as I said before, goto www.bootdisk.com to get a win98se bootdisk (thoise are the best from my experience)
    retired member. Thanks for everything

  24. #24
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by markman
    You could use c++, but its more difficult, and you cant use things like new and delete unless you spend a few more weeks making a bootloader.
    Surely new and delete are just memory allocation things similar to malloc and free? You can write them in about 10 lines...
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  25. #25
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    Im acutally in the middle of a mini operating system, and the word is to stay away from new and delete
    retired member. Thanks for everything

  26. #26
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    I just found this:
    http://www.osdev.org/developers/guide01/index.html

    I wish I found that before I started building mine...
    retired member. Thanks for everything

  27. #27

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    Before making an OS I prefer be more confortable in C++ and maybe know more thing in assembly. And... I think it's better making is own compiler before start a OS... I think.

  28. #28
    New Member
    Join Date
    Jul 2002
    Posts
    8
    When programming an OS you are more likely to use straight C rather than C++ as it is closer to the hardware and IO functions are easier than streams (some might say better!).

  29. #29
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Umm, no

    The thing with the C++ streams is that they all have the same interface; for example, you make a function taking an istream, and it can read from a file stream, the user input, or a string. C has to use different functions to do this (actually so does C++ but it's compiler magic ).

    I agree with using C though, C++'s extra compiler-generated code has no place when you're strapped for space and need to know *exactly* what is being run.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  30. #30
    Lively Member
    Join Date
    Sep 2000
    Location
    England
    Posts
    94
    I must say i disagree i to am working on my own OS at the moment and just wanted to raise a few points which are as much questions to check what i know is right as they are statments so don't take them the wrong way.

    From how i understood it new and delete use malloc and free and just encapsulate it so its easier to read in C++ and anyway this shouldn't be a problem if u use somehthing like gpp.

    As for the c c++ for os thing yes c is slighly smaller but c++ allows object oriented design which i don't knwo about u but is highly important for me in my OS and as for speed a good optimising compiler and a bit of hand optimisation shoudl mean there should be little speed difference

    Peter
    "Let's all join forces, rule with an iron hand...and prove to all the world, metal rules the land..."
    -- Judas Priest

    My email is [email protected]

  31. #31
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    But if you're thinking about writing your own compiler for your OS (or at least linker if you have a special executable format) you're likely to go for plain C first, as a C++ compiler is far more difficult to write.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  32. #32

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    I need to know assembly for the linker, well that's not really my plan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width