00:00:00 --- log: started retro/12.11.29 05:47:44 --- quit: harrison (Ping timeout: 256 seconds) 10:12:43 --- join: beretta (~beretta@cpe-107-8-120-84.columbus.res.rr.com) joined #retro 10:46:14 --- join: beretta_ (~beretta@cpe-107-8-120-84.columbus.res.rr.com) joined #retro 10:48:50 --- quit: beretta (Ping timeout: 252 seconds) 11:26:33 --- quit: karswell (Read error: Operation timed out) 11:32:42 --- join: karswell (~coat@93-97-29-243.zone5.bethere.co.uk) joined #retro 13:44:53 --- join: Mat2 (~claude@91-65-144-133-dynip.superkabel.de) joined #retro 13:44:58 hello 13:56:04 ello 13:56:10 --- nick: beretta_ -> beretta 13:56:17 hello beretta 14:00:14 which leads you here ? 14:00:49 nothing much really. Just poking around 14:01:30 do you find interest in programming ? 14:01:55 yup. I've made several FORTHS 14:03:59 nice :) where can I found the sources ? 14:06:05 I am currently working on my own system in retro fashion (hope that's the correct translation) 14:07:42 I've only released one: http://sourceforge.net/projects/cocoboot/ 14:09:22 hey, a forth system for tandy coco as it seems ! My favoured 6809 based system 14:10:01 Yup! 14:10:57 I'm revising the system for a VM version similar to Retro's VM. 14:13:07 hmm, you mean based on the current ngaro version I think 14:13:09 I'm virtualizing the machine a touch more... so I can compile forth code on my x86 for the 6809. 14:13:25 yes ngaro... I forgot it's name. 14:15:25 I see. Take a look at my vm design, I think it can give you some inspirations for performance optimizations at vm-code level 14:16:36 welcome beretta :) 14:17:22 Mat2: do you already have a ngaro -> navm instruction translator? 14:18:03 no, because the retro compiler need to be rewritten anyway for navm 14:18:33 cocoboot is Token Threaded. But I'm rewriting for and engine very similar to ngaro. 14:22:51 newly defined words also got added to the token table... which quickly ran out of space (it was 8 bits) 14:27:00 https://www.assembla.com/wiki/show/navm is that yours? 14:27:14 I have 14:27:23 sorry, yes 14:27:59 beretta: https://www.assembla.com/code/avm/git/nodes/master/metro/backport/avmInterpreterAtom64.pas 14:32:00 Mat2: what does the LI instruction do? 14:32:43 like LIT in ngaro, push an immediate value onto the data stack 14:32:56 LIT ah! duh. :) 14:33:35 is it possible to put TOS, DSP, etc in the actually assembly code instead of %rcx, etc? 14:34:14 not with the inline assembler in a portable way 14:34:41 hmm.. not even with macros? 14:34:45 * tangentstorm tries it 14:34:59 *not in a portable way* 14:35:21 why not? 14:35:30 is there some sort of flow control ? 14:37:04 beretta: BA and BEA are jumps, if that's what you mean 14:37:17 because freepascal reparses the assembler sources so these macros 14:37:21 Branch Always and Branch if Equal? 14:38:45 ok, execution is trace based. This means an opcode (for 64 bit 16 instruction in 8 slots) can select the execution of another trace (or the same) conditionally 14:39:23 trace? 14:40:06 yes, the trace can be compiled into subroutine threaded code for interpretation before execution or native-code (if a new instruction is generated) 14:40:33 but what's a trace? 14:41:08 a chunk of vm-code (in my vm a trace is identical with an opcode bundle) 14:42:20 so a trace is a 64-bit number containing 8 opcodes, or a mix of opcodes and literals / addresses 14:42:29 the BEA instruction for example select the compilaton of another opcode if TOS=SND, which is then executed 14:43:14 ^yes 14:43:49 Mat2: and by "not in a portable way" ... you mean macros aren't portable to other pascal compilers? 14:43:56 right 14:45:08 there exist some incompatibilities between gas and as for example (and freepascal will expand only gas conform macros) 14:46:36 Mat2: i mean freepascal's own macros, like this: https://github.com/sabren/b4/blob/master/ng_ops.pas#L9 14:47:29 is the freepascal preprocessor protable ? 14:48:09 sorry I mean portable 14:48:22 i'm not sure. i know gnu pascal has macros. probably delphi does, but i don't know. 14:49:38 probably I can compensate though inline procedures.. er I think that should not work 14:53:27 beretta: My vm design combine two 4 bit instructions into an bytecode. All combinations which are not useful - like dup+drop are replaced with higher order instructions (like branch conditionals). This way the interpretation overhead is halved independent of the threading method 14:54:12 and on the fly compilation is simplified 14:55:14 that works well even for 6502 cpu's so I think 6809 based interpreters would benefit also 14:56:29 Mat2: hang on. why does it need to be portable? wouldn't you have to rewrite it anyway if you want to target another architecture? 14:57:13 and as long as you're targeting x86, you have fpc, right? 14:57:20 so what does it need to be portable *to*? 14:57:43 amd64 i guess, not x86 14:58:24 I would need a good cross compiler 14:58:46 to what? 14:59:07 to ARM v6 for example 15:00:37 Mat2: okay, so freepascal appears to support ARMv6 as an output. http://wiki.freepascal.org/FPC_New_Features_2.6.0#ARM_systems 15:00:56 oh good to know, thanks 15:01:00 But, you'd need to change the actual assembly used for ARM, right? 15:01:14 so I need only an assembler for MIPS 15:02:14 http://wiki.freepascal.org/Native_MIPS_Systems 15:04:06 ok, I will try it out 15:04:42 Mat2: I'm completely clueless here... I'm just trying to understand what you're saying. :) 15:05:20 You want to run this on a bunch of different processors? 15:05:35 yes 15:06:02 Wouldn't you have to rewrite it for each processor, because they use different instruction sets? 15:06:23 I mean assembly language is specific to one machine, right? 15:07:10 yes, but I can reuse code for cpu's of the same architecture 15:07:16 like x86 and amd64 15:07:26 right 15:08:08 ... You know freepascal supports both, right? 15:08:40 I know, sadly the 64 bit gas version have some incompatibilities with the 32 bit gas one 15:08:56 (as I know) 15:09:07 okay, and you're using gas as the external assembler? 15:09:16 right 15:09:21 why? 15:09:50 because freepascal don't support the Intel syntax for amd64 (completely) 15:10:43 aha. what's broken? 15:11:32 there just work on finishing the preparser for 64 bit assembler code 15:11:47 so the only alternative would be an external procedure 15:11:55 this way I could use nasm 15:14:31 so gas32, gas64, and nasm all support intel syntax, but their macro systems are incompatible, right? 15:17:24 that's the case 15:18:16 Okay, so then the question is: Can we use fpc's macro system with assembly code that's being passed to an external assembler? 15:18:36 that's what you're asking me :) 15:18:42 right 15:18:55 see, i'm slow but I get there eventually :) 15:19:00 :) 15:20:11 * tangentstorm runs off to do an experiment. 15:27:53 beretta: Your token-threading approach reminds me of the one implemented in open firmware 15:30:32 Do you using TTC because of size restrictions ? 15:32:10 I'm just wondering because the Ngaro ISA is cell based 15:34:56 Mat2: what's the command to compile avmInterpreterAtom64.pas ? 15:40:26 fpc avmInterpreterAtom64.pas 15:42:01 you will get a note because .align is target specific 15:42:16 ^hint, hint: that's the problem 15:42:37 no i get like 2 pages of error messages :/ 15:43:08 i tried: fpc -Rintel -Aas avmInterpreterAtom64.pas 15:43:14 but it dies on the % 15:43:30 can it be that you try to compile it on an x86 and not amd64 system ? 15:43:37 ... :) 15:45:19 the other problem is the -Rintel switch, because the assembler source is AT&T syntax 15:47:20 I have an atom based netbook too, but mine isn't 64 bits. I was thinking they were the same. Thanks :) 15:47:46 that must be a very old netbook :) 15:59:18 you can create a virtual machine with qemu, that's what i use because qemu emulating x86 amd64, sarc, mips and arm systems 15:59:48 you don't need a real system for testing 16:00:24 (plus you can use its internal debugger) 16:04:06 no, it's fine. i have two 64-bit hex-core servers... used to run a web hosting company 16:21:08 Mat2: it doesn't look like macros work inside assembler blocks. :/ 16:24:27 I feared it 16:26:38 by the way, can you please run some benchmark tests on your servers if I'am finshed the vm ? That would help me with further optimizations 16:37:19 sure, i'd be happy to. 16:42:19 --- nick: tangentstorm -> tangentafk 16:45:20 thanks 16:48:38 I will go to sleep 16:48:41 ciao 16:48:45 --- quit: Mat2 (Quit: Verlassend) 17:28:01 --- nick: tangentafk -> tangentstorm 21:05:34 Mat2: TTC is for size restrictions. I was asked to write a FORTH that would fit on the CoCo's standard boot sector: 4608 bytes. 21:51:42 --- quit: beretta (Read error: Connection reset by peer) 23:42:56 --- join: saper_ (saper@wikipedia/saper) joined #retro 23:44:05 --- quit: saper (Read error: Connection reset by peer) 23:59:59 --- log: ended retro/12.11.29