Author Topic: Subforum for Free Basic  (Read 285 times)

Vortex

  • Member
  • *****
  • Posts: 2056
Subforum for Free Basic
« on: January 14, 2020, 06:56:27 AM »
Hello,

Could we consider a subforum for Free Basic? What are the opinions of the forum members?

jj2007

  • Member
  • *****
  • Posts: 9912
  • Assembler is fun ;-)
    • MasmBasic
Re: Subforum for Free Basic
« Reply #1 on: January 14, 2020, 07:21:17 AM »
I've been following the FB forum for some time. The interest for assembly is limited, also because of their claim to cover Windows & Linux in 32- and 64-bit land. FB relies heavily on C++ compilers, and you can feel that. IMHO the language is drifting away from BASIC towards some variant of C++.

What would you expect from a FB subforum? Btw does anybody know what happened to MichaelW? He used to be very active at the FB forum.

Vortex

  • Member
  • *****
  • Posts: 2056
Re: Subforum for Free Basic
« Reply #2 on: January 14, 2020, 08:02:29 AM »
Hi Jochen,

Sadly, no news from MichaelW since long time. I know, he was a very active in the Free Basic ( FB ) forums.

As you said, the interest to assembly in the FB community is limited. The preprocessor of FB accepts the Gas macros, that looks interesting. I agree with you that FB is inclined now towards C++

Free Basic can use Masm and \ or Gas modules. Without those C++ features, FB is easy to learn and use. The language can be powered by assembly.

Another idea could be to combine Power Basic, Free Basic plus some other basic dialects like Rapid-Q Basic and Oxygen Basic under a subforum.

jj2007

  • Member
  • *****
  • Posts: 9912
  • Assembler is fun ;-)
    • MasmBasic
Re: Subforum for Free Basic
« Reply #3 on: January 14, 2020, 08:17:32 AM »
Since at least October 2010, MasmBasic ships with an interface to VBA - you can add that to the list :bgrin:

daydreamer

  • Member
  • ****
  • Posts: 993
  • I also want a stargate
Re: Subforum for Free Basic
« Reply #4 on: January 14, 2020, 08:37:44 AM »
Another idea could be to combine Power Basic, Free Basic plus some other basic dialects like Rapid-Q Basic and Oxygen Basic under a subforum.
That sounds like a good idea
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
Gone serverside programming p:  :D
I love assembly,because its legal to write
princess:lea eax,luke
:)

jcfuller

  • Member
  • **
  • Posts: 185
Re: Subforum for Free Basic
« Reply #5 on: January 14, 2020, 09:13:14 AM »
I found this topic relevant for the MASM Forum
https://www.freebasic.net/forum/viewtopic.php?f=8&t=27478

Another focus might be a port of José Roca's FreeBasic  Framework  to MasmBasic + ObjAsm?

James

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 6857
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Subforum for Free Basic
« Reply #6 on: January 14, 2020, 10:43:54 AM »
The reason why there is a PowerBASIC subforum in this forum is mainly due to me using it as a location to post code for PB folks that is free from the DDT wrapper brigade at the PowerBASIC forum. I keep it well out of the way so it does not detract from the primary task of this forum which is MASM and some other related assemblers.

We can tolerate some C/C++ code as MASM and most other x86 assemblers interface with C/C++ directly and can be considered part of the tool chain. As various dialects of BASIC have their own forums, I don't see what advantage it would be for a dedicated assembler forum to cater for a mix of BASIC dialects, especially as at least some of them have very different licencing assumptions behind them.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

AW

  • Member
  • *****
  • Posts: 2508
  • Let's Make ASM Great Again!
Re: Subforum for Free Basic
« Reply #7 on: January 14, 2020, 06:39:29 PM »
Quote
FBIde - Classic IDE for FreeBASIC written in C++ using WxWidgets. (Windows)
Not a good advertising. :skrewy:

caballero

  • Member
  • *****
  • Posts: 1259
  • Matrix - Noah
    • abre ojos ensamblador
