@jebug29 Hahaha I though It would light your Altair like a xmas tree! But I forgot the 8008 was a not a particularly powerful CPU, and BASIC is not a great math program. But it worked! It took about 10min to calculate the prime numbers up to 1999. I don't know if the machine is emulated, but it's OK!
There is another program you can run there too (if I was sucessful saving it!).
@peron hehe it's real hardware! That 8080 was chugging it out lol
I'm still not super familiar with assembly, but I really want to write a program in 8080 asm to calculate primes just to see how much faster it would go. I'm not sure how to implement division, though, since there's not a native divide function. Maybe someone will figure it out.
I see your message in a bottle too ;p
It does divide, but its done in software implementation, as the 8080 and Z80 don't have multiplication arithmetic. You can do multiple additions (highly inefficient), or integer shifting (WAY faster, although not optimal).
Its detailed in page 53, and you get the ASM to a integer shifting muliplication/divide.
I would assume an integer--shifting division and prime detection 8080 routine would be x50-x80 times faster in comparison to this BASIC program.
there's a pi-benchmarking page which includes a couple of 8080 stats, and where machines as early as 1975 and as late as 1996 have been benchmarked.
how about the #altair ?
"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko