Compiler Raw output

General FreeBASIC programming questions.
albert
Posts: 5927
Joined: Sep 28, 2006 2:41
Location: California, USA

Compiler Raw output

Postby albert » Dec 07, 2011 22:19

Is there a way to get FB 0.23 to output a NON-OS specific .exe ??

===============================================
I was going over the MINIX code that Linus Torvalds started Linux with.
Minix is now in version 3.?.? http://www.minix3.org/

I was thinking of doing a small OS and designing my own file system.
podvornyak
Posts: 148
Joined: Nov 12, 2007 11:46
Location: Russia

Postby podvornyak » Dec 08, 2011 1:29

Nope... And not only freebasic can't... Maybe you should look at interpretative languages? Like Lisp, Ruby, Java... Php at last.
albert
Posts: 5927
Joined: Sep 28, 2006 2:41
Location: California, USA

Postby albert » Dec 08, 2011 2:28

I thought that AS.EXE or GAS.EXE could output intel binaries, that run on the processor and not a specific OS.

Is there an AS.EXE -?? (switch) to output a 64bit intel binary?
marcov
Posts: 3052
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Postby marcov » Dec 08, 2011 7:48

albert wrote:I thought that AS.EXE or GAS.EXE could output intel binaries, that run on the processor and not a specific OS.

Is there an AS.EXE -?? (switch) to output a 64bit intel binary?


AS and LD can afaik produce a binary that loads on a certain address.

See the generation of the various stages of bootloaders in the various grub and distribution sources.
albert
Posts: 5927
Joined: Sep 28, 2006 2:41
Location: California, USA

Postby albert » Dec 08, 2011 13:41

I think what i need to do first is produce a console and grafix windowing system.

I think a controls library that just holds parameters, and then calls a draw routine to translate the vectors to grafix or text_mode.

That would allow text_mode , grafics_mode , skins , etc.. to all work from a single lib.
marcov
Posts: 3052
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Postby marcov » Dec 08, 2011 15:10

albert wrote:I think what i need to do first is produce a console and grafix windowing system.


I thought the kernel would be the more important part? The fluf can come later.
Sannaj
Posts: 27
Joined: Dec 19, 2010 16:39

Postby Sannaj » Dec 08, 2011 19:13

Do you know any framework supporting platform-independent executables, containing x86-Machine Code? I don't. If you do, inform us about it.

Anyway, why are you need to have a plattform indipendent version of the programm. Just recompile you program for any target or publish the source code.

If you mean writing freestanding code (whitch means you eighter use a custom system interface or having direct access to the hardware (ring 0)) you could use the -nodeflibs, option. Anyway you couldn't use any runtime based functions in this case, whitch means no print or input function, no var-lengh strings, no allocate, etc. (You could also avoid this functions and compile you programm the default way (be aware about the binary format). Then it should be free-standing to.

The work to produce x86-64 machine code, isn't done by the assembler (as) or the linker (ld), but by a compiler whitch is able to do so.
albert
Posts: 5927
Joined: Sep 28, 2006 2:41
Location: California, USA

Postby albert » Dec 09, 2011 2:05

Does that mean that some or all the FB Keywords are parts of libs and building a boot loader with FB would not be possible?
Cherry
Posts: 351
Joined: Oct 23, 2007 12:06
Location: Austria
Contact:

Postby Cherry » Dec 09, 2011 2:32

First, there is no "non-OS exe", because "exe" is already a OS-specific format (DOS/Windows).

However, you might consider taking a look at this: http://wiki.osdev.org/FreeBasic_Barebones
albert
Posts: 5927
Joined: Sep 28, 2006 2:41
Location: California, USA

Postby albert » Dec 09, 2011 4:12

Thanks Cherry!!

The OS's page has hundreds of OS's in production.
But alot of the links are broken due to project retirement (They gave up or got to busy with life to continue them).

Just a compiler or assembler that can spit out raw machine code. is what i was looking for. a "processor specific binary". like a BIOS DevKit.

Return to “General”

Who is online

Users browsing this forum: No registered users and 15 guests