PDA

View Full Version : Assembler routines for CP/M



Dr_Acula
May 20th, 2009, 06:36 PM
Does anyone have any links to useful assembly routines?

I've been coding in assembly quite intensively over the last week and found all sorts of useful things. I'm working through all the bios and bdos calls at the moment. For instance, function 35 can return the size of a file - if you know where it puts the answer!

I've got a whole lot of math routines out of various books on CP/M. Interestingly almost every routine had one or more errors in the code. I wonder if many of them were actually written and debugged. But they are all working now.

I've also been working on string routines in assembly. Even modern micros like a Picaxe struggle with strings, mainly because they take up so much space. But it is possible to take many of the instuctions in C and Basic and convert to assembler, and suddenly everything runs about 100x faster. Left$, Mid$ adding strings, clearing strings etc.

But I'm sure I'm not the first person to write these sorts of routines. Does anyone know of links to useful assembly routines? Or have any buried away on a disk somewhere from a project done 25 years ago?! Links and code would be most appreciated. (and if anyone wants to see what I am working on I can post the code).

Chuck(G)
May 20th, 2009, 08:12 PM
Got lots of stuff. Here's a decimal floating-point package from about 1980 callable by DRI PL/I code. Derived from a much earlier package--a somewhat amplified version of this (with trig and transcendental functions) found its way into the 8-bit versions of SuperCalc and Pascal/M.

I wrote for 8080, because not everyone used the Z80. I think that the assembler used was DRI RMAC.

Dr_Acula
May 20th, 2009, 08:14 PM
That is absolutely brilliant. Thanks++

RickNel
May 22nd, 2009, 12:26 AM
Have you looked at this site?

http://www.microcodeconsulting.com/z80/z80pd.htm

Dr_Acula
May 22nd, 2009, 04:36 AM
Thanks++ - looking at it now...