Code: Select all
Print "Hello World"
Is it possible to reduce this??
Code: Select all
Print "Hello World"
LOL, that actually did make me laugh out load. Good one.marcov wrote:sure, customize everything. Roll your own RTS and compiler.
Maybe you can try to compile your code to ASM (a switch exists for that when you call fbc) then tweak it by hand?mrminecrafttnt wrote:A simple compiledhave a filesize of 24,5kb.Code: Select all
Print "Hello World"
Is it possible to reduce this??
Source code
-b < name >
Add a source file to compilation
-i < name >
Add a path to search for include files
-include < name >
Include a header file on each source compiled
-d < name=val >
Add a preprocessor's define
-lang < name >
Select language mode: fb, fblite, qb, deprecated
-forcelang < name >
Select language mode: fb, fblite, qb, deprecated (overides statements in code)
Code generation
-target < platform >
Set the target platform for cross compilation
-gen < backend >
Sets the compiler backend (default is 'gas').
-asm < format >
Sets the assembler format for Asm block.
-arch < type >
Set target architecture (default: 486)
-O < level >
Set the optimization level (-gen gcc).
-vec < level >
Set level of vector optimizations enabled by the compiler (default: 0)
-fpu < type >
Set the floating point arithmetics unit (default: FPU)
-fpmode < type >
Select between fast and accurate floating-point operations (default: PRECISE)
-z < value >
Sets miscellaneous or experimental options.
Compilation
-m < name >
Main file without extension, the entry point (default is the first .bas file on the command line)
-g
Add debug info
-profile
Enable function profiling
-e
Add error checking
-ex
Add error checking with RESUME support
-exx
Same as -ex plus array bounds and null-pointer checking
-Wa < opt >
Pass options to GAS (separated by commas)
-Wc < opt >
Pass options to GCC (separated by commas)
-o < name >
Set object file path/name (must be passed after the .bas file)
Linking
-a < name >
Add an object file to linker's list
-l < name >
Add a library file to linker's list
-p < name >
Add a path to search for libraries
-mt
Link with thread-safe runtime library
-nodeflibs
Do not include the default libraries
-static
Prefer static libraries over dynamic ones when linking
-map < name >
Save the linking map to file name
-Wl < opt >
Pass options to LD (separated by commas)
-export
Export symbols for dynamic linkage
-lib
Create a static library
-dylib
Create a DLL, including the import library
-dll
Create a DLL, including the import library. (Same as -dylib)
-x < name >
Set executable/library path/name
Behaviour
-prefix < path >
Set the compiler prefix path
-version
Show compiler version on the command line, do not compile or link.
-v
Be verbose
-print < option >
Display certain information (host, target, etc.)
-pp
Emit the preprocessed input file only, do not compile
-r
Compile into intermediate file(s) only, do not assemble or link
-rr
Compile into asm file(s) only, do not assemble or link
-c
Compile and assemble source file only, do not link
-R
Do not delete the intermediate file(s)
-RR
Do not delete the asm file(s)
-C
Do not delete the object file(s)
-w < value >
Set min warning level: all, pedantic, next or a value
-maxerr < val >
Only stop parsing if <val> errors occurred
-noerrline
Do not show source line where error occurred
Target specific
-s < name >
Set subsystem (gui, console)
-t < value >
Set stack size in kbytes (default: 1M)
Meta
@< file >
Read (additional) command-line options from a file
yes (example from https://msdn.microsoft.com/en-us/library/y8b57x4b.aspx)mrminecrafttnt wrote: have a filesize of 24,5kb.
Is it possible to reduce this??
Code: Select all
#include "crt.bi"
dim as string frmt = !"%s %s\n"
dim as string hello = "Hello"
dim as string world = "world"
asm
mov eax, [world]
push eax
mov eax, [hello]
push eax
mov eax, [frmt]
push eax
call printf
'clean up the stack so that main can exit cleanly
'use the unused register ebx to do the cleanup
pop ebx
pop ebx
pop ebx
end asm
Code: Select all
#include "crt/io.bi"
#include "crt/stdlib.bi"
printf(!"Hello World!\n")
system_("pause")
It was not meant as a joke. If you have extreme views on topics like minimal size, I don't see why the general distribution should cater for this.PaulSquires wrote:LOL, that actually did make me laugh out load. Good one.marcov wrote:sure, customize everything. Roll your own RTS and compiler.
Where do you find the file "i386pe.x" as required at http://www.dbfinteractive.com/forum/ind ... 10.30;wap2 ?UEZ wrote:It works for me with the latest version (1.05).
Code: Select all
#include "crt/io.bi"
#include "crt/stdlib.bi"
printf(!"Hello World!\n")
system_("pause")