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 | 
  | 
              
| 
                  
                   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 _________________ Nil Volentibus Arduum  | 
              |||
                  
  | 
              
| 
                  
                   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  | 
              |||
                  
  | 
              
| 
                  
                   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  | 
              |||
                  
  | 
              
| 
                  
                   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. 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   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  | 
              |||
                  
  | 
              
| 
                  
                   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. 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   ajstillprogramming 12 Oct 2011, 10:38 
                  i add this to the code right
 
                  
                ProgramName db "STARTUP BIN"  | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.