• Scam Alert. Members are reminded to NOT send money to buy anything. Don't buy things remote and have it shipped - go get it yourself, pay in person, and take your equipment with you. Scammers have burned people on this forum. Urgency, secrecy, excuses, selling for friend, newish members, FUD, are RED FLAGS. A video conference call is not adequate assurance. Face to face interactions are required. Please report suspicions to the forum admins. Stay Safe - anyone can get scammed.

Tales from the S-100 dark side.

mickeyf

Well-Known Member
Wow, this takes me back. I have moved literally 20 times in the past 50 years and don't have any old equipment left, but do have a Z80B (I think that was the souped up 6 Mhz model) among the parts I could not bear to discard, as well as the 8080 that Intel gave you for free if you bought the book on it - a great marketing strategy to get people to start designing with it and using it.

I hand soldered several thousand connections on a surplus Xerox board that was the same basic design as the KayPro, trouble shot memory quirks by holding a ice cube in a plastic bag on individual chips to find the flaky one, 8 in. floppies & CPM. It was a big step up from the SInclair. Anyone else remember the MIX C compiler? First I think out there for CPM, before that it was straight assembler - which I found more straightforward and intuitive for the Z80, compared to say, the Intel chips.

I'm not even finding time to do much machining this spring, much less electronics, but I do have a collection of probably discontinued chips and things that might be of use to someone else. (And several old power supplies.)
 

Dabbler

ersatz engineer
I do have a collection of probably discontinued chips
I have a tube or 2 of 2103 (?) 1K X 1 dynamic memory chips and a small box of core memory drivers and read sense amps... I have some S100 parts left, somewhere, that I haven't recycled yet....
 

slow-poke

Ultra Member
All this banter about older programming languages, I'm a bit younger I started with machine code, Fortran, Pascal and then later C and C++. I still like C. I'm curious for those that have used a variety of languages and have now tried Python what do you think of Python?

I have only played with Python in a trivial way so I'm not in a position to really judge it but at first glance it reminds me of the one downside to Labview that made it a show stopper for me in that there is too much hidden under the hood so to speak. With Labview I was able to quickly make some flashy looking interfaces however when you wanted to do something a bit complicated under that flashy GUI sometimes things would not work as expected and getting access or debugging that lower level code was not like C where you could drill down to get at the problem.
 

JustaDB

Ultra Member
I took a few courses in BASIC, Pascal & C years ago. One of the littluns took a class w/ Python & I helped her out here & there w/ algorithms, etc. It was the first GUI I used & I agree: I preferred the lower level code. Perhaps more familiarity w/ the language would change that?
 

jcdammeyer

John
Premium Member
Oh boy! Programming languages. Almost on the edge of politics. :eek:

I use an Integrated Development Environment (IDE) like MPLAB for PIC controllers, CodeWarrier for M9S12 series both of which with the appropriate programmer allow In Circuit Debugging (ICD) and single stepping either C language statements or even down to the assembler level. The advantage of being able to see the assembler is that it's possible to see how similar C code generates faster/slower or larger/smaller assembler to do the same thing.

On the PC side I use Object Pascal as in Delphi from within RAD Studio.
But similar to Delphi I'm lately starting to use Lazarus.

Why Lazarus?
1. It's free and similar to Delphi Version 6 or 7.
2. Create command line programs or graphical desktop programs.
2. Write once, compile anywhere which means the same software works on PCs, MACs, Linux or even ARM based embedded systems.

For example this program compiles and runs on both my PC and on the LinuxCNC machine. This stuff is metal working related. I've done a bunch that isn't and compiles and runs on a Raspberry Pi or Beaglebone Black.

1714843490512.png

