Page 2 of 6

Posted: Sun Mar 21, 2004 5:31 pm
by User Mike
Wow, I'm impressed.

Worked great for me, and I ran most the examples. I'm always interested in scipting and compiler building. I'll keep my eye on this project.

;)

Posted: Sun Mar 21, 2004 6:07 pm
by RJP Computing
I too can't wait to see how to do this. I am really getting into compiler/interpeter design. I would love to see how you did this.

Thanks for your hard work.

Posted: Thu Mar 25, 2004 1:35 pm
by BalrogSoft
Hi, i published on this forums a previous version of the language, its a code to execute a virtual code, with nested functions like add(3,add(5,3)), and variable handling, but it dont have the compiler, it could be easy to understand than ScriptVM source code on actual version (because it dont have any comment, i never comment my code unless i make public my source code, and a script language with the virtual machine and the compiler its difficult to comment it for people)

The source of the little code snippet is here:
viewtopic.php?t=9565

And a new version of ScriptVM (v0.3) its available here (with source code available, but without any comment, sorry):

http://www.balrogsoftware.com/downloads/ScriptVM.zip

Posted: Thu Mar 25, 2004 9:35 pm
by User Mike
Thanks so much Balrog.

This is going to be very helpful to me.

Again, thanks for all your support you've provided me. Now I must soon order PB!

8)

Posted: Thu Mar 25, 2004 11:07 pm
by fsw
Can't compile the code with the 3v89beta.
Changed the 'memory' related stuff because Fred changed it, but no go... :cry:

Posted: Thu Mar 25, 2004 11:27 pm
by User Mike
It doesn't compile for me for 1 of 2 reasons.

1.) There's a mistake in the source.

2.) I'm using the demo version at the moment.

No worries though, I don't need it to compile. ;) I'm just trying to learn all I can from it.

8)

Posted: Fri Mar 26, 2004 1:13 am
by BalrogSoft
Hi, i compiled this program with PB 3.81, i not use PB 3.89b to compile my projects, try again with PB 3.81.

User Mike: You say that dont work because source have mistakes, are you sure? With PB 3.81 (complete version, not demo) works peferctly, im sure that have bugs, but not compiler mistakes.

Anyway, i will test it on PB 3.89.

Posted: Fri Mar 26, 2004 1:20 am
by User Mike
If it compiles for you fine, then there are no source code mistakes. Those were just the 2 possibilites of what I thought could have caused the problem.

No more worries though, I'm going to order the full version of PureBasic this weekend. Until then, I'll keep analyzing your souce.

;)

Posted: Fri Mar 26, 2004 5:16 pm
by BalrogSoft
I tried to compile it with PB 3.89B, and the compiler dont generate the virtual code, at this moment i dont know what is the problem, it can be a bug of PB 3.89Beta, or can be a problem with commands changed on this version.

Posted: Fri Mar 26, 2004 6:18 pm
by fsw
Maybe Fred could use this code to test the stability of the PureBasic Compiler 8O

Pedro, have you worked on your 3D engine lately, perhaps doing a real PB Library with El_Choni's wonderful Tailbite tool :?:

Keep up the good work man :wink:

Posted: Sat Apr 03, 2004 6:10 pm
by BalrogSoft
Hi, i uploaded a new version of ScriptVM (v0.31) to my site, the link is the same that other versions, some bugs with floats numbers are solved, i added some features to ScriptVM Editor, and a better help file, its compiled with PB 3.81, i dont know if it will work with PB 3.89b, if i have time, i will port an opengl example to ScriptVM.

fsw: I dont work on my 3d engine since months, i think that would be better to rewrite it and planning it on a different way, and about make a PB library, you can try it, the source code is available on my site.

Posted: Sun Apr 04, 2004 3:04 am
by BalrogSoft
Hi, i added a opengl example, it works peferctly, and i added a new command, ProcessEvent(), its like WindowEvent() for PB(but using API and PeekMessage), the address is the same, like other versions.

A little screenshot of ScriptVM in action, with OpenGL, iCamPlay and Window example working:
Image

Posted: Wed Apr 07, 2004 8:24 pm
by User Mike
That's really awesome Balrog. Just started reading a book and following the NeHe tutorials for OpenGL.

You're really inspiring me.

:)

Posted: Fri Apr 23, 2004 11:09 am
by BalrogSoft
Hi, a new version of ScriptVM is available on my web: http://www.balrogsoftware.com/scriptvm
The source code is available on the web too, the new version features:
Procedures parameters are now local variables.
Recursive procedures, a procedures can call itself, because ScriptVM makes a new instance of local variables when a procedure is called.
Support for CDECL libraries types using only & prefix.
ScriptVM now have a intaller tool, better than zip distribution.

Bye and enjoy, if someone have some questions about source code, only email me.

Posted: Fri Apr 23, 2004 5:23 pm
by fsw
Very nice job Pedro 8)
I appreciate every piece of code where I can learn from.
Thanks

BTW:
can somebody please explain (maybe Fred :wink: ) why the following code, from the scriptvm.pb file, works with 3.81 but not with the fully updated 3.9 :?:

Code: Select all

Procedure.b FPeekB(Address.l)
  *PtrB.BYTE=Address.l
  ProcedureReturn *PtrB\b
EndProcedure
It crashes on ProcedureReturn 8O
It's not possible to return a pointer anymore :?: