OS>Is it possible?
OS>Is it possible?
Is it posible to create an OS,using PB?
PB uses Flat Assembler to compile it's code. You can make OSes with Flat Assembler. Case and point: MenuetOS (http://menuetos.org/). Head over to the Flat Assembler forums found @ http://board.flatassembler.net/index.php if you are interested in OS development with flat assembler. You already have the compiler, as it comes with PB
Now, if there was a way to alter PB some how, maybe with some internal ASM in order to over-write the OS specific code spit-out? Or maybe alter the ASM output of PB code? It would be kinda interesting just making a bootstrap in pure ASM and use PB for the rest... oOo.

When i remember right: When you want to os in Assembler, you must use pure assembler (no libraries, no os-calls). And you must program everything (Ram-Handling, File-Handling, Peripherie-Handling).
BTW: It should be possible to write a OS in C; But it is allways good, when you can Assembler, when you program a OS.
BTW: It should be possible to write a OS in C; But it is allways good, when you can Assembler, when you program a OS.
if you want to create an os checkout www.emu8086.com it great. A friend of mine and i bought it together, we both are working on a simple os using it. try the demo it ha a 5 kb kernell &loader included!
features:
- Complete software emulation of Intel's 8086 microprocessor.
- Interactive Debugger and Disassembler.
- Step-by-step Assembly Language Tutorials.
- Integrated 8086 ASSEMBLER !
- Advanced Source Editor with Syntax Highlight.
- Everything for coding in Assembly Language. All in one!
Off the site:
Microprocessor Emulator with integrated 8086 Assembler and Free Tutorial. Emulator runs programs on a Virtual Machine, it emulates real hardware, such as screen, memory and input/output devices.
If you just began to study assembly language, then this program is just for you. The source code is assembled and executed on emulator step by step. You can watch registers, flags and memory while your program is running. You'll be amazed how easy it is!
Emu8086 pack combines an advanced source editor with automatic syntax-highlight, assembler, disassembler, software emulator (Virtual PC) with debugger, and step by step tutorials.
Emu8086 is complete 'all in one' solution for coding in Assembly Language.
Emulator runs programs on a Virtual PC, this completely blocks your program from accessing real hardware, such as hard-drives and memory, since your assembly code runs on a virtual machine, this makes debugging much easier.
Arithmetic & Logical Unit (ALU) shows the internal work of the central processor unit (CPU).
8086 machine code is fully compatible with all next generations of Intel's micro-processors, including Pentium II and Pentium 4, I'm sure Pentium 5 will support 8086 as well. This makes 8086 code very portable, since it runs both on ancient and on the modern computer systems. Another advantage of 8086 instruction set is that it is much smaller, and thus easier to learn.
features:
- Complete software emulation of Intel's 8086 microprocessor.
- Interactive Debugger and Disassembler.
- Step-by-step Assembly Language Tutorials.
- Integrated 8086 ASSEMBLER !
- Advanced Source Editor with Syntax Highlight.
- Everything for coding in Assembly Language. All in one!
Off the site:
Microprocessor Emulator with integrated 8086 Assembler and Free Tutorial. Emulator runs programs on a Virtual Machine, it emulates real hardware, such as screen, memory and input/output devices.
If you just began to study assembly language, then this program is just for you. The source code is assembled and executed on emulator step by step. You can watch registers, flags and memory while your program is running. You'll be amazed how easy it is!
Emu8086 pack combines an advanced source editor with automatic syntax-highlight, assembler, disassembler, software emulator (Virtual PC) with debugger, and step by step tutorials.
Emu8086 is complete 'all in one' solution for coding in Assembly Language.
Emulator runs programs on a Virtual PC, this completely blocks your program from accessing real hardware, such as hard-drives and memory, since your assembly code runs on a virtual machine, this makes debugging much easier.
Arithmetic & Logical Unit (ALU) shows the internal work of the central processor unit (CPU).
8086 machine code is fully compatible with all next generations of Intel's micro-processors, including Pentium II and Pentium 4, I'm sure Pentium 5 will support 8086 as well. This makes 8086 code very portable, since it runs both on ancient and on the modern computer systems. Another advantage of 8086 instruction set is that it is much smaller, and thus easier to learn.
Last edited by darklordz on Sun Mar 14, 2004 6:10 am, edited 2 times in total.

Theres nothing stopping the use of PureBasic for writing an OS.
The libraries are OS specific. These would all need replacing.
All PB does is generate ASM. Anything that can be done in ASM can therefore be done in PureBasic. If there is a feature lacking, then you just have to use inline asm, or write a library function in ASM or even C.
It is difficult, and PB has not been optimised for system programming in the way that C has. However, there is nothing that makes it impossible.
The libraries are OS specific. These would all need replacing.
All PB does is generate ASM. Anything that can be done in ASM can therefore be done in PureBasic. If there is a feature lacking, then you just have to use inline asm, or write a library function in ASM or even C.
It is difficult, and PB has not been optimised for system programming in the way that C has. However, there is nothing that makes it impossible.
You'd have to code inline asm specific.. not use PB's ASM output...
My guess is that it WOULD be possible..
My guess is that it WOULD be possible..
Last edited by LarsG on Sun Mar 14, 2004 2:54 pm, edited 1 time in total.
AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
As far as I can see the only os-specific part of the Asm is the win main initialisation.Even the asm-output is os-spezific code. You can't use it.
However, since there are already PB compilers for 3 os (Amiga, Linux and Windows) and at least two processors then these are all minor things.
Possible, yes. Practical... I think not.
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
..
That's just plain scary.darklordz wrote:if you want to create an os checkout www.emu8086.com it great. A friend of mine and i bought it together, we both are working on a simple os using it. try the demo it ha a 5 kb kernell &loader included!

- np