is fbc.exe made by gcc ?

New to FreeBASIC? Post your questions here.
acat1433
Posts: 10
Joined: Sep 16, 2009 9:01

is fbc.exe made by gcc ?

Post by acat1433 »

1st,
is fbc.exe made by gcc ?
fbc is a compiler.
or,
is it made by itself?
is freebasic compiler made by freebasic compiler?

2nd,
the result "fbc.exe -r *.bas" is "*.asm".
so,can these "*.asm" compile by nasm?

3rd,
can I learn freebasic in reactos system?
is there some error when I do it?

er,my English is poor.It's not my native language.
-_-!!!
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Post by vdecampo »

FBC and all other FB programs are made using FreeBASIC, then the AS GNU assembler.

-Vince
TheMG
Posts: 376
Joined: Feb 08, 2006 16:58

Post by TheMG »

You most likely cannot use NASM as there will be little differences (there's nothing to stop you trying, though). It should be relatively simple to edit into something NASM accepts.

ReactOS tries to provide compatibility for Windows programs. It may work, but it not supported. If it doesn't work, try giving them an example program and see if they can fix it.
acat1433
Posts: 10
Joined: Sep 16, 2009 9:01

Post by acat1433 »

Thank you to all!

:)

I find that the JellyFB Editor can do well in reactos-0.3.10.

is The JellyFB Editor very popular in the circle as a IDE?

and,is it a open-software or free-software just like RMS saying?
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

fbc is licensed under the GPL.
Jerry Fielden
Posts: 165
Joined: May 27, 2005 14:14
Location: Marshall, Oklahoma, USA
Contact:

Post by Jerry Fielden »

JellyFB is popular with me.

JellyFish editors was written years ago as a commercial product by Paul Squires for PB. Several years ago it went free.

A couple of years ago Paul wrote a FB version. Lately he has renamed it to JellyFB.

JellyFB is Free.
acat1433
Posts: 10
Joined: Sep 16, 2009 9:01

Post by acat1433 »

So,is it meaning that JellyFB and FbEdit IDE Pack also released under GPL?
I find that the FbEdit IDE Pack looks like the IDE of visual basic.

and a funny thing.
just a "Hello,world!" program.
compiled by fbc.exe,the out file size is "15872 bytes 01.exe".
then "fbc.exe -r 01.bas" and "as.exe 01.asm" .
the a.out size is 586 bytes.
I rename a.out as a.exe
but a.exe can't run in WIN32.
jdebord
Posts: 547
Joined: May 27, 2005 6:20
Location: Limoges, France
Contact:

Post by jdebord »

If I understand correctly, the compilation produces an object file which needs to be linked with an additional library to give an executable.

So, you have probably skipped the linking step.
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Post by MichaelW »

I’m not sure that I understand either, but I think the solution may be here:

http://www.freebasic.net/forum/viewtopi ... 404#121404
McLovin
Posts: 82
Joined: Oct 21, 2008 1:15
Contact:

Post by McLovin »

JellyFB is not GPL; it is freeware.
acat1433
Posts: 10
Joined: Sep 16, 2009 9:01

Post by acat1433 »

the linking step,er, what is it?
isn't it like "nasm -f bin myfile.asm -o myfile.com"?

the link,
http://www.freebasic.net/forum/viewtopi ... 404#121404
about the sentence
"I get a working EXE file, and it and the object module have the same sizes as those produced by FBC. "
So,why?
Someone tell me ," the ASM program is the most small."

is it meaning that JellyFB don't open its source?
what about "FbEdit IDE Pack"?

er,Maybe my problem is too much.
what about the future plan of freebasic?
Last edited by acat1433 on Sep 19, 2009 1:31, edited 1 time in total.
jevans4949
Posts: 1186
Joined: May 08, 2006 21:58
Location: Crewe, England

Post by jevans4949 »

Briefly a.out, or a.o will be an object file, the results of running the assembler against your source code. Since each line of asm code is likely to take up around 4 bytes on average, it will be quite small.

The .out file does not contain all the library files you need to execute. For this, you need to run it through the program "ld.exe", which should be in the same place as "as.exe".

The parameter list for ld, in the form emitted by fbc, is quite long and complicated. and the documentation is not too clever.

Sorry, got to go ...
acat1433
Posts: 10
Joined: Sep 16, 2009 9:01

Post by acat1433 »

I try "hello,world!" by nasm.

"
org 100h
jmp start
message db "hello,world!$"

start:
mov ax,cs
mov dx,ax
mov es,ax
mov dx,message
mov ah,09h
int 21h
mov ah,4ch
int 21h
"

then,"nasm -f bin hello.asm -o hello.com".

"hello.com" can work in win32.

and its size only "34 bytes".

Why?
Zippy
Posts: 1295
Joined: Feb 10, 2006 18:05

Post by Zippy »

@acat1433

You need a response in your native language.

What is your native language?
acat1433
Posts: 10
Joined: Sep 16, 2009 9:01

Post by acat1433 »

My native language is Chinese。
er,I am a beginner.
I just learn computer one month.
Google is my savior to learn English.
-_-!!!
Post Reply