2023-07-27 01:57:57 That looks like Turkish. 2023-07-27 03:32:08 xelxebar: hello, yes, i did a quick fasm through jonesforth, but lost my mind during later part.. 2023-07-27 03:34:34 https://git.envs.net/iyzsong/jonesforth-fasmg, should do it again later. well i should focus on boot duskos first lol 2023-07-27 03:37:47 iyzsong: try camel86 forth in dos tasm 2023-07-27 03:38:06 ACTION search it 2023-07-27 03:38:08 much easier 2023-07-27 03:39:07 http://www.camelforth.com/page.php?7 2023-07-27 03:39:28 thx, maybe later (put in my random todos) 2023-07-27 03:40:07 i wiped freedos install on a HP t5100 (32MiB disk), and want to boot duskos, but failed :\ 2023-07-27 03:40:39 i havent tried duskos yet 2023-07-27 03:41:13 but ive tried collapseos 2023-07-27 03:41:27 and uxn 2023-07-27 03:42:23 siesta: maybe you should try it! I played with uxn too, but don't know what to write applications for myself yet, lacking desire.. 2023-07-27 03:43:05 iyzsong: What did you find particularly brain melting about JonesForth's latter part? 2023-07-27 03:43:26 Lobbing questions here would be fun :D 2023-07-27 03:49:11 xelxebar: it's my own faults.. for longer routinue like INTERPRET, i haven't be slow enough to understand it in details, only do a quick copy/paste. and I didn't follow the controls words (IF/UNTIL/WHILE/etc) deeply. now i'd say i forget 80% of it, so i can't write one without look/copy from the original code. 2023-07-27 03:52:55 Yeah, not really any way around energy investment. 2023-07-27 03:53:35 Wanna join me in the SmithForth club? Can go through x86 architecture and opcode encodings and asm and sycall interface stuff together :) 2023-07-27 03:53:41 xelxebar: a qusetion for duskos, am i right to think 'd)' ( si 0 d) mov, -> mov, [si] ) can be used in realmode too? https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/asm/i386.fs#L73 the bios13.fs (which i'll try today night to see if my hardware have int13 issues) use d), but got error since it's realmode.. 2023-07-27 03:54:10 that sound great! how to join? 2023-07-27 03:55:04 Unfortunately, I've not actually gotten as far as looking at DuskOS or CollapseOS. Trying to grok Forth first ;p 2023-07-27 03:55:56 Joining the club just requires dedicating actual time to trying to grok and unabashedly asking questions when you're lost. 2023-07-27 03:56:19 in this channel? ah, okay. count me in! 2023-07-27 03:58:19 Yeah, this is as good a place as any! I just DMed you an email address where you can reach me, for more async communication when needed. 2023-07-27 04:01:17 sure, i could contact you later at home (now in working without my email access..) 2023-07-27 04:08:44 xelxebar: i'm on fediversity (https://kbin.social/u/iyzsong) and matrix too 2023-07-27 04:39:37 Nice. Just followed. 2023-07-27 04:46:01 By the way, about `jmp 0x7c00` as the first instruction, memory location 0x7c00 corresponds to "where the bootloader lives". Since the bootloader starts after bios, it has to be careful to not overwrite bios stuff, so the short answer is that it's just high enough in memory to avoid stepping on the bios' toes. 2023-07-27 04:47:05 okay, thank you :) 2023-07-27 04:48:01 well, that be wrong (jmp 0x7c00 is a halt loop there) due to the bios13.img is unable to assembly correctly.. 2023-07-27 04:49:09 ofc not you said is wrong, but that instruction should be 'jmp lbstart' 2023-07-27 04:53:35 i haven't look at the encoding of 'jmp', it seems it's relavite, what happended is it get encoded as 'jmp 0' first, without a reach of 'lbstart forward!' (in duskos to rewrite the former 'jmp' instruction with current addr), so it's broken.. 2023-07-27 04:53:42 Just looking at fs/xcomp/i386/pc/bios13.fs, I don't really follow. Looks like a Virgil's assembler stuff, perhaps. 2023-07-27 04:54:03 yes, it's a i386 assembler... 2023-07-27 04:55:18 assembler in 'fs/asm/i386.fs', the bios13.fs is to assemble a image for diag int13 issue which i think i'm having. 2023-07-27 04:56:03 And we se $7c00 right there on line 5. 2023-07-27 04:56:11 Ah, okay, thanks for the pointer. 2023-07-27 04:56:42 BTW, jmp is relative in normal situations, but in real mode (i.e. at boot time) it's absolute, IIRC 2023-07-27 04:57:21 oh, that may be the reason why Virgil disable d) for realmode.. 2023-07-27 04:58:24 the issue is bios13.fs have 'si 0 d) mov', which failed to assemble, due to i386.fs forbidden it in the definiton of d) 2023-07-27 04:58:42 Argh. make pcrun failing to find cc. 2023-07-27 04:58:57 you can run it with 'make CC=gcc' 2023-07-27 04:59:37 Ah, good. So it does use the envar. Nice 2023-07-27 05:00:26 How did you generate the boot13.img? 2023-07-27 05:00:32 make bios13.img 2023-07-27 05:00:49 Rather, I'm not following where you see the jmp to 0x7c00. 2023-07-27 05:01:11 it's the first 2 bytes of the result bios13.img 2023-07-27 05:02:09 Oh, "bios", not "boot". I R GUD AT REEDING 2023-07-27 05:02:42 i did 'rizin -b 16 -m 0x7c00 bios13.img', then 'pd 8' to see the assembly, since i can't don't have the skill to disasm x86 instructions lol 2023-07-27 05:03:30 yeah, that's where i'm now... 2023-07-27 05:03:46 Cool. Now I'm with you. Have bios13.img. 2023-07-27 05:04:44 well, that bios13.img is incompleted, "asm error ok" in the log mean there is error, which i found.. 2023-07-27 05:05:00 Whoa. You're right. EB FE, that's jmp . 2023-07-27 05:05:07 yes 2023-07-27 05:05:43 xelxebar: work done, i'll riding home now, maybe see you later :) 2023-07-27 05:05:53 iyzsong: Roger! 2023-07-27 05:05:57 Safe driving. 2023-07-27 05:44:28 This is cute, the assembly mnemonics in DuskOS are named with a trailing comma, so you write `ax bx mov, ax ax xor, ...` and the commas act as nice separators. 2023-07-27 05:49:57 xelxebar: hello, i'm iyzsong's another nick at home 🤓 2023-07-27 05:50:20 next4th: Welcome back. 2023-07-27 05:50:29 So I made a bit of headway into understanding things. 2023-07-27 05:51:15 cool, where you get? 2023-07-27 05:51:34 So pc.img works fine, but if you disassemble it with rizin, you quickly get nonsense because the top of the image has a bunch of data embedded in it. 2023-07-27 05:52:18 pc.img not works for my real hardware, i think it have int13h issue.. i'm about to comment out the notreal# check in d) and try bios13.img 2023-07-27 05:52:27 The jmp -2 in bios13.img is correctly disassembled, so that's still mysterious. 2023-07-27 05:53:16 Are you able to get pc.img working under qemu? 2023-07-27 05:53:22 yes i can 2023-07-27 05:54:23 Looking at the it's xxd output, the first jump instruction just jumps over the embedded data at the beginning. 2023-07-27 05:54:46 Following through, it's clearly just doing setup stuff like clearing regs and flags. 2023-07-27 05:54:59 jmp -2 is from 'forward8 jmp,', but it doesn't reach 'lblstart forward!' due to d) 2023-07-27 05:55:28 yes, 'jmp -2' in bios13 should be replace with 'jmp xxx' which xxx is the addr at 'lblstart forward!' 2023-07-27 05:56:48 yes, in duksos.img it then will read files from FAT using int13h, but on my hp t5100 thin client it just hang there.. 2023-07-27 05:57:22 Maybe? The beginning of the working pc.img actually does a double jmp. Inistial instruction jumps to another jmp, which *then* hits lblstart 2023-07-27 05:58:05 i don't know where it hang... 2023-07-27 06:01:40 okay, i get bios13.img boot fine after remove 'notreal#' in 'd)'.. 2023-07-27 06:03:50 next4th: Dang! You found that quick... How?! 2023-07-27 06:04:58 it's ': d) notreal# _d) ... ;' in i386.fs, i just remove the check with hopefully think that it will works in realmode without real understanding what _d) does... 2023-07-27 06:05:51 Ah, now pc.img is broken :P 2023-07-27 06:07:41 dip and tuck. I forgot what stack manips those were. 2023-07-27 06:08:19 i only know swap and over :\ 2023-07-27 06:10:37 i think my next debug step is using bios13.img to read all sectors (ideally in the same way as pc.img) until it error or check the result with actually binary.. which seems will need a lot time 🥲 2023-07-27 06:12:05 Yeah, you seem to be making good headway, though. 2023-07-27 06:13:18 Okay, I can't get sucked deeper into this. Already have my hands in too many cookie jars. 2023-07-27 06:13:34 next4th: Let me know when you start looking at SmithForth! 2023-07-27 06:13:36 yeah, thank you for disscuss 2023-07-27 06:13:55 i could start this weekend 2023-07-27 06:15:03 xelxebar: sure, happy hacking, looking forward to it! 2023-07-27 09:31:43 KipIngram: Is there a summary somewhere of the exotic control flow words you've got? 2023-07-27 09:33:32 No, I haven't really written them up. But they're straightfoward. Essentially, I don't use words that "make flags" for the most part. I combine the test and the action into single words. The basic paradigm is illustrated by, say, =; 2023-07-27 09:33:40 That returns if the two top stack items are equal. 2023-07-27 09:34:01 I also have =;; which double returns, and =me which loops back to the start of the word if the stack items are equal. 2023-07-27 09:34:11 The items are consumed in these cases, just as you'd expect. 2023-07-27 09:34:29 If I prefix the word with a . like .=; then the deepest item that would be consumed is not. 2023-07-27 09:34:43 So A B .=; consumes B but not A. 2023-07-27 09:34:58 I cover all the cases: < <= = != >= > 2023-07-27 09:35:21 And I have the possibility of an implied 0 argument. Those would be 0=; or .0=; 2023-07-27 09:35:49 And finally I can put a u (after the . but before the 0): 2023-07-27 09:36:04 u<; .u<; .u0<; etc. 2023-07-27 09:36:17 Actually it may be .0u<; 2023-07-27 09:36:32 I'd have to check my order on the 0 and the u - I don't use the unsinged ones very often. 2023-07-27 09:37:43 From my word list: 2023-07-27 09:37:46 .0u>me .0u>;; .0u>; 0u>me 0u>;; 0u>; .u>me .u>;; .u>; u>me u>;; u>; .0u>=me .0u>=;; .0u>=; 0u>=me 0u>=;; 0u>=; .u>=me .u>=;; .u>=; u>=me u>=;; u>=; .0u<=me .0u<=;; .0u<=; 0u<=me 0u<=;; 0u<=; .u<=me .u<=;; .u<=; u<=me u<=;; u<=; .0ume .0>;; .0>; 0>me 0>;; 0>; .>me .>;; .>; >me >;; >; .0>=me .0>=;; .0>=; 0>=me 0>=;; 0>=; .>=me .>=;; .>=; >=me 2023-07-27 09:37:48 >=;; >=; .0!=me .0!=;; .0!=; 0!=me 0!=;; 0!=; .!=me .!=;; .!=; !=me !=;; !=; .0=me .0=;; .0=; 0=me 0=;; 0=; .=me .=;; .=; =me =;; =; .0<=me .0<=;; .0<=; 0<=me 0<=;; 0<=; .<=me .<=;; .<=; <=me <=;; <=; .0 Obviously I could have gotten by with a lot less. 2023-07-27 10:06:31 That looks pretty good. Having a solid scheme effectively reduces the space of words to the orthogonal pieces, so really you have . and me "operators", spiritually at least. 2023-07-27 10:06:42 What does me stand for, though? 2023-07-27 10:07:00 next4th: Welcome to the DuskOS ML, btw :) 2023-07-27 10:10:45 Yes. 2023-07-27 10:11:14 I generate the source for all of those with a Python script. 2023-07-27 10:11:25 Oh, me. 2023-07-27 10:11:39 Ok, so me was "inspired" by the way the word "self" is used in OO languages. 2023-07-27 10:11:51 So, it's "jump to self," but me is shorter than self. 2023-07-27 10:12:01 Me, this word that we're running right now. 2023-07-27 10:12:28 What it actually does is look in the dictionary at the most recently defined name, and jumps to its first definition cell. 2023-07-27 10:14:27 Haha. That's cute. 2023-07-27 10:15:18 I really like them. I've used them for quite a lot of code writing now, and I don't miss IF ... THEN and so on at all. 2023-07-27 10:15:39 But you're right about "orthogonal." 2023-07-27 10:15:57 There are the conditional operations, and there are the "flow" operations ; ;; and me. 2023-07-27 10:16:11 And then 0 and . are "options." And they all go together in pretty much any combination. 2023-07-27 10:16:46 In fact, if I look through that list I'll probably find both = and u= words, and != and u!=, which is... wrong. 2023-07-27 10:16:56 u makes no difference for = 2023-07-27 10:17:16 But I don't think I put that refinement in the script. 2023-07-27 10:17:40 It's been a while. 2023-07-27 10:17:58 It would be pretty easy to fix of course. 2023-07-27 10:18:20 KipIngram: Thanks for your summary 2023-07-27 10:18:27 Sure thing. 2023-07-27 10:18:42 I like and dislike aspects of it. I suppose my only real dislike is that there are so many of them 2023-07-27 10:18:43 Oh, and there is a header bit that I set for all these words. 2023-07-27 10:18:47 Otherwise I like the pattern 2023-07-27 10:18:55 Any reason you're using python to code generate those words and not forth itself? 2023-07-27 10:18:59 Well, for the me words - not for the ; and ;; words. 2023-07-27 10:19:11 The me words require an offset to be compiled after the word, and that header bit controls that. 2023-07-27 10:19:12 xelxebar: That assumes it's a cross forth 2023-07-27 10:19:29 It let me avoid having to do the usual dance with an immediate word and a runtime word. 2023-07-27 10:19:31 There's not much point writing forth building stuff in forth unless it's a cross forth, anyway 2023-07-27 10:20:03 Well, I think the idea of being able to change your system and restart with the new changes is pretty nice. 2023-07-27 10:20:05 veltas: Really? I'd assume this could also all be done at runtime as part of the initialization process. 2023-07-27 10:21:08 I suppose so 2023-07-27 10:22:07 KipIngram: This personal forth of yours, it's not publicly available anywhere for us to scry lessons from is it? 2023-07-27 10:54:35 :-( No, not yet, and I've been beaten up a little over that. 2023-07-27 10:54:50 I do intend to post it, but after I'm "done." 2023-07-27 10:58:54 Well, I just downloaded the arm development toolchain; wow - lot of files in there. 2023-07-27 11:00:25 my god... it's full of files 2023-07-27 11:00:46 I think the big hurdle on either this ItsyBitsy M4 Express board or the Maxim one I have on order will be getting enough init in place to be able to talk with the thing over the USB serial console. Once I can get to there, then I'll be able to use that interaction to get further - from a working serial port to a working Forth won't actually involve any further "peripheral work," so I'd later be able to use 2023-07-27 11:00:48 Forth to bring up the remaining peripherals. 2023-07-27 11:00:57 Cue the 2001 riff... 2023-07-27 11:05:10 What might be worth doing is just removing C code until you've got a minimal working example 2023-07-27 11:05:21 Then you know what you need to port 2023-07-27 11:05:27 ACTION beats up KipIngram 2023-07-27 11:05:58 Not sure if that's a code of conduct violation, to affectionately beat someone as an action on IRC 2023-07-27 11:07:24 shoving kindness 2023-07-27 11:14:53 Yeah; that might be the best way to get started. 2023-07-27 11:15:50 I felt no offense. Skin isn't that thin... :-) 2023-07-27 11:16:00 Earlier generation. 2023-07-27 11:18:19 KipIngram: Okey dokey. Sounds like other people have expressed interest (in various ways) already. 2023-07-27 11:19:53 Are there any canonically "top quality" forth code base that would be worth studying? I'm thinking in the same way that sqlite is considered top quality C, or xmonad good Haskell. 2023-07-27 11:52:32 I think a good first target on either of these little boards would just be an "echo function." Be able to connect via USB serial and start typing, and have the unit echo that text right back to me. 2023-07-27 11:52:49 Once that's working, I can then "go from there" - start actually putting in Forth. 2023-07-27 11:53:02 Not Forth source - I mean the code for a Forth. 2023-07-27 15:20:03 Looks like the full details of the Maxim gadget are here: 2023-07-27 15:20:05 https://www.analog.com/media/en/technical-documentation/user-guides/max32655-user-guide.pdf 2023-07-27 15:31:57 Wow - this thing has the power supply circuitry integrated into the chip. Just slap a lithium battery on and configure. 2023-07-27 15:32:12 Four buck switching regulators. 2023-07-27 15:34:31 Clock enables for all of the peripherals.