Search found 191 matches

by TeeEmCee
Oct 03, 2017 11:28
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 96
Views: 2514

Re: Pure FB Runtime Library (in progress)

Wow, you've done a lot of work already! Have you tried running it at all?

I notice a mistake in the translation: you've been translating 'int' to 'integer', but the equivalent of C's 'int' in FB is 'long'.
Also, you need to wrap everything in Extern "C" if you're not doing that already.
by TeeEmCee
Oct 03, 2017 11:18
Forum: Community Discussion
Topic: Unofficial FreeBASIC 1.04.0 OS X release
Replies: 35
Views: 4342

Re: Unofficial FreeBASIC 1.04.0 OS X release

I can guess what the proper solution for that problem is. What do you get when you run "gcc -print-libgcc-file-name"? Calling the the linker ourselves instead of letting gcc do it, even though we depend on gcc and it has numerous platform-specific quirks, is a recipe for disaster. Same rea...
by TeeEmCee
Oct 03, 2017 10:21
Forum: General
Topic: Find the best 8 bit palette for an RGB image
Replies: 67
Views: 1179

Re: Find the best 8 bit palette for an RGB image

If you want smaller files, you should use RLE compression. PNG format is great but you will depend on 3rd-party libraries and I doubt you will find one that will work in DOS. These days you can find dependency-free libraries to read or write any common file format... as long as you're at least targ...
by TeeEmCee
Sep 23, 2017 8:16
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 96
Views: 2514

Re: Pure FB Runtime Library (in progress)

The fallbacks you're talking about... the asm versions of those functions which Imortis posted aren't intended as fallbacks. They're attempted optimisations. Those are all trivial functions, making them practical to rewrite, but FB's rtlib calls plenty of other far more significant libc functions. R...
by TeeEmCee
Sep 21, 2017 10:16
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 96
Views: 2514

Re: Pure FB Runtime Library (in progress)

I don't know what you mean by "non-library options". You mean platforms without a working libc or other requirements? The gcc backend doesn't support naked functions (without prologue/epilogue), but it could be supported, it just isn't (fully) implemented. (You get strange errors if you tr...
by TeeEmCee
Sep 20, 2017 16:11
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 96
Views: 2514

Re: Pure FB Runtime Library (in progress)

What are the cross-backend asm options? I'm not sure what you mean by this, but I guess you're asking about using inline asm in FB in a way that's portable between gcc and gas backends. fbc has "-asm att" and "-asm intel" options to select asm syntax. att syntax only works when ...
by TeeEmCee
Sep 19, 2017 7:38
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 96
Views: 2514

Re: Pure FB Runtime Library (in progress)

The set of functions you posted using raw assembly are guarded by a preprocessor check. They are completely optional; just ignore it. I have no idea why the rtlib includes asm versions of standard C function calls. Probably they should just be deleted; the C versions, either in libc or a compiler in...
by TeeEmCee
Sep 14, 2017 9:46
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 96
Views: 2514

Re: Pure FB Runtime Library (in progress)

I had never even noticed Solaris support before. It was added in 2015 by Stefan Schmidt

Don't worry about details like that. You can use __FB_SOLARIS__ even though it doesn't exist yet. Someone can add it to the compiler later.
by TeeEmCee
Sep 11, 2017 13:36
Forum: Community Discussion
Topic: Question about rtlib
Replies: 13
Views: 556

Re: Question about rtlib

That's entirely separate. If it's totally portable, works, and has an agreeable API I don't see why a sound library shouldn't be standard. Personally I'm not interested in rewriting the rtlib for the sake of it, but I am interested in good system headers. dkl attempted automatic translation of syste...
by TeeEmCee
Aug 06, 2017 1:29
Forum: Beginners
Topic: FB dll for PowerBASIC
Replies: 56
Views: 1217

Re: FB dll for PowerBASIC

Yes, importing .h files would be a huge challenge; it could only work for a subset of headers, such ones with no naming clashes due to case sensitivity and no C code in macros. fbfrog can rename symbols to avoid clashes, but you can't just do that when the user doesn't get a header to inspect to see...
by TeeEmCee
Aug 06, 2017 0:47
Forum: Community Discussion
Topic: What to do about a lack of developers for the compiler?
Replies: 117
Views: 4755

Re: What to do about a lack of developers for the compiler?

The main thing I and other contributors need is someone to review my changes. dkl has rewritten a couple of my previous ones, for reasons that seemed mysterious to me at the time. You need a good holistic understanding of the code base to know what the correct or best to implement something is.
by TeeEmCee
Aug 05, 2017 15:52
Forum: Beginners
Topic: FB dll for PowerBASIC
Replies: 56
Views: 1217

Re: FB dll for PowerBASIC

The 'favoured' platform argument rings true. But any old OS is a pile of emulations layers; Windows maybe even more so than Unix due to the incredible backcompatibility. And Microsoft love coming up with new ways of doing things every couple of years so it gets hard to say which is the "canonic...
by TeeEmCee
Aug 05, 2017 8:09
Forum: Linux
Topic: Sound output?
Replies: 3
Views: 173

Re: Sound output?

Those libraries VANYA mentioned are pretty heavy weight if you just want to play a .wav, since they do so much more than that. For example plain SDL can load and play .wav files or play a PCM stream. SDL_mixer builds on top of SDL, adding support for various audio formats like ogg Vorbis and MIDI. P...
by TeeEmCee
Aug 05, 2017 2:53
Forum: Beginners
Topic: FB dll for PowerBASIC
Replies: 56
Views: 1217

Re: FB dll for PowerBASIC

g++ name mangling does actually follow a standard: the Itanium C++ ABI (on x86 gnu/linux & mingw, not sure about other platforms), with some extensions. The C++ spec says nothing about the ABI. Compilers are free to do whatever they want. Parts of the ABI, in particular libstdc++/libc++, are evo...
by TeeEmCee
Aug 04, 2017 19:15
Forum: General
Topic: linux static binaries
Replies: 5
Views: 209

Re: linux static binaries

Don't use standalone builds on Unix! I don't know of any reason to use them, they just cause pain. (Well, maybe if your distro doesn't even have a C compiler or other build tools, and you want to install them with fbc instead of installing them system-wide?) AFAIK standalone builds are only intended...

Go to advanced search