Image Map Image Map
Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Assembler with Z80 mnemonics

  1. #1

    Default Assembler with Z80 mnemonics

    I'm trying to rebuild the setup I had to build my CP/M 2.2 and Plus systems. I've got most of the source recovered. I need to write a new SYSGEN for 2.2 and COPYSYS for Plus, as well as write a new copy/format/verify utility for floppies.

    I'm trying to recompile some of the source for my 2.2 system and have run into an issue. I used Z80 mnemonics. I have a utility to format non-native floppies. There aren't any .Z80 directives (or any for that matter). When I try to use M80 I get tons of errors, so I don't think I used M80 to build it. As far as I can remember the only assemblers I had other than M80 was ASM, MAC, and RMAC and those all use 8080 mnemonics.

    It's been 30 years since I assembled any of this. Does anyone have any ideas what I might have done?

  2. #2
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    25,233
    Blog Entries
    20

    Default

    Dunno--I developed commercial firmware using M80 with Z80 mnemonics back in the day, so you'll have to be more precise when you say "tons of errors'. IMOHO, M80 (with L80 and LIB80) was pretty good for the day.

    If you want an MS-DOS assembler for Z80, take a look at the one from Avocet.
    Last edited by Chuck(G); December 4th, 2017 at 01:38 PM.

  3. #3

    Default

    Quote Originally Posted by Chuck(G) View Post
    Dunno--I developed commercial firmware using M80 with Z80 mnemonics back in the day, so you'll have to be more precise when you say "tons of errors'. IMOHO, M80 (with L80 and LIB80) was pretty good for the day.

    If you want an MS-DOS assembler for Z80, take a look at the one from Avocet.
    I like M80 and used it for building my CP/M Plus sources.

    For the 2.2 source I'm trying to assemble it's marked about 50% of the lines as errors, mostly "O" (bad opcode or syntax), "Q" ("Questionable" error), and "U" (undefined symbol).

    I don't see any hidden control characters in the files and I haven't transferred them in and out to another system that would have messed with the formatting.

    The ones marked "O" I've looked at and they are all valid Z80 mnemonics. These files haven't even been edited in the past 30 years.

    That's why I'm guessing I may have used something else at some point that I've forgotten since as I said I switched to M80 when I updated the 2.2 sources for Plus.

  4. #4
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    25,233
    Blog Entries
    20

    Default

    Got a sample? I'll give it a try.

  5. #5
    Join Date
    Jun 2015
    Location
    Calgary, AB
    Posts
    18

    Default

    Did you possibly use the /Z switch on the M80 command line in the past? According to the M80 manual, that's an alternative to the .Z80 directive. I haven't used the command line switch but have extensively used M80 and the .Z80 directive without any issues.

  6. #6

    Default

    Don't labels have to be followed by a colon? I remember that being a big difference.

    Larry G

  7. #7

    Default

    Quote Originally Posted by WSM View Post
    Did you possibly use the /Z switch on the M80 command line in the past? According to the M80 manual, that's an alternative to the .Z80 directive. I haven't used the command line switch but have extensively used M80 and the .Z80 directive without any issues.
    I didn't remember using the /Z switch but Chuck tested it and it worked except for a couple of errors in labels, so the code I recovered must not have been the final copy.

    The other source code I have with Z80 mnemonics used the .Z80 directive, but this one didn't so I thought I must have had something else I used.

    It's been 30 years since I last touched the code so there's lots that I've forgotten.

    This was all written for the TRS-80 Model 4.

    For example, I can't remember how I built my CP/M 2.2 code to make the file to write with SYSGEN. I have the CBOOT and CBIOS sources but I don't remember putting them together at all. I have one version that has a memory disk and I even found a disk that was still bootable. It has an alternate CCP that a friend wrote so I need to go through the CP/M manuals to get the locations for the CCP in the file that SYSGEN writes as I'd like to have another one that's stock CCP.

    I have another version where I used the alternate bank to move some of the code out of main memory to increase the TPA which in turn allowed me to add more terminal emulation control codes and an extra emulation mode (ADM-11 and VT52). That source code does detail the tracks and sectors to place things for booting but whatever I used to write it is gone.

    I still have the CP/M Plus BIOS and boot code along with the SUB files to build it. I've lost the COPYSYS to write the system tracks, though. I still have bootable disks and built a new CPM3.SYS to test and it worked. I also have the sources for the utility to change the system settings in Z80 assembler, BDS C, and Mix C (I wrote a version in C as I was teaching myself the language at the time).

    I've got the source for the format/copy/verify utility but it doesn't work so that source must also have been a work in process and not the final copy. Right now as a workaround I can use Montezuma Micro to format disks as I was able to add the format to MM's DISK.FDF file.

    I also have a bootable copy of TurboDOS that I made using a modified version of my CP/M 2.2 BIOS. Unfortunately that modified BIOS source is gone but I should be able to disassemble it when I get time.

    This has been fun but also frustrating when I realize how much I've forgotten.

  8. #8

    Default

    Quote Originally Posted by retrogear View Post
    Don't labels have to be followed by a colon? I remember that being a big difference.

    Larry G
    Yes, I believe you are correct.

  9. #9

    Default

    I did find my old copy of the book "CP/M Programmer's Encyclopedia". That will help.

  10. #10
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    25,233
    Blog Entries
    20

    Default

    Quote Originally Posted by WSM View Post
    Did you possibly use the /Z switch on the M80 command line in the past? According to the M80 manual, that's an alternative to the .Z80 directive. I haven't used the command line switch but have extensively used M80 and the .Z80 directive without any issues.
    I ran Alphasite's code sample through M80, and it was the /Z switch that was omitted. The only other error was due to the fact that M80 pays attention to only the first 6 characters of a label--so "MYLABEL" and "MYLABEL0" are treated as the same symbol.

    FWIW, I ran m80 on an MS-DOS CP/M emulator running under dosemu on a 64-bit Linux box. So, an emulation inside an emulation.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •