2023-08-29 10:13:37 <3 blocks 2023-08-29 10:13:45 and block editing 2023-08-29 11:23:44 veltas: 1 KibiByte in size each block or? 2023-08-29 12:56:42 Yeah, I like blocks too. Mine are 4kB, Zarutian_iPad. 2023-08-29 12:57:24 I've found that in most cases one 4kB block is enough to completely contain a related body of code. 2023-08-29 13:02:57 One thing I like about blocks is that it completely exposes the disk layout - if you want to, you can allocate a large contiguous range of blocks for some sort of a "database table' etc. So no file system overhead at all. 2023-08-29 13:47:22 ACTION continues with https://gist.github.com/zarutian/e13c9fc3f1239a1e716fd8248db26baf 2023-08-29 14:49:19 Remember I once mentioned instead dof compilin jump offsets inline, having A "mark" instruction at the beginning of the loop that would stow the current pc on the resturn stack, and then using that for the jump target? 2023-08-29 14:49:42 That turns out to be problematic. My very first thought was just to have a register for that and copy pc to that reg on mark. 2023-08-29 14:49:49 But, then you couldn't nest loops. 2023-08-29 14:49:56 So, it would need to be return stacked. 2023-08-29 14:50:38 And THEN I couldn't conditional return from inside a loop, unless I knew to take care of that extra cell too (i.e., it would need to be promoted to a conditional double return). 2023-08-29 14:50:55 So I could still conditional return, but I couldn't conditional double return. 2023-08-29 14:51:03 Probably better just to do it the standard way. 2023-08-29 14:52:18 I actually had the idea when I was considering the hardware Forth, and I was going to make the return stack double wide so that each call level got a "place to put" that marker. 2023-08-29 14:52:34 So that version would have had none of those problems. 2023-08-29 14:53:05 Guess I could still do that - just always leave that space on the return stack, on every call. 2023-08-29 14:53:13 Then returns wouldn't change. 2023-08-29 16:24:24 KipIngram: this sounds like the mad shit that Apple got up to in 24-bit systems 2023-08-29 16:26:14 KipIngram: the upper 8 bits were valid but not mapped to anything 2023-08-29 16:27:06 KipIngram: so they used them as flag bits, every address could have a byte of flags, used for things like "remember you have to check the stack and the heap for things to clean up" 2023-08-29 16:27:58 I don't remember a lot about it, an old flatmate of mine was disassembling the System 6 Toolbox ROM and said there was all manner of mad shit in there 2023-08-29 16:32:26 li 2023-08-29 16:32:33 whoops 2023-08-29 16:49:18 2023-08-29 17:06:22 gordonjcb: This wouldn't be packing different types of information into any cell. It would be mixing two types of cells on the return stack. 2023-08-29 17:06:39 But each cell would be single-value / single-purpose. 2023-08-29 17:07:21 I'm giving it fairly serious consideration. The main downside is that it would double the size of the return stack. But I'm still considering it. 2023-08-29 17:10:08 It also occurred to me, though, that on the 32655 I only have 128k bytes = 32k cells of RAM, so in theory my jump and return addresses could be 16-bit quantities. So I COULD put both of thhose two different 16-bit types of things in one 32-bit stack cell. On a desktop I wouldn't do that - they'd each be full width (because plenty of RAM). 2023-08-29 17:10:26 The difference would just be hidden under the hood in the implementation of the vm instructions that manage them. 2023-08-29 17:10:55 So, I noticed that my DM42 clock has slipped a good bit off time since I got the thing a few months ago. 2023-08-29 17:11:23 There is a calibration procedure. So I just carefully set it and noted down the time I did that - now I can watch it and later compute a calibration factor. 2023-08-29 17:12:05 That thing has a 400x240 lcd graphics mode I'm starting to noodle into a little bit. 2023-08-29 17:12:37 It's not a "graphing calculator" out of the box, but with that kind of resolution I could still write my own code to graph things. 2023-08-29 17:12:56 Oh, hey - I saw a neat Mathologer video last niht. 2023-08-29 17:12:58 night 2023-08-29 17:13:08 Imagine you are looking at a graph of y = 1/x. 2023-08-29 17:14:07 If you now squash that vertically by a factor of F, and then stretch it horiontally by the same factor F, you won't see any difference - the final curve will lie right on top of the original curve. 2023-08-29 17:14:42 Has to do with the relationships among 1/x, ln(x), and e^x. 2023-08-29 17:16:14 https://www.youtube.com/watch?v=G0Fa5Zl-Z3c 2023-08-29 17:16:32 Some interesting stuff in there about hyperbolic trig functions too. 2023-08-29 17:16:49 it's the hypergolic trig functions that are really dangerous 2023-08-29 17:17:06 Why so? 2023-08-29 17:17:24 spontaneous ignition, etc 2023-08-29 17:18:03 I'm missing something. :-( 2023-08-29 17:20:05 Anyway, re: this doubled-up return stack, the idea would be that on entry to each called word, I'd push the return stack as normal, but also push the starting address of the word that I'm calling. My conditional looping words always go back to the start of the word. So they'd fetch that target address from that extra cell. So I wouldn't need an offset inline with the code, and so if I passed a conditional 2023-08-29 17:20:07 jump-back without taking it, I could continue in the same cell full of instructions. 2023-08-29 17:20:32 Now, that's not quite how my system works now. In this case: 2023-08-29 17:20:48 : foo ... : bar ... 0=me ... ; 2023-08-29 17:21:17 the 0=me conditional recursion would go back to bar. But if I CALLED foo, and that's what set the target, then it would go back to foo. 2023-08-29 17:21:25 I have to decide if that's acceptable to me. 2023-08-29 17:23:16 I also thought when I was doing the verilog design of having an instruction that would update that cell on the return stack, to the currrent location. That would give me the option of looping back to anywhere in the word. 2023-08-29 17:23:55 I'd thought :~ might be a good name for that, since the way I'd do that now would be to include a label, like : bar in the example above. 2023-08-29 17:25:43 My current system doesn't use any return stack weirdness for that - it does it with a regular offset after the me instruction. It uses the dictionary to find the most recently defined label address. 2023-08-29 17:29:01 Right now I'm trying to decide how fancy to get with the conditional return and conditional me stuff in this F18A-based design. I don't have enough opcodes to define the whole fleet of those with dedicated codes. So I'm trying to decide whether to have only one version - ?; and ?me that probably would be equivalent to 0=; and 0=me, or whether to let a few bits of condition specifier follow the opcode. 2023-08-29 17:32:02 Oh, I did take the count field out of the short headers and chased down all the kinks related to that. I really like these short headers. 2023-08-29 17:32:49 I only have a couple of instruction mnemonics that need a full header. That saved several hundred bytes straight-away.