Re: Subforum for Free Basic
« Reply #8 on: January 14, 2020, 07:51:12 PM »
Another idea could be to combine Power Basic, Free Basic plus some other basic dialects like Rapid-Q Basic and Oxygen Basic under a subforum.
That would be nice, I'm a fan of basic  :thumbsup:
The logic of the error is hidden among the most unexpected lines of the program

jj2007

  • Member
  • *****
  • Posts: 9912
  • Assembler is fun ;-)
    • MasmBasic
Re: Subforum for Free Basic
« Reply #9 on: January 14, 2020, 10:46:25 PM »
I found this topic relevant for the MASM Forum
https://www.freebasic.net/forum/viewtopic.php?f=8&t=27478

That thread looks familiar :mrgreen:

Re: Gas64 (no more use of gcc, only gas) :-)
Quote
Quote
SARG wrote:
I guess I'm not clear enough or maybe you should read more carefully.... :-)
[rant]Maybe it's not your fault, no idea. Every single FB "package" has its own quirks, needs specific settings, environment variables (set PATH? set INCLUDE?). Most of my FB stuff works now, but every time I see some interesting non-standard stuff, it needs a trial and error session to find out where exactly gccwhatever.exe has to sit, and where it might find its includes. I have never ever experienced a programming language that had so messy setup requirements. Even the Masm32 setup (note: utterly complicated ASSEMBLER, not Beginner's All-purpose Symbolic Instruction Code) is orders of magnitude simpler.[/rant]

SARG does interesting stuff, but FB really suffers from general confusion, and the fact that the FB "compiler" is more or less a frontend for some C++ backend. My impression is that two thirds of the FB forum threads deal with "how do I have to setup my includes, and which C++ compiler is the best to run my hello world proggie?"

daydreamer

  • Member
  • ****
  • Posts: 993
  • I also want a stargate
Re: Subforum for Free Basic
« Reply #10 on: January 15, 2020, 01:53:50 AM »
The reason why there is a PowerBASIC subforum in this forum is mainly due to me using it as a location to post code for PB folks that is free from the DDT wrapper brigade at the PowerBASIC forum. I keep it well out of the way so it does not detract from the primary task of this forum which is MASM and some other related assemblers.

We can tolerate some C/C++ code as MASM and most other x86 assemblers interface with C/C++ directly and can be considered part of the tool chain. As various dialects of BASIC have their own forums, I don't see what advantage it would be for a dedicated assembler forum to cater for a mix of BASIC dialects, especially as at least some of them have very different licencing assumptions behind them.
but as you tolerate little TinyC code,couldnt you tolerate little other BASIC dialect,its easy to work without annoying GDI memory leaks or too much GDI or need to d3d more complex vertices drawing when experimenting
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
Gone serverside programming p:  :D
I love assembly,because its legal to write
princess:lea eax,luke
:)

Vortex

  • Member
  • *****
  • Posts: 2056
Re: Subforum for Free Basic
« Reply #11 on: January 15, 2020, 05:13:03 AM »
Hi Jochen,

The 32-bit version of Free Basic depends on as.exe to compile source code. It's the 64-bit version using gcc.exe. The default setup of Free Basic is easy and it does not pose problems. Let's see how Sarg's work will continue, he's doing a nice job.


Vortex

  • Member
  • *****
  • Posts: 2056
Re: Subforum for Free Basic
« Reply #12 on: January 15, 2020, 05:25:55 AM »
Here is a quick Free Basic example built without the run-time library. Without objdump removing the unnecessary sections from the object module, the size of the compiled executable is 4Kb. objdump helps to reduce the size to 3Kb.

Code: [Select]
\FreeBASIC\fbc -nodeflibs -c Wnd.bas
IF EXIST \MinGW\bin\objcopy.exe ( \MinGW\bin\objcopy --remove-section .fbctinf --remove-section .ctors Wnd.o )
\FreeBASIC\bin\win32\ld -e _WinMainCRTStartup -subsystem windows -o Wnd.exe Wnd.o -L\FreeBASIC\lib\win32 -lkernel32 -luser32 -lgdi32 -s

