Re: Compiler FREBASIC - OS Indepenent and Native Code
- Posted by Alexander Toresson <alexander.toresson at gmail.com> Jun 26, 2005
- 797 views
David Ragazzi wrote: > > See the source code in ASM from main.bas. > It prints on Screen "Hello, World!": > > > .intel_syntax noprefix > .arch i486 > > #'main.bas' compilation started at 08:30:58 (FreeBASIC v0.13b) > > #entry point > .section .text > .balign 16 > > .globl fb_main_entry > .globl fb_MAIN_entry > fb_main_entry: > fb_MAIN_entry: > call fb_moduleinit > call fb_modulemain > ret > > #user code > fb_modulemain: > push ebp > mov ebp, esp > > _t0001: > push 1 > push 16 > lea eax, [_t0002] > push eax > call _fb_StrAllocTempDesc@8 > push eax > push 0 > call _fb_PrintString@12 > > push 0 > call _fb_End@4 > mov esp, ebp > pop ebp > ret > > #initialization > fb_moduleinit: > finit > call _fb_Init@0 > ret > > #'main.bas' compilation took 2.131835191355069e-003 secs > > #global initialized constants > .section .data > .balign 16 > > .balign 4 > _t0000: .ascii "\0" > .balign 4 > _t0002: .ascii "Hello, World!!!\0" > > > It dont use none Interruption of system, only BIOS.. > > FreeBasic is all! > > 1. You do not call the bios yourself in any way, you let freebasic do the job of printing it, and that code is platform dependent, it's different for every platform freebasic supports. 2. Even if you tried, you can't call the bios directly in most os's nowadays; you have to use platform dependent system calls that do it for you. 3. I've never heard anyone call x86 assembly code for "platform independent" before. Regards, Alexander Toresson