flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Hi i made an operating system and its a .com file

Author
Thread Post new topic Reply to topic
ajstillprogramming



Joined: 09 Oct 2011
Posts: 4
ajstillprogramming 12 Oct 2011, 04:52
Hi how do i boot a .com file, i don't know way i made it a .com file but it seam like a good ido im runing windows 7 is there an emulator that will run a .com file or should i just put it on a floppy drive and will it boot or should i make a boot loader, but i think its in the .com file, please help i just want to see if it works the right way thanks agine for help
Post 12 Oct 2011, 04:52
View user's profile Send private message Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto 12 Oct 2011, 07:26
Quote:
Hi i made an operating system and its a .com file


Maybe it's better that you learn a little more, before to code a Os Wink

_________________
Nil Volentibus Arduum Razz
Post 12 Oct 2011, 07:26
View user's profile Send private message Reply with quote
egos



Joined: 10 Feb 2009
Posts: 144
egos 12 Oct 2011, 07:54
To boot binary file as a .com file you can use following structure:
Code:
  org 8000h ; or other starting address
  jmp 0:@f
@@:
  hlt
  jmp short @b
    


To make binary file as a .com file in fasm you can use following structure:
Code:
  org 100h
  jmp 0:@f
  org 8005h ; or other starting address
@@:
  hlt
  jmp short @b
    


To boot .com file as a binary file you can use following structure:
Code:
  org 100h
  jmp 7F0h:@f ; 7F0h = (8000h-100h) shr 4
@@:
  hlt
  jmp short @b
    


To make .com file as a binary file in fasm you can use following structure:
Code:
  jmp 7F0h:@f ; 7F0h = (8000h-100h) shr 4
  org 105h
@@:
  hlt
  jmp short @b
    
Post 12 Oct 2011, 07:54
View user's profile Send private message Reply with quote
ajstillprogramming



Joined: 09 Oct 2011
Posts: 4
ajstillprogramming 12 Oct 2011, 08:48
Is there a way to make a boot loader that links to my .com file, and how will i do that. I have a boot loader made i just dont know how to link them if possible. Oh and i changed it to a .bin file. how will i boot that.

thanks for your help
Post 12 Oct 2011, 08:48
View user's profile Send private message Reply with quote
egos



Joined: 10 Feb 2009
Posts: 144
egos 12 Oct 2011, 09:10
Yes, it is. Just do it. Or you can use some existing boot loader. I have shown to you how to make .com file that could be booted as a binary file. Just find that boot loader.
Post 12 Oct 2011, 09:10
View user's profile Send private message Reply with quote
ajstillprogramming



Joined: 09 Oct 2011
Posts: 4
ajstillprogramming 12 Oct 2011, 09:38
Ok, i have the boot loader. so do i just boot the loader and the bin file will show up oh do i need to make a command propped that will show whats on the system., sorry about this, i have been programming my os for some time now, I know the basics of to make an os, im just lost on how to but that bin file.

thanks
Post 12 Oct 2011, 09:38
View user's profile Send private message Reply with quote
egos



Joined: 10 Feb 2009
Posts: 144
egos 12 Oct 2011, 10:11
Correct loading address and file name within boot loader. Or rename file and correct loading address within it (8000h in my examples). Just all you need.
Post 12 Oct 2011, 10:11
View user's profile Send private message Reply with quote
ajstillprogramming



Joined: 09 Oct 2011
Posts: 4
ajstillprogramming 12 Oct 2011, 10:38
i add this to the code right
ProgramName db "STARTUP BIN"
Post 12 Oct 2011, 10:38
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.