flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Porting FASM/NASM to MikeOS (Written in NASM) |
Author |
|
sid123 31 Jul 2013, 15:17
Hello FASM Community,
I have recently joined this forum for our Assembly Project... A few days ago I found out this small-open-source OS project : mikeos.berlios.de - MikeOS by Mike Saunders, Note that it runs on BIOS(not protected-mode because of certain driver problems) and it will not run on UEFI machines. I have also seen projects like : Kolibri OS Menuet OS DEX OS The very common thing (not mikeos) I have seen is that they have FASM compiler within them. Of course I cannot directly port the "FASM.exe" to my OS. It will be something to Do with the source. I successfully generated a FASM.o file through the FASM compiler, but now my question is : "How do I use this in MikeOS (made in NASM)" I doubt this is possible, cause the .o file is made by FASM, and is used in NASM. If not then, How to do I port NASM to MikeOS? I would be grateful to those who response to my question P.S. : I have existing knowledge of C,C++,Java,C# and NASM, Since FASM is a lil different from NASM, I end up with some syntax error! _________________ "Those who can make you believe in absurdities can make you commit atrocities" -- Voltaire https://github.com/Benderx2/R3X XD |
|||
31 Jul 2013, 15:17 |
|
sid123 01 Aug 2013, 08:59
Thanks! Mike Gonta, for porting MikeOS to FASM;
Got it to work but still can't figure out to port FASM, Any docs available for that job? Or anyone here who knows how to? |
|||
01 Aug 2013, 08:59 |
|
Tomasz Grysztar 01 Aug 2013, 09:27
I once released a guide for this purpose: http://board.flatassembler.net/topic.php?p=28103#28103
It is old and may not be up to date in all the details, though. If you have any specific problems with it, please ask. |
|||
01 Aug 2013, 09:27 |
|
JohnFound 01 Aug 2013, 09:31
sid123 wrote: Any docs available for that job? FASM is relatively easy portable program. That is why it is so popular for assembly OS development. The most of FASM sources are OS independent and it needs only very thin OS dependent layer, that to provide interface to the target OS. The official guide to FASM internals should be enough to port FASM to any platform. Reading sources also helps a lot. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
01 Aug 2013, 09:31 |
|
Dex4u 01 Aug 2013, 22:20
The main problem you will have is that MikeOS is for real mode and is limited to apps that fit into a single 64K memory segment, this is also the case for read/write.
So you will need to study the Dos ver of fasm. PS: I did write a ver for MiniDos thats also is a realmode OS with very basic functions, but i simple used a cut down ver of DexOS that included a fasm port and fat drivers etc in one app, that just needed to be loaded and run to work. It did all the work in pmode before returning to realmode with the assembler OK info or any errors messages. |
|||
01 Aug 2013, 22:20 |
|
Mike Gonta 02 Aug 2013, 17:10
Dex4u wrote: The main problem you will have is that MikeOS is for real mode and is limited to apps |
|||
02 Aug 2013, 17:10 |
|
Dex4u 04 Aug 2013, 22:50
Mike Gonta wrote:
Cool, that would make it much easier to port. |
|||
04 Aug 2013, 22:50 |
|
sid123 10 Aug 2013, 08:18
Thanks for the reply FASM Community, and especially Mike Gonta for his splendid MikeOS resources, Since MikeOS has been ported to 32-bit mode. I think the milestone is near.
I studied the FASM internals, and got to know that the 2 files FASM.ASM And SYSTEM.INC are the 2 main files of the Assembler. Assembling them with Flat Assembler gives a FASM.O file. I think it's some type of library, which has to be called by a MikeOS executable i.e. a .bin file. The executable will ask for the .ASM filename and then will compile the .ASM into a .bin file like NASM does for the applications. Any guesses on how to do this? |
|||
10 Aug 2013, 08:18 |
|
Mike Gonta 10 Aug 2013, 18:08
sid123 wrote: Since MikeOS has been ported to 32-bit mode. (and subsequent CPU mode switching). MikeOS32 is a simple translation to PM32 and requires a suitable BIOS extender to run. aeBIOS provides this service in a simple transparent way. The important thing is that aeBIOS allows an OS or standalone application/game to be programmed in the simple old time style of RM16 without the inherent restrictions. Quote: I think the milestone is near. Quote: I studied the FASM internals, and got to know that the 2 files FASM.ASM And SYSTEM.INC are the 2 main to convert it into an actual binary executable file. This is one option in FASM. However, FASM can generate the final executable binary (the same as NASM) directly without the use of a linker. This is how the kernel32.asm file in MikeOS32 can be assembled in FASM and the kernel32.bin produced. The main issue with porting FASM to MikeOS32 is the current lack of certain file system support (also of course lacking in MikeOS). This includes open, close and lseek. MikeOS32 / MikeOS is currently limited to reading and writing complete files (as well as some auxiliary support) and only from the root directory and only in FAT12. |
|||
10 Aug 2013, 18:08 |
|
sid123 15 Aug 2013, 02:31
So Any Ideas?????
By the way Anybody knows how to compile a exe file in nasm without the .asm in the output, like when I compile a source file like, source.asm the output is source.asm.exe, (PS: I am using the bin extension) because I want to change the format of the MikeOS executable........ |
|||
15 Aug 2013, 02:31 |
|
sid123 17 Aug 2013, 13:03
Is there any way to increase the memory segment in mikeos?
::::: Is this forum dead? |
|||
17 Aug 2013, 13:03 |
|
sid123 24 Aug 2013, 15:43
Hey Guys! MikeOS has an utility called Monitor.Bin which converts HEX to MACHINE CODE so that does half the job, Now what remains is ASM TO HEX (which we will make)
Also I have heard that making assemblers is easy if one knows good assembly. And we can make one in MIKE assembly? And assemblers don't Need some complex File System they can run on any environment which supports reading and writing to a storage device. Forget FASM,NASM,GAS,YASM,NASM,TASM and complex assembler but yes we can write out own simple assembler, So anybody, Yeah but first we are going to need Intel x86 manuals, IA-32 manuals and x86 assembly knowledge.... |
|||
24 Aug 2013, 15:43 |
|
sid123 14 Oct 2013, 08:43
Finally a guy has wrote an Assembler for MikeOS
Here it is https://github.com/leonardo-ono/asm4mo I am porting it to MikeOS32.... YAY! |
|||
14 Oct 2013, 08:43 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.