CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    11

    how to compiler and debug operation system

    I want to write my own tiny operation system. I want to write it in plain C. But I have no idea of how to compiler the code for complier tool always compiler it to some format like coff.
    So, could anyone give me some suggestion how could I compiler my C code of operation?
    Also, I want to know how can I debug it. Maybe there is some tools?

  2. #2
    Join Date
    Jun 2002
    Location
    Letchworth, UK
    Posts
    1,020
    Is this a disk based or PROM based operating system? If it is a disk based OS, you have to write a loader first. If it is on a PC, find out how the disk loader works: which tracks it reads on startup etc.

    Most code is in some format or other: COFF, ELF, Intel Hex, Motorola Hex, Tektronix Hex etc. What the loader has to do is interpret this format and dump the code in the memory at the relevant addresses. Once this is in memory, you can jump to the start address.

    If it is in PROM, find out what the start address is. On Motorola 6800, it is 0, on Intel 8086, it is FFFF:0. Different processors have different start addresses. You have to set a jump from this address to the start of your code. The PROM burners nowadays should recognize most formats so it shouldn't be a problem downloading and burning the PROM.
    Succinct is verbose for terse

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

Featured