2022-07-19 11:22:33 I only discovered mecrisp recently (someone here brought it up), but I'm quite impressed with how it works. That's a nice architecture. 2022-07-19 11:22:51 Well, specifically mecrisp-across. 2022-07-19 11:23:30 The undeniable truth is that we Forth folk are a fairly small minority of the population, unfortunately. 2022-07-19 11:31:25 the optimizing of mecrisp is what blows me away. most forths have no real optimization to speak of 2022-07-19 11:53:17 I've found with Mecrisp Stellaris, that it is fun to try to figure out ways to reduce code size: 2022-07-19 11:53:19 https://portal.mozz.us/gemini/gem.librehacker.com/gemlog/tech/20220702-0.gmi?inline=1 2022-07-19 11:55:03 Stellaris has a disassembler and also a word that prints all the dictionary and code addresses, so it is easy to experiment 2022-07-19 11:56:09 Stellaris however is hard coded, by default, to inline all code less than 10 instructions, but that could be tweaked 2022-07-19 11:57:20 or, I assume that could be tweaked - haven't tried it myself 2022-07-19 11:58:15 I've been straining at the code size reduction thing on this boot sector thing I'm writing right now. 2022-07-19 11:58:38 One method that paid off well was to look for primitives with the same ending sequence - keep it on one and jump to it form the others. 2022-07-19 11:58:40 KipIngram: making a boot sector program? 2022-07-19 11:58:48 And if you make sure those are close together, you get a two-byte jump. 2022-07-19 11:59:00 Yeah, I'm kind of trying to merge sectorForth and PlanckForth. 2022-07-19 11:59:21 It's a PlanckForth style thing - uses a bootstrap file, but I'm trying to squeeze it into a boot sector. 2022-07-19 11:59:39 for x86, I presume? 2022-07-19 11:59:47 The init code loads a 4kB tib with the first part of the bootstrap, and then off it goes. 2022-07-19 12:00:00 Yeah - x86 16-bit real mode with a standard BIOS. 2022-07-19 12:00:51 I started out by kind of directly implementing the PlanckForth primitives. Dropped a few that are inapplicable to the boot envrironment. 2022-07-19 12:01:09 KipIngram: which text mode do you initialize to? 2022-07-19 12:01:29 40x25? 2022-07-19 12:01:35 I don't, in the boot sector. I provide a general interface to the BIOS, and bootstrap.fs will take care of that. 2022-07-19 12:02:16 The only bios call it actually makes in the startup is an int 13h call to read the first eight sectors of bootstrap.fs. 2022-07-19 12:03:03 There's a primitive, 'b' with stack effect ( ax bx cx dx -- dx cx ax ) 2022-07-19 12:03:31 And there's only one of those - to use it I will have to plug the interrupt number as desired before making the call. 2022-07-19 12:03:43 In the bootstrap I'll establish new more "proper" bios access. 2022-07-19 12:04:37 That is, in the 'int ??' instructin - I will have to write a byte to the ?? for what I want. 2022-07-19 12:05:07 There just wasn't room to have separate words for video, disk, keyboard, etc. 2022-07-19 12:05:32 That first int 13h is in the initialization - that one is hard coded. 2022-07-19 12:06:30 Haven't tested it yet - I wrote it over the weekend (mostly Sunday), and yesterday I started at it, fixing things, recovering more of my familiarity with what can and can't be done in that instruction set, and shaving out bytes. 2022-07-19 12:06:42 At the moment I have about 30 unused bytes; thinking about what to do with them. 2022-07-19 13:26:34 can it make coffee? 2022-07-19 13:38:16 Not yet - maybe someday.