00:00:00 --- log: started forth/20.05.01 00:09:30 --- join: rprimus joined #forth 00:18:01 --- join: jedb_ joined #forth 00:20:30 --- quit: jedb (Ping timeout: 244 seconds) 00:50:07 --- join: dddddd joined #forth 00:57:34 --- join: iyzsong joined #forth 01:14:40 --- quit: proteusguy (Remote host closed the connection) 01:20:49 --- join: proteusguy joined #forth 01:20:50 --- mode: ChanServ set +v proteusguy 01:25:32 --- quit: WickedShell (Remote host closed the connection) 01:27:51 --- join: jsoft joined #forth 01:40:32 --- quit: rprimus (Quit: Lost terminal) 01:41:03 --- join: rprimus joined #forth 01:45:28 --- quit: rprimus (Client Quit) 02:08:16 --- join: TCZ joined #forth 02:11:19 --- join: rprimus joined #forth 02:31:17 --- quit: TCZ (Quit: Leaving) 02:40:11 --- quit: karswell (Remote host closed the connection) 02:40:39 --- join: karswell_ joined #forth 02:49:33 --- quit: karswell_ (Read error: No route to host) 03:11:10 --- join: TCZ joined #forth 04:21:56 --- nick: jedb_ -> jedb 04:37:01 --- quit: corn (Ping timeout: 260 seconds) 05:27:26 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 06:17:07 --- quit: Zarutian_HTC (Ping timeout: 240 seconds) 07:00:19 --- join: Zarutian_HTC joined #forth 07:12:42 --- quit: TCZ (Quit: Leaving) 07:36:43 --- join: TCZ joined #forth 09:03:07 --- quit: TCZ (Quit: Leaving) 10:05:22 --- quit: dddddd (Remote host closed the connection) 10:36:06 --- join: WickedShell joined #forth 10:50:21 --- quit: dave0 (Quit: dave's not here) 11:56:19 --- join: karswell_ joined #forth 12:05:11 --- quit: karswell_ (Remote host closed the connection) 12:07:05 --- join: karswell_ joined #forth 12:15:27 --- quit: jsoft (Ping timeout: 258 seconds) 13:42:36 --- quit: gravicappa (Ping timeout: 264 seconds) 13:54:16 --- join: TCZ joined #forth 14:39:44 --- quit: Kumool (Quit: FreeZNC - Visit us! Server: chat.freenode.net Channel: ##bnc4you) 14:46:21 --- join: Kumool joined #forth 15:07:54 --- quit: dzho (*.net *.split) 15:07:54 --- quit: ornxka (*.net *.split) 15:07:54 --- quit: rpcope (*.net *.split) 15:07:56 --- quit: kori (*.net *.split) 15:07:56 --- quit: tp (*.net *.split) 15:07:56 --- quit: yunfan (*.net *.split) 15:07:56 --- quit: klys (*.net *.split) 15:07:56 --- quit: nmz (*.net *.split) 15:07:56 --- quit: _whitelogger (*.net *.split) 15:08:18 --- join: yunfan joined #forth 15:08:20 --- join: nmz joined #forth 15:08:22 --- join: dzho joined #forth 15:08:38 --- join: rpcope joined #forth 15:08:55 --- quit: dzho (Changing host) 15:08:55 --- join: dzho joined #forth 15:11:02 --- join: _whitelogger joined #forth 15:11:18 --- join: ornxka joined #forth 15:13:02 --- join: klys joined #forth 15:13:08 --- join: kori joined #forth 15:14:24 --- quit: TCZ (Quit: Leaving) 15:14:50 --- join: TCZ joined #forth 15:39:24 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 15:39:40 --- join: Zarutian_HTC joined #forth 16:19:18 --- join: tp joined #forth 16:19:18 --- quit: tp (Changing host) 16:19:18 --- join: tp joined #forth 16:20:09 --- quit: karswell_ (Read error: Connection reset by peer) 16:22:00 --- quit: TCZ (Quit: Leaving) 16:36:48 hey 16:44:26 hey tabemann 16:48:57 the disassembler is at ~750 lines 16:49:10 and currently covers instructions up through 'B' 16:49:24 wow 16:49:36 if each of those lines corresponded to a single 16-bit instruction 16:49:49 that means that i'd take up 1500 bytes 16:50:09 *it'd 16:50:15 i note that the mecrisp dissasembler only covers a small number of instructions, maybe 20% ? 16:50:22 same as the assembler 16:50:42 these are significant instructions, though 16:50:44 even GCC only uses about 20% of instructions 16:50:56 there's plenty of stuff I'm not going to implement 16:51:02 like the floating point stuff 16:51:09 yeah, lots of instructions never get used 16:51:13 and a lot of the math routine stuff 16:51:43 750 lines of assembly ? 16:51:51 no, 750 lines of Forth 16:51:55 aha 16:52:26 it certainly will take up way more than 1500 bytes for just this 16:52:29 heheh, youd be at 75 lines of assembly by now ? 16:52:45 this is why I question whether this is a good idea 16:53:25 all useful forths have a 'see' which requires a dissembler 16:53:35 so obviously lots felt it is a good idea 16:54:18 of course, this is YOUR forth, it's your choice 16:54:24 the problem is that cortex-m seem to have a quite complex instruction set 16:55:21 I'm probably going to continue with work on at least the important instructions, even though it's going to eat up a ton of flash 16:56:12 the Mecrisp-Stellaris M3 dissasembler is 19k of Forth code 16:57:09 that might give me a good picture of how much space it will take 16:57:33 but of course, mecrisp-stellaris is probably more efficient than zeptoforth in the code it compiles... 16:58:00 it will be for sure with the RA version which I use 17:00:14 tabemann, here is the m3 disassembler http://dpaste.com/1R4BYF5 17:01:55 thanks for showing me this! 17:02:04 :) 17:06:08 part of the added complexity to my implementation is that I implement handling of lots of 32-bit instructions 17:07:36 ah yes 17:17:26 and I'm commenting most of that out 17:18:00 because I'm mostly not using 32-bit instructions 17:34:36 --- join: TCZ joined #forth 18:22:06 --- quit: TCZ (Quit: Leaving) 18:43:34 --- join: boru` joined #forth 18:43:37 --- quit: boru (Disconnected by services) 18:43:39 --- nick: boru` -> boru 18:43:42 --- join: iyzsong joined #forth 18:54:22 --- join: jsoft joined #forth 19:26:22 --- quit: iyzsong (Ping timeout: 246 seconds) 19:29:00 --- join: iyzsong joined #forth 19:38:51 --- quit: reepca (Read error: Connection reset by peer) 19:40:40 --- join: reepca joined #forth 20:06:25 --- quit: iyzsong (Ping timeout: 260 seconds) 20:23:21 --- join: iyzsong joined #forth 20:59:54 tp 21:00:10 I managed to shrink my disassembler by 150 lines without commenting out any code 21:14:04 nice! 21:28:32 what I did was put all the decoding logic into one place 21:28:49 and make two tables of opcodes, one 16-bit, one 32-bit 21:29:03 that the decoding logic would process 21:29:15 neat refactor! 21:30:25 so in addition to the one-time cost of the decode logic, the decoding of a 16-bit word takes up 64 bits - 32 for the pointer to the parser word, 16 bits for the mask, and 16 bits for the opcode 21:31:03 for 32-bit words it goes up to 96 bits per word 21:31:14 still much cheaper than the hand-coded logic I had before 21:31:29 and much less error-prone, because it's all written in one place 21:32:19 I also hacked in logic for it to automatically look up labels for addresses 21:32:47 using the dictionary, in reverse 21:32:54 hmm 21:33:27 what kind of addresses ? 21:33:34 you mean hardware ? 21:33:35 xt's 21:33:39 ahh 21:33:56 so when I have a bl instruction I can see which word it is calling 21:34:56 aha, of course, you're disassembling 21:35:42 are you disassembling everything or just showing the call to dependent words ? 21:36:05 Mecrisp-Stellaris does the latter 21:36:11 I'm disassembling everything 21:36:27 showing the calls to dependent words would be kinda useless 21:36:35 since my forth does inlining 21:37:51 are you saying that everything is inlined ? 21:38:10 not everything 21:38:23 mostly short words without anything PC-relative inside 21:38:36 well, internal branches are fine 21:38:36 yeah 21:50:37 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 21:52:21 * tabemann is reading http://www.patorjk.com/programming/articles/forththoughts.htm 21:52:33 --- join: iyzsong joined #forth 21:59:07 * tp is comparing CMSIS C structs against his latest svd2forth for the STM32G030 22:01:12 this is what you get with CMSIS C structs 22:01:15 #define ADC_CFGR1_DMAEN_Pos (0U) 22:01:15 #define ADC_CFGR1_DMAEN_Msk (0x1UL << ADC_CFGR1_DMAEN_Pos) /*!< 0x00000001 */ 22:01:15 #define ADC_CFGR1_DMAEN ADC_CFGR1_DMAEN_Msk /*!< ADC DMA transfer enable */ 22:01:34 this is what my system gives for Forth 22:01:52 : ADC_CFGR1_DMAEN ( -- x addr ) 0 bit ADC_CFGR1 ; \ ADC_CFGR1_DMAEN, ADC DMA transfer enable 22:02:51 so CMSIS gives you a macro, svd2forth gives you a Word 22:03:17 you could make that word inlined 22:03:42 it would be anyway, Mecrisp-Stellaris has automatic inlining 22:04:09 if it can be, it gets inlined 22:06:10 in a way, I'm blissfully unaware of quite a few Forth choices as Mecrisp-Stellaris does it for me. Forth purists tend to complain, but Im just a user, I'm happy to have others far more expert with Forth make those choices for me 22:06:50 one day, if I ever reach those lofty heights, I can change it 22:07:39 --- join: ryke joined #forth 22:08:18 --- quit: ryke (Client Quit) 22:12:10 okay, I'm gonna hit the sack - g'night 22:12:33 and btw, I've committed what I have of the disassembler code in src/common/forth/disassembler.fs 22:12:47 cya 22:12:50 cool 22:13:14 ill have a look 22:13:22 thanks 22:13:26 g'night for real now 22:52:45 --- quit: nmz (Ping timeout: 272 seconds) 22:53:15 --- join: nmz joined #forth 23:08:55 --- join: gravicappa joined #forth 23:16:13 --- quit: Zarutian_HTC (Ping timeout: 260 seconds) 23:30:20 --- join: Zarutian_HTC joined #forth 23:41:06 --- join: proteus-guy joined #forth 23:52:45 --- quit: WickedShell (Remote host closed the connection) 23:55:28 --- join: dave0 joined #forth 23:59:59 --- log: ended forth/20.05.01