Hello,
Could we consider a subforum for Free Basic? What are the opinions of the forum members?
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. (https://www.freebasic.net/forum/viewtopic.php?t=23786&start=15#p209885)
Hi Jochen,
Sadly, no news from MichaelW since long time. I know, he was 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.
Since at least October 2010, MasmBasic ships with an interface to VBA - you can add that to the list :bgrin:
Quote from: Vortex on January 14, 2020, 08:02:29 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
I found this topic relevant for the MASM Forum
https://www.freebasic.net/forum/viewtopic.php?f=8&t=27478 (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
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.
Quote
FBIde - Classic IDE for FreeBASIC written in C++ using WxWidgets. (Windows)
Not a good advertising. :skrewy:
Quote from: Vortex on January 14, 2020, 08:02:29 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 would be nice, I'm a fan of basic :thumbsup:
Quote from: jcfuller 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
That thread looks familiar :mrgreen:
Re: Gas64 (no more use of gcc, only gas) :-) (https://www.freebasic.net/forum/viewtopic.php?f=8&t=27478&sid=8537770a97ba299abddc2e24581a152d&start=15#p259551)
QuoteQuoteSARG 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?"
Quote from: hutch-- 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.
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
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.
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.
\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
' 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
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?
Hi jimg,
Maybe I am wrong but the forum can expect a case-sensitive reply : could you try FreeBASIC instead of freebasic ?
FreeBasic!!!!period
(I just liked challenges, but have not enrolled :skrewy:)
Tried several variations of capitalization but no luck. I running out of acceptable user names to try. :eusa_boohoo:
https://www.freebasic.net/forum/viewtopic.php?f=17&t=27943&p=267994#p267981 (https://www.freebasic.net/forum/viewtopic.php?f=17&t=27943&p=267994#p267981)
With special greetings from the FB administrator to the Masm32 administrator :bgrin:
QuoteThe MASM forum registration asks 7 questions. I do believe it took me at least 10 attempts to pass the Q&A.
Thank you J.
Finally got registered, but they changed the question so it wasn't so hard on my feeble brain this time :wink2:
The task of forum administration is the same as a janitor, sweep the floors, put the garbage out and retire any pests.
Quote from: Vortex 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.
yes,now I see one reason too,to have a freeBASIC forum,PROC ,ENDP syntaz that masm uses comes from BASIC,not C
a nice basic compiler would be nice
Hi daydreamer,
You would like to visit these sites :
http://basic.mindteq.com/ (http://basic.mindteq.com/)
https://bcxbasiccoders.com/ (https://bcxbasiccoders.com/)
FreeBasic ranks third in mindteq's user rating. The Bcx examples look nice, too. But it's a pity that most BASIC dialects nowadays are just frontends for C compilers :sad:
What's wrong with MASM and Assembly Language?
Very few people here are doing any ASM programming anymore. :sad:
That is probably true but these things tend to be seasonal, sometimes people have much to post, other times not so much so. I still have use of PowerBASIC but I am much more into the Power than the BASIC and this is mainly because it has a decent assembler built into it and it does API code with no problems. With 32 bit assembler, I can routinely swap mnemonic code between 32 bit MASM and PowerBASIC.
> Very few people here are doing any ASM programming anymore
I don't believe it. TinyC is an asm with macros. Many people here use masm+macros. I use asm regularly and don't use macros with it, for that I have tinyc. I must confess that usually is more confortably to me using c than asm, which does not mean that I have abandoned asm. Otherwise I would surely have left this forum. I hope that here never stop talking about assembler, which is why I think we all came here. :thumbsup:
I imagine its the difference between a MACRO assembler and a compiler wrapper. :shhh:
It is normal to use ASM with other languages. Many languages allow it, mostly C/C++, Pascal and some Basic version.
I have done Basic in various flavours since Z80 cpu's, then VB 6 and also VB .Net but don't like it. It is too "basic", but I consider it practical for small endeavours, though. What else about Basic. I don't recall. :biggrin:
When I say I don't use macros I mean that I don't use them vastly, but I use invoke, proc, etc, so I also use them. I think that basic is an old language in which many great programmers have programmed and shared sharp programming knowledge, though basic was designed more for simplicity than for power.
Quote from: caballero on January 26, 2020, 04:30:29 AMbasic was designed more for simplicity than for power.
Back in 1986, GfaBasic could beat C compilers and still was very simple to use. I program in "pure" assembly every day, and quite a lot, but I would definitely not waste time on doing standard tasks like pulling a text file into a string array in "pure" assembly if the Recall() macro can do that in one line. The Masm32 SDK is so easy to use because it was written by somebody who came from PowerBASIC. If Hutch was a C++ guy, it would be an entirely different story.
Today's Basic dialects are much more powerful compared to their ancestors. PowerBASIC is a nice one. It supports assembly and the community support looks good. Free Basic is another interesting choice as it supports 64-bit programming and the GNU tool chain. One can mix Free Basic object modules with assembly and even C\C++ modules.
Talking about freebasic and if I may do it, I attach a raytracing program in freebasic that I just made for drawing a Sphereflake. I promise not to attach more freebasic programs, or even I could remove it. It is a sphere flake generator with raytracing source code and compiled attached. The program takes a while to raise up but it is working and it is making a ppm graphic file in the same folder where you can see its progress. It is 45 kb in size once compiled.
(http://abreojosensamblador.epizy.com/Imags/Common/SphereFlake.png)
Quote from: jj2007 on January 26, 2020, 04:52:55 AM
Quote from: caballero on January 26, 2020, 04:30:29 AMbasic was designed more for simplicity than for power.
Back in 1986, GfaBasic could beat C compilers and still was very simple to use. I program in "pure" assembly every day, and quite a lot, but I would definitely not waste time on doing standard tasks like pulling a text file into a string array in "pure" assembly if the Recall() macro can do that in one line. The Masm32 SDK is so easy to use because it was written by somebody who came from PowerBASIC. If Hutch was a C++ guy, it would be an entirely different story.
but no wonder,C came 1979,BASIC already existed pn many slow builtin basic on cpus,but super fast basic could be loaded from disk,basic games listings with or without Machine Language part in data statements was in computer magazines,and you could get assemblers to your computer
the stars of that time was game programmers that made Pacman,space invaders... in assembler
so you was wannabe game programmer and necesary to learn asm for that purpose,but also thrill of 1000x speed
so first asm game was make game in basic first and make parts of it in data statements until everything was translated
@caballero
great basic program,looks great
@AW
sometimes works on 128bit+ version of this:
http://masm32.com/board/index.php?topic=7324.0 (http://masm32.com/board/index.php?topic=7324.0)
but sometimes busy with doing other things,enjoy sketch manga and scan and import to 2d paint program and use various 3d programs too
maybe lowpoly near 500 polys could be fit into tiny asm program,but you can also enjoy reduction and make tiny same as in assembly
http://masm32.com/board/index.php?topic=6937.0 (http://masm32.com/board/index.php?topic=6937.0)
Hello, I have improved this fractal, taking advantage that it is reflexive, so in fact I only have to paint one octanct and generate only the spheres in this region. With this, it takes 0.1476 seconds to be executed in my computer, while the original one took more than 20 seconds.
Quote from: daydreamer on January 27, 2020, 01:31:43 AM
but no wonder,C came 1979,BASIC already existed ...
BASIC was born 1964.
PASCAL was born 1970.
C was born 1972.
C++ was born 1985.
Quote from: caballero on February 08, 2020, 07:37:49 PM
I have improved this fractal
:thumbsup: Instantaneus!
Perhaps you have to change BitBlt by StretchBlt in your framework, to maintain aspect when resizing window.
But... It is
Quote from: caballero on February 09, 2020, 03:17:26 AM
But... It is
:biggrin: BitBlt is comented! Anyway, aspect it's not preserved.
What do you mean?, the image is streatched
Aspect is h/w ratio. Perhaps not a definition.
Proportion goes with H/W resizing size, that is what I really want, surely there is any switch in stretchblt to get proportion invariable, this way some parts of the window will be black.
Quote from: caballero on February 09, 2020, 08:36:38 AM
this way some parts of the window will be black.
A little obvious... you must paint that :biggrin:
later: ... remembering, I think I maked that in MathArt (http://masm32.com/board/index.php?topic=6339.0)