Make a Compiler

BlitzMax Forums/BlitzMax Programming/Make a Compiler

Zenn Lee(Posted 2006) [#1]
I have an interpreter that I made to run the games you can developed with my software. But I want a way to incorporate the interpreter and the game map file into one run able file. The interpreter is just a program I made in Max to open files you make with my editor and run them.

This is most likely a very hard thing to do but if any of you guys tried it and had any success let me know.

Thanks a lot


kfprimm(Posted 2006) [#2]
http://www.flatassembler.net/
you could have you software generate ASM code then compile it with FASM. Yes it is a very hard thing, but not impossible.


Zenn Lee(Posted 2006) [#3]
OK, I'll look into it thanks!


ImaginaryHuman(Posted 2006) [#4]
You could set aside some space in the exe using incbin, which incbin's dummy data. Once the exe is compiled and executable, edit the exe file itself and paste at the start of the incbin data the map data, then save the changed exe. ? the only inflexibility is not knowing how much space to set aside for the map file.


Zenn Lee(Posted 2006) [#5]
That's great AngelDaniel! But can you kinda' give me a example, I'm pretty new to BlitzMax.

Thanks


ImaginaryHuman(Posted 2006) [#6]
No sorry, look at incbin.


Zenn Lee(Posted 2006) [#7]
Can anyone give me example? Pretty, Pretty, Pretty, Pretty, Please

Thanks


Dreamora(Posted 2006) [#8]
You don't need a compiler or anything like that.

All you need is a configuration file which tells your interpreter where and what to read and pack the other files either in subdirectories or a zip or something similar and load it and interprete it.