[net.micro.cpm] movcpm synchronization errors

PLK@Mit-Mc.ARPA (07/08/84)

From:  Paul L. Kelley <PLK@Mit-Mc.ARPA>



		BDOS jump checking in MOVCPM.


	LXI	B,STORAGE	;MOVCPM has already read the presumed address
				;of the running BDOS from 0006 and stored it
				;away
	LDAX	B		;get least significant byte of running BDOS
				;address
	CPI	6		;is it really BDOS or perhaps DDT?
	MVI	A,0		;get ready to put the address of the running
				;serial number in STORAGE
	JNZ	SYNCERR		;give synchronization error if not the correct
				;BDOS address modulo a page
	STAX	B		;STORAGE now has address of start of running
				;serial number


		Serial number checking in MOVCPM.

	
	LXI	D,MOVCPM$SERNO	;location of serial number in MOVCPM's
				;relocatable version of BDOS. This is at
				;the start of the relocatable BDOS.
	LHLD	STORAGE		;get the address of the running serial number
	MVI	C,6		;length of serial number
LOOP:	LDAX	D		;compare MOVCPM's serial number with
	CMP	M		;running BDOS's serial number
	JNZ	SYNCERR		;give synchronization error if CMP fails
	INX	H		;check
	INX	D		;	all
	DCR	C		;		six
	JNZ	LOOP		;			bytes

towson@Amsaa.ARPA (07/09/84)

From:      David Towson (CSD) <towson@Amsaa.ARPA>

Paul - Thanks for posting the nice disassembly of the serial number checker
portion of MOVCPM.  That should help those who get into some of the more
unusual hacks, such as David Kirschbaum did.  My Omikron CP/M for the TRS-80
was legally bought and paid for, but came without MOVCPM.  I don't know why.


Dave
towson@amsaa.arpa