Code: [Select]
' Source code based on : https://www.freebasic.net/wiki/wikka.php?wakka=TutMessageIntro

#include once "windows.bi"

Declare Function WinMain ( hInstance As HINSTANCE,hPrevInstance As HINSTANCE, _
                           szCmdLine As LPSTR,iCmdShow As Integer ) As Integer
                                 
Function WinMainCRTStartup Naked Cdecl alias "WinMainCRTStartup"() as Uint

ExitProcess(WinMain( GetModuleHandle( null ), null,GetCommandLine(), SW_NORMAL ))

End Function


Function WndProc ( hWnd As HWND,message As UINT, _
                   wParam As WPARAM,lParam As LPARAM ) As LRESULT
   
    Function = 0
   
    Select Case( message )
       
        Case WM_PAINT

            Dim rct As RECT
            Dim pnt As PAINTSTRUCT
            Dim hDC As HDC
         
            hDC = BeginPaint( hWnd, @pnt )
            GetClientRect( hWnd, @rct )
           
            DrawText( hDC,"Hello Windows from FreeBasic!",-1,@rct,_
                      DT_SINGLELINE Or DT_CENTER Or DT_VCENTER )
           
            EndPaint( hWnd, @pnt )
           
            Exit Function           
       
        Case WM_DESTROY

            PostQuitMessage( 0 )
            Exit Function

    End Select

    Function = DefWindowProc( hWnd, message, wParam, lParam )   
   
End Function


Function WinMain (hInstance As HINSTANCE,hPrevInstance As HINSTANCE, _
                  szCmdLine As Zstring Ptr,iCmdShow As Integer ) As Integer   
     
    Dim wMsg As MSG
    Dim wcls As WNDCLASS     
    Dim hWnd As HWND
     
    Function = 0
     
    Dim As LPSTR szAppName = @"HelloWindows"
     
    With wcls
        .style         = CS_HREDRAW Or CS_VREDRAW
        .lpfnWndProc   = @WndProc
        .cbClsExtra    = 0
        .cbWndExtra    = 0
        .hInstance     = hInstance
        .hIcon         = LoadIcon( NULL, IDI_APPLICATION )
        .hCursor       = LoadCursor( NULL, IDC_ARROW )
        .hbrBackground = GetStockObject( WHITE_BRUSH )
        .lpszMenuName  = NULL
        .lpszClassName = szAppName
    End With
         
 
    If( RegisterClass( @wcls ) = FALSE ) Then
       MessageBox( null, "Failed to register wcls!", szAppName, MB_ICONERROR )
       Exit Function
    End If
     

    hWnd = CreateWindowEx( 0, _
                           szAppName, _
                           "The Hello FreeBasic Program", _
                           WS_OVERLAPPEDWINDOW, _
                           CW_USEDEFAULT, _
                           CW_USEDEFAULT, _
                           CW_USEDEFAULT, _
                           CW_USEDEFAULT, _
                           NULL, _
                           NULL, _
                           hInstance, _
                           NULL )

    ShowWindow( hWnd, iCmdShow )
    UpdateWindow( hWnd )
 

    While( GetMessage( @wMsg, NULL, 0, 0 ) <> FALSE )   
        TranslateMessage( @wMsg )
        DispatchMessage( @wMsg )
    Wend
   
    Function = wMsg.wParam

End Function

jimg

  • Member
  • ***
  • Posts: 369
Re: Subforum for Free Basic
« Reply #13 on: January 16, 2020, 03:45:16 AM »
Hey guys-

I tried to register with the freebasic forum but failed.   

the question to answer is-
What is the name of the programming language this site is about? Append four exclamation marks and one "period" to the end of your answer:

I answered  freebasic!!!!.

but apparently that's not correct.  Two other trys and I exceeded my attempts.

any guesses?

Vortex

  • Member
  • *****
  • Posts: 2056
Re: Subforum for Free Basic
« Reply #14 on: January 16, 2020, 05:22:29 AM »
Hi jimg,

Maybe I am wrong but the forum can expect a case-sensitive reply : could you try FreeBASIC instead of freebasic ?