View Full Version : Data Error CPM 2.2

March 14th, 2017, 02:13 PM
I have been working on a look up table to convert ASCII characters to Friden characters. Today I came across an odd thing. My look up table is a bunch of DB statements with comments to help me see what is there. For example

db 22H,40H,23H,13H,24H,04H,25H,15H ;",#,$,!

This code gave me a data error when I assembled it. Turns out that the problem is the exclamation point in the comment. If I remove just the !, everything works. After doing some reading, the ! is an end of line symbol, used to put more than one code on the same line. I didn't know that, but I had assumed that anything could be placed in a comment. But apparently that is not so? Thanks Mike

March 15th, 2017, 08:33 AM
I seem to recall some other odd behavior for the DRI assemblers., like not handling single-quote characters in comments (or at least not handling odd numbers of). I've been re-learning a lot of those as I come back from working in Linux/Unix for so many years. It was a simpler time...

March 15th, 2017, 12:43 PM
Although I've been using the 8080 assembly code since the beginning, I have only recently got CPM 2.2 to go. About 2-3 years ago, I pulled out my old home made 8080 machine and with the help of many on this forum, I converted the machine from my home made assembler to a CPM machine. So most of the CPM stuff is new to me, but it is giving me something to do in my old age. Mike

March 20th, 2017, 06:14 AM
Here's another lesson learned.


I was using this as part of a FCB that I was making. Apparently ASM interpreted this as the CPM command? Anyway, ASM would not finish and the machine ran wild during assembly. This also took a while to find and understand.

Interestingly this did not bother the assembly



March 20th, 2017, 07:54 AM
Mike, I'm not following you. If I try your example, it works fine.

0000 110300 label: lxi d,type ;FCB file type
0003 000000 type: db 0,0,0

0006 end

March 20th, 2017, 08:09 AM
Well, that's odd. What was unusual about this was that during assembly, the assembly stopped and the machine ran wild. Requiring me to reset and restart everything. There was no error messages, to help point the way. My trouble shooting method was to back track, removing the new statements a few at a time and then test assemble. It all boiled down to the LXI D,TYPE statement. Once I changed TYPE to TYP, everything worked. This afternoon I will try just the brief program you show to see if my machine works as yours. Thanks Mike

March 21st, 2017, 01:07 PM
Well..... after a few hours of horsing around adding and changing code. I believe what I had first thought about the TYPE is incorrect. I now think that somehow, while using WordStar to modify my source code, I somehow removed a CRLF from one of the lines of code. I'm not sure how I did it, maybe with a cut and paste. Looking at the bad file, there is a missing 0DH 0AH between two lines. I'm thinking that this caused the CPM Assembler to get confused and the machine to run wild. Mike