Search found 250 matches

by TeeEmCee
Jan 12, 2018 7:47
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 209
Views: 15117

Re: Pure FB Runtime Library (in progress)

I get quite a few errors when I try to compile. Does "fbc -c *.bas" work for you? It doesn't work here. Not all of these are unix-specific problems. I'm currently working on fixing all the errors and warnings. Also, (if I go back to git commit 7b994f739, which compiles on Unix), the make f...
by TeeEmCee
Dec 27, 2017 23:00
Forum: Community Discussion
Topic: tips from a demo coder
Replies: 15
Views: 1085

Re: tips from a demo coder

If you're comparing two floating point numbers for equality, you probably have a bug in your code.

...I had to fix such a bug in my own code just last night :/
by TeeEmCee
Dec 15, 2017 1:56
Forum: Projects
Topic: UTF-8 Variable Length String Library
Replies: 35
Views: 2609

Re: UTF-8 Variable Length String Library

Why did you make this a single .bi file rather than a .bas and .bi pair? Anyone who wants to use it will have to manually split it into two files. You can add support to your project by simply include the BI file (at the top). No need to split the procedures to a separate BAS file. The compiler see...
by TeeEmCee
Dec 15, 2017 1:27
Forum: Projects
Topic: compile-time bindgen for FB
Replies: 18
Views: 2125

Re: compile-time bindgen for FB

I like counting_pine's suggestion. I was about to suggest something similar. It seems simpler to distribute .bi files with FB which #include_c the original header and then add whatever couldn't be translated to FB, than to have to deal with a DSL for specifying the "hints". fbfrog works be...
by TeeEmCee
Dec 13, 2017 3:28
Forum: Projects
Topic: UTF-8 Variable Length String Library
Replies: 35
Views: 2609

Re: UTF-8 Variable Length String Library

Awesome; I'll just use these rather than continue my own project. However having support built into FB would still be a huge improvement, for type checking. Why did you make this a single .bi file rather than a .bas and .bi pair? Anyone who wants to use it will have to manually split it into two fil...
by TeeEmCee
Dec 07, 2017 9:54
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 209
Views: 15117

Re: Pure FB Runtime Library (in progress)

Why not just call atexit? Your library still depends on the C runtime library. New question: win32/sys_portio.c has these lines in it: __asm__ volatile ("inb %1, %0" : "=a" (value) : "d" (port)); __asm__ volatile ("outb %0, %1" : : "a" (value), "...
by TeeEmCee
Dec 07, 2017 8:49
Forum: Community Discussion
Topic: The RETURN of GOSUB
Replies: 34
Views: 8490

Re: The RETURN of GOSUB

Trivia: as you can see in the thread fxm linked to from 2006, I created my own reimplementation of GOSUB/RETURN (called GOSUB/RETRACE) using either asm or setjmp/longjmp, which could be used in -lang fb. However it didn't support -gen gcc. We finally got rid of it and the last of the GOSUBs in the O...
by TeeEmCee
Dec 07, 2017 6:56
Forum: Projects
Topic: UTF-8 Variable Length String Library
Replies: 35
Views: 2609

Re: UTF-8 Variable Length String Library

Cool! I also used "type ustring as string" to denote a string containing UTF8 characters. I haven't gotten around to writing replacements for all the builtin string functions/statements yet, though. I think UTF8 strings really should be added to FB as a native data type, with ustring overl...
by TeeEmCee
Oct 29, 2017 14:02
Forum: Linux
Topic: OpenBSD porting work
Replies: 4
Views: 498

Re: OpenBSD porting work

Yes, as an example, many of the existing include files distributed with FB were generated with SWIG. dkl has been replacing them with new headers generated with fbfrog, which has resulted in some breaking changes, but the results do seem better. The crt/system headers are still SWIG+hand written. Th...
by TeeEmCee
Oct 28, 2017 14:05
Forum: Linux
Topic: OpenBSD porting work
Replies: 4
Views: 498

Re: OpenBSD porting work

Thanks for that link. dkl's fbfrog does automatic 'parameterisation': it combines multiple versions of include files from different OSes into one, spliced with ifdef's. I think it can merge multiple FB headers in a separate step after they've been translated individually, but I'm not sure. If so, th...
by TeeEmCee
Oct 28, 2017 12:21
Forum: Community Discussion
Topic: FreeBASIC OpenBSD package
Replies: 15
Views: 1371

Re: FreeBASIC OpenBSD package

Does FB 1.05 work on FreeBSD if you manually force -asm att, like for OpenBSD? I would guess yes, but didn't try it. Maybe that there are almost no users (are there any aside from me?) for that reason and that there are no official releases and it's not listed as supported. I had a quick look at the...
by TeeEmCee
Oct 27, 2017 15:17
Forum: Community Discussion
Topic: FreeBASIC OpenBSD package
Replies: 15
Views: 1371

Re: FreeBASIC OpenBSD package

OK, I created a new thread for discussing the porting details. Better to discuss in the open rather than email, as there are other people working on related FB ports like Mac and FreeBSD, aside from you and I. FB does intend to officially support OpenBSD. The fact that OpenBSD and other OSes aren't ...
by TeeEmCee
Oct 27, 2017 15:16
Forum: Linux
Topic: OpenBSD porting work
Replies: 4
Views: 498

OpenBSD porting work

This thread is split off of FreeBASIC OpenBSD package to discuss work to properly support OpenBSD. I downloaded an OpenBSD install disc but don't have time to install and play around for a few days. On OpenBSD, this compiler happens to be named egcc, as to not conflict with some architectures that h...
by TeeEmCee
Oct 25, 2017 10:22
Forum: Community Discussion
Topic: FreeBASIC OpenBSD package
Replies: 15
Views: 1371

Re: FreeBASIC OpenBSD package

Thank you! I was just looking into creating a FreeBSD portfile yesterday, and will base it off of yours. # All they seem to support. ONLY_FOR_ARCHS = amd64 i386 arm and aarch64 targets are supported. I'm not really clear how different ARM CPUs and ABIs are handled (fbc only understands the names arm...
by TeeEmCee
Oct 16, 2017 22:41
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 209
Views: 15117

Re: Pure FB Runtime Library (in progress)

Those functions are in crt/io.bi rather than direct.h FPC has a strong module system, and regardless of backend (can be JVM, can link to objective C etc) or object format, there is always a precompiled header per module with such info (.ppu), and all modules must be compiled (and their info loaded) ...

Go to advanced search