To give credit this program started out as a C language command line program on Linux written by JonElson. I took his code and converted it to a GUI based Lazarus Pascal program since I detest command line applications. My intention was (still is but project #42) to convert all his C programs into Pascal and create the equivalent of a single program with menu selections for the type of CNC operation. So boring, facing, slotting etc. But it will be a while. The current Lazarus version that I moved over from WIN-7 to the new WIN-10 system last year has issues so I need to update and just haven't gotten around to that yet.

1714843977941.png
 

Attachments

  • test.txt
    1.5 KB · Views: 1

Susquatch

Ultra Member
Administrator
Moderator
Premium Member
I started with raw hex machine language. Didn't get an assembler till a few years later. I never learned or used Python so I don't even know what I missed. Many many years later I was given a Fortran compiler for microcomputers and I almost missed out on C too. But so much stuff got written in C that I didn't have much choice but to learn it too. Glad I did because it was so easy to add in assembly code routines with it which made it a lot easier to write hardware drivers for the C environment. I never really had a chance to get really good at it because I was transferred back to engine control where rapidly evolving automotive emissions requirements dictated a return to assembly language for the raw power and speed.
 

jcdammeyer

John
Premium Member
Sometimes assembler is still required when the compiler doesn't do something right. In this case the compiler isn't supported anymore and the M9S12 is really just there because it's still being used but although it can address lots of memory it's still essentially an M6800 8 bit processor with 64K memory map even if it does have paging and 1MB address range.

What the code does isn't important but assembler was needed because the compiler screwed up.

void (* OD_func)(DICT_PARAM * pDict); // = pDict->obj->p.pFunc; asm { LDX 0,SP ; restore * pDict only needed if function pointer assigned in C code. LDY 0,X ; point into pDict LDAB 18,Y ; Get the Page # LDX 16,Y ; Get offset into page STX 4,SP ; Store on stack in OFFSET,PAGE format STAB 6,SP } if ((pDict->obj->ctl & (FDEF_BIT | RD_BIT)) == (FDEF_BIT | RD_BIT)) { pDict->ret = E_SUCCESS; pDict->cmd = DICT_OBJ_READ; *(long *)pDict->obj->pReqBuf = 0; // To do this function call the pointer to the function must be on an odd address // since the function address is also on an odd address. Two odds make a right here // where the compiler gerates the correct byte offset (odd) to the pointer low order word // but the processor can only fetch from an even address. OD_func(pDict); // pass result register. return; }
 

slow-poke

Ultra Member
On the PC side I use Object Pascal as in Delphi from within RAD Studio.


View attachment 47587

To give credit this program started out as a C language command line program on Linux written by JonElson. I took his code and converted it to a GUI based Lazarus Pascal program since I detest command line applications. My intention was (still is but project #42) to convert all his C programs into Pascal and create the equivalent of a single program with menu selections for the type of CNC operation. So boring, facing, slotting etc. But it will be a while. The current Lazarus version that I moved over from WIN-7 to the new WIN-10 system last year has issues so I need to update and just haven't gotten around to that yet.
JC,

I find this thread interesting, when I was using Mach they had some handy wizards, I used "Cut Arc" all the time.

Now that I'm using LinuxCNC I need to find some similar "Wizards" that run under Linux.
The make bore program above appears similar to Cut Arc and I would use it all the time. How easy/difficult would it be to compile a version for Linux?
 

jcdammeyer

John
Premium Member
JC,

I find this thread interesting, when I was using Mach they had some handy wizards, I used "Cut Arc" all the time.

Now that I'm using LinuxCNC I need to find some similar "Wizards" that run under Linux.
The make bore program above appears similar to Cut Arc and I would use it all the time. How easy/difficult would it be to compile a version for Linux?
Follow the link to the lazarus site I posted earlier. Download the version for Linux. I think this project is complete. As with all IDEs it takes a bit of work to learn how to use it.

I've also attached Jon Elson's C language command line version. That should be easy to compile on Linux.

Jon had also not done extensive testing with the IJ version and I found that LinuxCNC complained about start of arc not matching end of arc. Not sure why. The R version doesn't have that problem and I think that's what he used. This is all from about 2 years ago and then life got in the way and I haven't been back to it.
 

Attachments

  • MakeBore_G-Code.zip
    1.2 MB · Views: 1
  • makebore.zip
    2.1 KB · Views: 0

jcdammeyer

John
Premium Member
I couldn't resist. On Misha's old MAC PRO I have the El Capitan Software running. So I downloaded the most recent .dmg files that would run on this version of hardware/software and that zip file in the previous posting.
Did the install of all three .dmg parts.
Then ran Lazarus and compiled and ran the MakeBore program

Here's the result. Very odd. Even though it knows that there's a menu bar with file, options, help it doesn't show in the running application and keyboard response is pretty crappy. However it did create a G-Code program.

Likely if I visit the Lazarus forum someone will likely know the answer as to why. Probably some sort of Apple Config setting or an OPTION hot key sequence?

Screen Shot 2024-05-04 at 3.13.09 PM.png
 

Attachments

  • test.txt
    1.4 KB · Views: 0

jcdammeyer

John
Premium Member
How about this. Rebooted the old MAC PRO into Debian with the Raspberry Pi user interface. So now it's running Linux. The i386 32 bit .deb files downloaded and installed but I couldn't figure out how to run Lazarus. So instead used the old
sudo apt-get install fpc
sudo apt-get install lazarus

This was a very old version of Lazarus pulled in this way. But ...

Ran it, ignore the warning about path and whatever for now. Looks like a Pi from the top menu bar and it created a MACH3 test.tap file.

Screenshot from 2024-05-04 16-00-37.png
 

jcdammeyer

John
Premium Member
And then out to the shop where my LinuxCNC Lenovo PC already has Lazarus and compile the MakeBore Program and run it. This time for X=1.000 and Y=0.000
Here's the screen shot taken after I'd already run it using R words but forgot to do the screen shot. No matter. It does run.

Screenshot_2019-07-21_19-38-37.png


And might as well run it too eh?
Screenshot_2024-05-04_23-58-52.png

Now back to doing something totally useless.
 

slow-poke

Ultra Member
The download zip file is password protected but I couldn't find any link on how to register or acquire a password. Be nice if this could be integrated into LinuxCNC.
I just used the online version (no password required), might be handy to have a standalone version.
 

jcdammeyer

John
Premium Member
I just used the online version (no password required), might be handy to have a standalone version.
Probably only runs under Windows anyway. And if that's the case I can use my Alibre CAD/CAM to generate G-Code. But for more manually oriented machining it's nice to have the apps right on the machine.
Say for surfacing. Install face mill. Jog to one corner to set XY start position, jog to the opposite to set XY end position. Set Z=0 just scratching the casting's highest point. Then tell it go and have it move to clearance plane, move to first corner and then do a pass at a predefined rate. At end move up. Move towards far corner Y for face mill diameter minus overlap and back to the X start position. Back down to 0 and do another pass.
When done go back to XY start position at clearance plane Z.
User moves down manually to new depth of cut. Set that as Z zero . Rinse and repeat.

But looking at all the features of the online program (or the net based one) pretty nice.
 

mickeyf

Well-Known Member
I have long thought that "the kids these days" who get their start learning with a high level language have missed the understanding of CPU architecture that you can't help but get at least some of by coding with assembler. I progressed from Assembler to C, to Delphi. Then did contract work for a government agency for Y2K and had to fix up a Dog's Breakfast of applications using everything from COBOL(which was new to me) , DB III, Visual Basic, to name a few. At my last job before I left this all behind, I finally got to C#, with the company's main product in Windows, but then with MONO developing a new application for the BeagleBoard and finally porting the main Windows program to a Linux version on a regular PC. I found C# to be incredibly productive, but have not kept up with what's happened to/with since MS pretty much clobbered MONO by opening up parts (at least?) of it to open-ish source.

I really liked the BeagleBoard - if I ever find time to get back into tinkering with programming and electronic gadgetry I'll likely get one.
 

gerritv

Gerrit
C# is alive and well on almost any platform. There used to be a time when myth had it that assembler coding was needed for interrupt handlers. Even in 1986 that wasn't true anymore on 68k systems. And given the intervening decades likely not true for anoy other architecture either barring PIC and similar. Maybe not there either.

I started with assembler on Z80 and Univac 1100's, moved to PL/I, Fortran, Cobol and eventually C. Hated C++, love C#. tolerate Python but not a fan of magic indent rules . Don't get me started on the mess created by the Arduino style of C/C++.
 
Top