Search found 52 matches

by IchMagBier
May 18, 2020 6:54
Forum: Libraries & Headers
Topic: raylib headers
Replies: 88
Views: 31557

Re: raylib headers

who was the genius bright fellow, that converted a beauty .h interface into fellow garbage OOP?? genius people these days... Hey, that was me :) Good to hear, that you like my work. I have added some constructors to Raylib's structs, no OOP besides that. They are completely optional though and only...
by IchMagBier
Apr 11, 2020 4:26
Forum: General
Topic: Accessing a global array with inline-ASM
Replies: 2
Views: 772

Re: Accessing a global array with inline-ASM

Oh God, I completely forgot that you could use pointers like that. Now this is embarrassing.
Thank you
by IchMagBier
Apr 10, 2020 17:14
Forum: General
Topic: Accessing a global array with inline-ASM
Replies: 2
Views: 772

Accessing a global array with inline-ASM

Hello :) So I am trying to read a 16bit integer out of an 8bit array. Since that usually would involve some bitshifting, which the compiler doesn't optimize, I decided to do it in Assembler instead. However, I can't seem to find an easy way to access the array with an index inside a register like &q...
by IchMagBier
Mar 12, 2020 4:52
Forum: Libraries & Headers
Topic: raylib headers
Replies: 88
Views: 31557

Re: raylib headers

Ported the rlights.h header, to port some examples that need it (namely, models_material_pbr.c). However, all I've got was a white screen. So, I tested the C example and alas, same thing. models_material_pbc.c does work for me as expected. What OpenGL version is in use for you? It should tell in th...
by IchMagBier
Mar 10, 2020 7:16
Forum: Libraries & Headers
Topic: raylib headers
Replies: 88
Views: 31557

Re: raylib headers

I ported the raymarching example: https://github.com/IchMagBier/raylib-fb/blob/master/examples/3d_shaders.bas https://thumbs2.imgbox.com/d2/76/Pwb48Qk2_t.png I have added your examples to my repo aswell. I changed the formatting a bit to fit with the existing examples' style. I also included the fil...
by IchMagBier
Mar 09, 2020 20:28
Forum: Libraries & Headers
Topic: raylib headers
Replies: 88
Views: 31557

Re: raylib headers

Another one, shaders and shapes: Nice work! Take a look at the "shaders_raymarching.c" example, really amazing stuff there. @IchMagBier: do you think it will be possible to include the resources used by the examples on your repo, to have them handy? That way, upon downloading your repo, t...
by IchMagBier
Mar 09, 2020 16:56
Forum: Libraries & Headers
Topic: raylib headers
Replies: 88
Views: 31557

raylib headers

Hello there :) I have ported the raylib headers and some examples to FreeBasic. The code is on my GitHub: https://github.com/IchMagBier/raylib-fb raylib is an easy to use graphics and audio library based on OpenGL and -AL. raylib features NO external dependencies , all required libraries included wi...
by IchMagBier
Jan 10, 2020 20:09
Forum: Sources, Examples, Tips and Tricks
Topic: [Linux] Try/Catch
Replies: 7
Views: 1569

Re: [Linux] Try/Catch

I'm specifically talking about @IchMagBier's post. Catching segmentation faults is very bad usually, except to do emergency bail out. Ultimately after a segfault, the only appropriate course of action is to abort the program. Because all bets are off. Well, I was in need for a "try catch"...
by IchMagBier
Jan 04, 2020 8:56
Forum: Sources, Examples, Tips and Tricks
Topic: [Linux] Try/Catch
Replies: 7
Views: 1569

[Linux] Try/Catch

Hello :) I wrote this simple exception handler for Linux, which can catch segmentation faults and user defined exceptions, without terminating the program: #include "trycatch.bi" try ' // segmentation fault dim as long ptr bla *bla = 42 catch(e as Exception) if e = SEGMENTATION_FAULT then ...
by IchMagBier
Aug 10, 2019 4:22
Forum: General
Topic: Name a variable after a register
Replies: 1
Views: 3562

Name a variable after a register

Hi! :) I have a problem with a variable named "rax" (like the x86_64 register). It all worked fine until I wrote a bit of inline assembler, that uses the actual rax register: dim as integer rax asm mov rax,42 ' This should work with the register, not the variable print rax ' 42 The bit of ...
by IchMagBier
Aug 10, 2019 4:14
Forum: General
Topic: Sometimes I think the -gen gcc asm code emitter is totaly stupid :-)
Replies: 5
Views: 6234

Re: Sometimes I think the -gen gcc asm code emitter is totaly stupid :-)

With fbc -O 3:

Code: Select all

ADD_ASM:
	addss xmm0,xmm1
	ret

ADD_BASIC:
	addss xmm0, xmm1
	ret
I don't know why it still creates the ADD_BASIC function, when it's inlined anyway. But besides that, this seems to be the best solution I can think of.
by IchMagBier
Apr 19, 2019 16:31
Forum: DOS
Topic: FreeDOS, Hello World program crashes
Replies: 0
Views: 12682

FreeDOS, Hello World program crashes

Hello :) So I wanted to try out the new fbc 1.06.0 on FreeDOS 1.2. However, I can't seem to get a simple "Hello World" program working. It is crashing with a "Page fault". I am using CSDPMI7, which is working on Dosbox. The program looks like this: print "Hi" The genera...
by IchMagBier
Jan 08, 2019 16:20
Forum: Community Discussion
Topic: Has anyone looked into Jai?
Replies: 17
Views: 8304

Re: Has anyone looked into Jai?

what about breaking a call with expressions in the arguments over multiple lines? A compiler usually tokenizes the code instead of directly parsing it. Let's tokenize by hand: testfunc(1,2,3) Would create those tokens: SYMBOL "testfunc" OPEN PARANTHESIS CONSTANT "1" COMMA CONSTA...
by IchMagBier
Jan 08, 2019 15:22
Forum: Community Discussion
Topic: Has anyone looked into Jai?
Replies: 17
Views: 8304

Re: Has anyone looked into Jai?

This looks promising, but ... return x + y + z ; ... why do we need semicolons in 2019? I never got why a programming language would need a semicolon as its line delimiter. Either use 0x0A or simply don't use a line delimiter at all. It's not harder to parse this x=1+2 y=3+4 than this x=1+2; y=3+4; ...
by IchMagBier
Dec 06, 2018 3:57
Forum: Projects
Topic: JIT-Assembler (x86)
Replies: 1
Views: 1423

JIT-Assembler (x86)

Hello I was in need of creating executable code during runtime, so I have created this little JIT-Assembler. It allows you to dynamically compile Assembler-code during runtime. This can be used to speed up a scripting language or an emulator. At the moment it only works with 8bit operations, I might...