Search found 45 matches

by IchMagBier
May 04, 2018 19:32
Forum: General
Topic: Calling opcodes
Replies: 10
Views: 515

Re: Calling opcodes

This crashes on 64 bit fbc win 10 Works fine for me on Linux. The statement by you, is by far to fuzzy to make sense, do you have a more "in depth explanation" ? I want to write a JIT-Compiler for a script-language. The compiler generates x86-opcodes out of the script and saves them insid...
by IchMagBier
May 04, 2018 19:20
Forum: General
Topic: Calling opcodes
Replies: 10
Views: 515

Re: Calling opcodes

I need to compile some stuff during runtime and can't do that with inline ASM alone.
by IchMagBier
May 04, 2018 19:05
Forum: General
Topic: Calling opcodes
Replies: 10
Views: 515

Calling opcodes

Hello Is it somehow possible to call x86-opcodes with FreeBasic? Something like "CALL ABSOLUTE" in QBasic? I tried the following: dim as ubyte test(0)={&hC3} dim as ubyte ptr test_call=@test(0) asm call [test_call] But it is crashing with a "Segmentation fault" on my 64bit Li...
by IchMagBier
May 01, 2018 4:43
Forum: Tips and Tricks
Topic: Binary data visualization with OpenGL
Replies: 5
Views: 1032

Re: Binary data visualization with OpenGL

Might be even more interesting to have the program inspect the data while it was reading it and create a key that displayed which datatype belonged to which color... so you would know what you were looking at without having to bring up a hex viewer on some large program. Might have to parse the fil...
by IchMagBier
Apr 30, 2018 14:06
Forum: Tips and Tricks
Topic: Binary data visualization with OpenGL
Replies: 5
Views: 1032

Binary data visualization with OpenGL

Hello After finding this , I decided to write my own "renderer" for binary data. Its just about 70 lines of FB/GL-Code: #include once "GL/gl.bi" #include once "GL/glu.bi" var ff=freefile open "SOME FILE" for binary as #ff <- Change this to a valid filepath dim...
by IchMagBier
Apr 20, 2018 11:23
Forum: Tips and Tricks
Topic: Pipes screensaver for console
Replies: 2
Views: 649

Pipes screensaver for console

http://fs1.directupload.net/images/180420/7itumpnb.png Some sort of "screensaver" for your console/terminal. Based on Yu-Jie Lin's "pipes.sh" , but cooler, since it's written in FreeBasic. Maybe someone rembembers the old Windows 98 OpenGL-screensaver with those pipes? const num...
by IchMagBier
Jan 19, 2018 3:12
Forum: Tips and Tricks
Topic: Routines to write syntax highlighted code
Replies: 46
Views: 22650

Re: Routines to write syntax highlighted code

Lines 3-5 are commented out in the C-Code, that's why they appear gray.

Operators are the same for all languages. I don't want to change that, but I fixed a bug with them and added some more "operators": . , %
by IchMagBier
Jan 17, 2018 12:47
Forum: Tips and Tricks
Topic: Routines to write syntax highlighted code
Replies: 46
Views: 22650

Re: Routines to write syntax highlighted code

It can handle comment blocks. What do you mean "the C section doesn't work correct"? I don't see any problems there.
by IchMagBier
Jan 16, 2018 18:19
Forum: Tips and Tricks
Topic: Routines to write syntax highlighted code
Replies: 46
Views: 22650

Re: Routines to write syntax highlighted code

Well ... localhost@localhost:~/Projekte/C+Basic/tests$ cat test.bas Print "Hello World" localhost@localhost:~/Projekte/C+Basic/tests$ cat c-test.c #include <stdio.h> int main() { puts("Hello World"); } localhost@localhost:~/Projekte/C+Basic/tests$ ls -l insgesamt 44 8632 Jan 16 1...
by IchMagBier
Jan 16, 2018 17:41
Forum: Tips and Tricks
Topic: Routines to write syntax highlighted code
Replies: 46
Views: 22650

Re: Routines to write syntax highlighted code

C, C++ and C# have 223 keywords together. FreeBasic has 408 (without preprocessor-stuff). Most of it comes from the FB-library though, which is the reason why fbc-generated executables are really big (At least that's what I believe).
by IchMagBier
Jan 16, 2018 13:38
Forum: Tips and Tricks
Topic: Routines to write syntax highlighted code
Replies: 46
Views: 22650

Re: Routines to write syntax highlighted code

I changed the keyword-order for all languages, since I found some bugs with the others aswell (See first post). It should work now.
by IchMagBier
Jan 16, 2018 3:30
Forum: Tips and Tricks
Topic: Routines to write syntax highlighted code
Replies: 46
Views: 22650

Re: Routines to write syntax highlighted code

@sancho It's important that 'ABS' comes after 'ABSTRACT' in the list, because the routine would first find 'ABS' in the code and then completely ignores 'ABSTRACT'. Like this: ABS TRACT SUB I updated the first post and added the following keywords to the list: abstract virtual boolean implemets nake...
by IchMagBier
Jan 15, 2018 17:04
Forum: Tips and Tricks
Topic: Routines to write syntax highlighted code
Replies: 46
Views: 22650

Re: Routines to write syntax highlighted code

I took the keyword-list out of geany's file for FreeBasic. Notice how some of the OOP-stuff is missing aswell ("Virtual" or "Abstract" for example).
by IchMagBier
Jan 14, 2018 7:29
Forum: Tips and Tricks
Topic: Routines to write syntax highlighted code
Replies: 46
Views: 22650

Re: Routines to write syntax highlighted code

This clearly needs a extension of the Type (Block-Comment-End, definition). And of course the necessary checks, in the evaluation code. Btw: FreeBASIC also has Block-Comments [/' .... '/] Wow, I had no idea FreeBasic supports this. This has to be some kind of secret, not even my editor(Geany) knows...
by IchMagBier
Jan 13, 2018 9:17
Forum: Tips and Tricks
Topic: Routines to write syntax highlighted code
Replies: 46
Views: 22650

Routines to write syntax highlighted code

http://fs1.directupload.net/images/180113/temp/b3cpnovd.png http://fs1.directupload.net/images/180113/temp/ah5jhmlr.png Hello I wrote two routines to write syntax highlighted code. The first one, "PrintCode", is used in textmode. The second routine, "DrawCode", is used in graphi...

Go to advanced search