amine Posted Saturday at 08:33 AM Posted Saturday at 08:33 AM (edited) On 8/2/2026 at 5:18 PM, Jos Visser said: Good morning, Jos Visser here, the developer of OpenComal. In answer to Amine's question: Everything is possible :-) But, that said, I lack a lot of context here and I do not have a lot of time these days to work on OpenComal (or anything except for my main job, really). However, I do have time to answer questions and help brainstorming. Hello Jos, @Jos VisserI have a set of Comal robotics routines I would like to integrate from here p140 to 148. What do I need to integrate that inside your open comal distribution ? Also in original hardware the prgram communicate to port 925. I think this will be different on modern hardware. https://archive.org/details/steuern-und-regeln/page/148/mode/1up Edited Saturday at 11:10 AM by amine Quote
evank Posted Saturday at 01:52 PM Posted Saturday at 01:52 PM 7 hours ago, amine said: We should have user friendly primitives that the user don't need everytime to rewrite the definition of the wait() or the motoron/offf. Those robotics routines aren't included anywhere in Comal or Pascal. You need to write your own and in the german book many of them are included as examples. That's the robotics library like the talkto in logo we need to make open source. I think the resident program is used in the "Direct mode" I am not sure we need it unless we want to do real time command, a "command center "like program, for real time control. For example with an interface when you can in real time turn on and off the output with a mouse click. What we need are the libraries for our user friendly robotics routines that everyone is gonna use. The library from the Tc controller disk is called LTTCC and contain the warte() " wait() " primitives. We can do our own in less that one hour. But we need make sure we make it opensource standard for everyone on github for example. For example here is the procedure in Comal for the wait(): PROC wait(n) CLOSED ti:=TIMER+n REPEAT UNTIL ti<=TIMER ENDPROC wait And in C from the book: void warte(long unsigned time) { int i, ticontrol 67, ti266, pio_b 97, pio_c; if ((unsigned char) peekb (0xf000,0xfffe) == 0xfc) pio_c = 97; /*AT*/ else /*PC, XT*/ pio_c = 98; outportb(ticontrol,176); for(i=0; i<time; i++) { outportb(ti2,169); outportb(ti2,4); outportb(pio_b, (inport(pio_b)|1)); while((inportb(pio_c)&32) == 0); } } Google AI explanations This is a low-level C function designed for older IBM PC architectures (like the PC/XT and AT). It generates a time delay by interacting directly with the computer's motherboard hardware. HardwareMeaning peekb(0xf000,0xfffe): Checks the BIOS model byte to identify the machine. 0xFC means an IBM AT. ticontrol, ti2: Refers to the 8253/8254 Programmable Interval Timer (PIT). It configures Timer 2, which controls the PC speaker and system timing. pio_b, pio_c: Refers to the 8255 Programmable Peripheral Interface (PPI), used to read the system configuration and toggle hardware lines.while((inportb(pio_c)&32) == 0): Loops until a specific hardware status bit changes. In Comal That delay procedure doesn't exist anywhere in the system library and I don't want to write that everytime. In the book they guide you to write your own libraries.At the end they call it legocml, you need to link it before using it. We only need to retype and translate it ,it is all already written in the book. They already have done the libraries for you in Comal and pascal. Our remaining job is only to translate and upload that on internet. My understanding is that You dont ever need to launch the resident program for being able to code the interface in Pascal or comal if this is what you think. Thats for direct control, like the TC logo command center. You need it if you want to change the output in real time for example. The TC controller disk is supposed to be part of 9760 sets for BBC and C64 I never seen it listed for IBM and that surprise me that it was offered for free as Legolines with that book that is not a Lego product. We have everithing to start the work and with the help of AI it is basically an afternoon job. @amine I am confused, and I suspect @Toastie might be, too: why do we 'need' what you're proposing? What is the use case? Crawling back behind my Apple II now (because under would hurt). Quote
amine Posted Saturday at 03:05 PM Posted Saturday at 03:05 PM (edited) 1 hour ago, evank said: @amine I am confused, and I suspect @Toastie might be, too: why do we 'need' what you're proposing? What is the use case? Crawling back behind my Apple II now (because under would hurt). Making a library of user friendly primitives in structural langages instead of using low level routines every time I need to blink a LED.!!!! Edited Saturday at 03:07 PM by amine Quote
Toastie Posted Saturday at 03:07 PM Author Posted Saturday at 03:07 PM (edited) 1 hour ago, evank said: why do we 'need' what you're proposing? What is the use case? @evank yes I am bit confused. I am guessing that @amine is proposing/planning to have libraries for Pascal, C, Comal, Basic that you can load/merge with your program without needing to program that each time? What I don't understand though is: The libraries will be platform specific, won't they? SO we would need to make such libraries for PCs, Apples, BBCs, etc. as each use their specific Interface A I/O (or memory mapped) addresses, don't they? That is also the case for the timing? Best Thorsten EDIT: Parallel posting :D Yes, my guess is right then. Edited Saturday at 03:09 PM by Toastie Quote
amine Posted Saturday at 03:10 PM Posted Saturday at 03:10 PM (edited) 8 minutes ago, Toastie said: @evank yes I am bit confused. I am guessing that @amine is proposing/planning to have libraries for Pascal, C, Comal, Basic that you can load/merge with your program without needing to program that each time? What I don't understand though is: The libraries will be platform specific, won't they? SO we would need to make such libraries for PCs, Apples, BBCs, etc. as each use their specific Interface A I/O (or memory mapped) addresses, don't they? That is also the case for the timing? Best But those routines that are from page 140 to 148 of the book, what are they for ? I don't understand german but that strongly look like a comal library for controlling the Interface A. https://archive.org/details/steuern-und-regeln/page/148/mode/1up Edited Saturday at 03:16 PM by amine Quote
Toastie Posted Saturday at 03:18 PM Author Posted Saturday at 03:18 PM (edited) 10 minutes ago, amine said: But those libraries that are from page 140 to 148 of the what are they for ? These are functions (convenience calls) which you have access to by using the #include compiler directive. They turn on/off Int.A outputs, read and mask off inputs. Then there are two or three that count changes of the inputs, with break after time has elapsed or a key was pressed. As the authors say, instead of using the fancy "warte" (= wait) function, Turbo C has "built in" timer() and delay() functions with ms resolution, when you #include dos.h in your Turbo C-program Best Thorsten Edited Saturday at 03:20 PM by Toastie Quote
amine Posted Saturday at 03:29 PM Posted Saturday at 03:29 PM (edited) 12 minutes ago, Toastie said: These are functions (convenience calls) which you have access to by using the #include compiler directive. They turn on/off Int.A outputs, read and mask off inputs. Then there are two or three that count changes of the inputs, with break after time has elapsed or a key was pressed. As the authors say, instead of using the fancy "warte" (= wait) function, Turbo C has "built in" timer() and delay() functions with ms resolution, when you #include dos.h in your Turbo C-program Best Thorsten Well we can use them, translate those in english and make of them a free library available online "github" that everybody can play with it.They dont have to stay forever in the book... Edited Saturday at 03:31 PM by amine Quote
Toastie Posted Saturday at 03:57 PM Author Posted Saturday at 03:57 PM 24 minutes ago, amine said: translate those in english and make of them a free library available online "github" True. These will be specific to PC XT/AT computers and the Turbo C (etc.) language(s) they use in the book. Turbo C runs of course in the TCLogo connect DOSBox-X version of @diegobaca. Just recall that you use the 9771 ISA card at I/O address dec 925. Best Thorsten Quote
amine Posted 19 hours ago Posted 19 hours ago (edited) 18 hours ago, Toastie said: True. These will be specific to PC XT/AT computers and the Turbo C (etc.) language(s) they use in the book. Turbo C runs of course in the TCLogo connect DOSBox-X version of @diegobaca. Just recall that you use the 9771 ISA card at I/O address dec 925. Best Thorsten @evank @ToastieThere was a VHS with the book ? Basically the book teach you to program in different languages and to communicate via a special pascal library included in the IBM Lego controller disk. But that is not a mandatory. The controller is not included in the book. it contain only the examples. The special libraries also are coming from the Lego controller disk and there are two of them legocml.pkg for comal and LTCC.TPU for pascal. We dont ever need the book disk what we need are those two libraries . In the C64 TC controller image disk AI find references to legocml.pkg. Well we only need to find the IBM controller disk and we are done. The book disk is useless. Edited 17 hours ago by amine Quote
Toastie Posted 18 hours ago Author Posted 18 hours ago 1 hour ago, amine said: with the book ? You had to purchase it from the same publisher (Metzler) for DM40 (would be about €35 today). Best Thorsten Quote
Normann1974 Posted 11 hours ago Posted 11 hours ago (edited) I don't know if it's relevant any more or if better rips exist, but I've added a rip of the disk from book 950037 Grundlæggende styring og kontrol (IBM PC og kompatible) here, unfortunately with two defective tracks: https://www.dubbekarl.dk/blog/2026/06/18/950037-grundlaeggende-styring-og-kontrol-ibm-pc-og-kompatible/ If there is a complete rip somewhere, please direct me and I'll remove my broken file. /Jan Edited 11 hours ago by Normann1974 Quote
amine Posted 8 hours ago Posted 8 hours ago (edited) 3 hours ago, Normann1974 said: I don't know if it's relevant any more or if better rips exist, but I've added a rip of the disk from book 950037 Grundlæggende styring og kontrol (IBM PC og kompatible) here, unfortunately with two defective tracks: https://www.dubbekarl.dk/blog/2026/06/18/950037-grundlaeggende-styring-og-kontrol-ibm-pc-og-kompatible/ If there is a complete rip somewhere, please direct me and I'll remove my broken file. /Jan @ToastieGoogle AI was abble to see inside those files but I am not at home currently to test it. There is no other rip of that version of Lego lines on IBM. We have the french and German IBM version but not in Danish. It is awesome to have the disk and example files that came with the manual. To check the disk we only need Dosbox or Dosbox x. Does someone can give it a try. ? Edited 8 hours ago by amine Quote
evank Posted 7 hours ago Posted 7 hours ago Both disk images load fine in DOS Box X. Admittedly, it's been a zillion years since I used Lines on any platform, so I don't remember how to use it for any further testing! But they load fine. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.