00:00:00 --- log: started retro/12.12.08 02:30:56 --- quit: tangentstorm (Ping timeout: 260 seconds) 02:40:28 --- join: tangentstorm (~michal@108-218-151-22.lightspeed.rcsntx.sbcglobal.net) joined #retro 06:22:55 input: BEGIN ! 1 + 2 END. 06:23:58 output: 1 2 + putn 06:26:22 yep yep yep. i do believe that is what they call a compiler. HOO RAH! 08:00:27 cool :) 10:09:42 crc: i was saying yesterday that retro has no word for a loop that runs 0 or more times... 10:10:02 like "while" is more like do...while in c 10:10:28 did i miss one? 10:11:36 it's easy enough to make one up, but what's the "retro way"? 11:01:21 --- join: Mat2 (~Claude@91-65-144-133-dynip.superkabel.de) joined #retro 11:01:27 hello 11:04:01 I'm happy my compiler basical works. It compiles AVM opcodes into native code at runtime 11:06:52 now I'm trying to reanimate GIT access to my repro 11:08:08 (that seem to be the hard part) 11:12:21 hey Mat2 :) awesome 11:12:28 hi tangentstorm 11:12:48 just read your compiler is working too :D 11:12:53 my compiler also works! I've got a basic arithmetic calculator working :) 11:12:56 yeah 11:13:15 actually have notes for all of pl/0 but i've been distracting myself all morning 11:13:32 so you have a JIT basically? 11:13:40 yes 11:14:42 but thanks to the AVM binary format without the need of typical memory and processor ressources for this task 11:15:11 the whole compiler fits into 16 kByte ram at current 11:17:38 was a surprise for me, because I had designed AVM original for efficient interpretation, not compilation 11:19:23 huh. i guess that makes sense. you were pretty close to assembly already 11:20:03 I've found the code generation benefit from instruction fusion a lot which simplifies everything 11:23:05 and lead to good code quality without the need for excessive optimization analysis because bundled instructions hold there dependancy state already 11:33:25 the opcode bundle (liDUP ldOVR liADD ldBR) for example compiles to: 11:33:30 Mat2: I've never really thought about how JIT works... is that virtual stuff you were asking about yesterday to allow you to be able to just create instructions in ram and jump to them on the fly? 11:34:39 basical yes 11:35:51 for executing generated native code, the dynamic allocated code buffer need to be marked for execution (the NX bit in Intel terminology of the allocated page entries need to be set) 11:37:54 then it is save to let compile the FPC compiler a call into this buffer like every other PROCEDURE or function 11:38:21 is callable though a pointer 11:39:58 sorry I mean, than it's save to call into the buffer exactly the same way as PROCEDURES and FUNCTION's are callable though a pointer in Freepascal 11:43:12 the opcode bunlde (liDUP ldOVR liADD ldBR) for example can be compiled into such a prepared buffer. Actually the compiler generate the following code: 11:43:53 MOV R8, 1000h ; liDUP 11:44:08 MOV R9, R8 11:44:27 MOV R9, [R9] ; ldOVR 11:44:38 MOV R10, R9 11:44:52 ADD R10, 2000h ; liADD 11:45:04 MOV R10, [R10] 11:45:13 RET 11:45:30 at offset 0. 11:45:43 --- join: kumul (~kumul@66-50-75-241.prtc.net) joined #retro 11:48:46 to execute this code, you need only creating a call frame and let compile a call to it - et voilá: That's it 11:49:06 see you later 11:49:17 * Mat2 coding# 11:49:23 * Mat2 coding 11:49:39 --- nick: Mat2 -> Mat2-coding 12:13:15 sorry. i'm a big ball of distracted today. 13:16:25 --- nick: Mat2-coding -> mat2 13:16:34 --- nick: mat2 -> Mat2 13:16:47 no problem 14:53:54 --- nick: tangentstorm -> tangentgone 15:11:40 ciao 15:11:44 --- quit: Mat2 (Quit: Verlassend) 16:18:36 tangentgone: apart from repeat/again with a manual condition/break, not yet 17:14:57 --- quit: docl (*.net *.split) 17:16:53 --- join: docl (~docl@98.158.26.222) joined #retro 17:16:54 --- quit: docl (Changing host) 17:16:54 --- join: docl (~docl@unaffiliated/docl) joined #retro 17:55:03 --- join: arescorpio (~arescorpi@186.18.36.190) joined #retro 20:03:03 --- quit: arescorpio (Quit: Leaving.) 20:20:43 --- join: foucist (~foucist@ps14150.dreamhost.com) joined #retro 20:20:43 --- mode: ChanServ set +v foucist 20:21:01 hello folks! 20:21:18 --- quit: tangentgone (Ping timeout: 265 seconds) 20:38:45 --- join: tangentgone (~michal@108-218-151-22.lightspeed.rcsntx.sbcglobal.net) joined #retro 23:53:35 --- quit: kumul (Quit: WeeChat 0.3.9.2) 23:59:59 --- log: ended retro/12.12.08