• Please review our updated Terms and Rules here

CP/M 2.2 assembly language

Mike_Z

Veteran Member
Joined
Dec 1, 2013
Messages
1,713
Location
Near Milwaukee Wisconsin
Over the weekend, while watching the football on TV, I started to convert my monitor and cold start loader programs to CP/M assembly. I thought of trying to use MS Word and save the file as text. Then transfer it to an 8" disk. It worked for the most part, some of the TAB's were screwed up and the format looked goofy in WordStar. It was not consistent, so I could not determine why. No matter. So, I tried to assemble it and found a boat load of errors, mostly typo's that I has made, but a few that I do not understand.
First, I have a JUMP table at the beginning and then code afterward. I want the entry or start to be at F810H, so I coded it like this.
Code:
		ORG	F800H
JUMPT:	JMP	SETDMA
		JMP	CSEEK
		JMP	CREAD
		JMP	CWRITE

		ORG	F810H
START:	DI

BUT... the assembler doesn't like the second ORG statement.

Second, I used some labels that maybe reserved names?
Code:
CCP:	EQU	0E400H
BIOS:	EQU	0F200H

The assembler reported these as 'L' or label errors. Thanks Mike
 
Easy--if a constant starts with a letter, you must prefix it with a zero--otherwise, the assembler has no way to tell if you mean a symbolic label ("F810" is a perfectly legitimate symbol). Thus, 0F810H will be accepted as a constant.
 
I have also stumbled across the Label errors, regarding CCP & BIOS. I defined them two different times with different values. I can make all kinds of mistakes and if I'm using a computer I can make them faster. Mike
 
Back
Top