[net.micro.cpm] LDR Problem

RCONN@Simtel20.ARPA (08/02/84)

From:  Richard Conn <RCONN@Simtel20.ARPA>

Hi, Ted,

	Your report of problems with LDR is interesting.  No, no one
has reported having any similar problems.  I notice a few items from
your report:

	1. First, since you did not assemble LDR, you should have
received a distribution version.  It contains a Class 1 Environment
Descriptor and you should see the address of your Environment
Descriptor buffer at 109H and 10AH.  I recommend that you check the
original CRC against the value in the distribution list to make sure
that you have a good copy.  Also, after running Z3INS on LDR, load
LDR.COM with DDT and check 109H-10AH to see that the address of your
Environment Descriptor is properly in place.  LDR.COM should extend
from 100H to 0AFFH (next PC is 0B00H).

	2. I highly suspect the LDR.COM that you have as being invalid
since you report a "DIRALPHA -- Pointer Error" message, and there is
no such message inside of the distribution version of LDR.COM.  This
particular message comes from the SYSLIB2 DIRALPHA routine and, as a
rule, should never appear anyway, since it indicates that the
pointer-based sort routine failed.  If someone tried to reassemble LDR
with SYSLIB2 instead of SYSLIB 3, they would have had to change the
source and would now be bringing in all sorts of older routines which
should not be there, such as routines which deal with disk-based named
dirs.  In short - one absolute mess.

	3. You are quite correct in the loading sequence.  Once LDR
has been installed, it contains only a pointer to an Environment
Descriptor.  This descriptor must be resolved first, and then the
other System Segments may be loaded.  This is a common mistake which
is made the first time around, and it looks like you avoided it.

	That is the analysis I can offer from the information you gave
me.  It sounds like your source does not have the correct files,
offhand.  You might want to consider going with the Echelon
alternative, because for only $39 you can get a complete starter kit
and a hard copy of the installation manual and Sampler without having
to worry about corrupted or modified files (a CRC list is provided).
This also ties you into the support system of Echelon and gets you a
subscription to the newsletter (of which issue 4 is now coming up).
The newsletter, among other things, talks about questions that people
have been asking on a recurring basis and may resolve some of your
problems before you encounter them.  SIMTEL20 contains the CRC lists
if you don't have access to one.

Rick

RCONN@Simtel20.ARPA (08/02/84)

From:  Richard Conn <RCONN@Simtel20.ARPA>

FYI -- This is Ted's problem which I responded to in the other
message.

	Rick


Date: Wednesday, 1 August 1984  09:21-MDT
From: decvax!mcnc!decvax!mcnc!ecsvax!emigh at Berkeley
To:   rconn at SIMTEL20.ARPA
cc:   ecsvax!emigh at Berkeley
Re:   LDR Problem
Original-From: Ted Emigh <emigh@ecsvax>
Location: Genetics and Statistics, N.C. State University
Address: {decvax akgua unc duke ihnp4}!mcnc!ecsvax!emigh
Arpanet: decvax!mcnc!ecsvax!emigh@BERKELEY.ARPA

Rick,

  I have been getting ZCPR3 in pieces.  Looks good, BUT...

  I often have trouble loading SYS.ENV.  (In fact, I almost always do).
I can boot ZCPR3.  I look at the various areas, and they are all initialized
correctly. (Basically the same as the one given in the Installation guide,
but my NorthStar prom is at E800H, so the addresses are somewhat shifted).
My SYS.ENV is a Class 1 Environment.  When I issue LDR SYS.ENV, one of
several things happen:
If LDR.COM is installed with SYS.ENV, then my system dies.  Sometimes it
will reboot the system (Jump to around E800H).  By some quirk, after it
reboots, LDR will load SYS.ENV correctly.
If LDR.COM is installed with a Class 2 SYS.ENV, I get the message
"DIRALPHA -- Pointer Error".  However, SYS.ENV is loaded, and further
LDR commands will execute correctly.

Under any case, once SYS.ENV has been loaded correctly, it will reload without
any problem (and will then load SYS.*).

The cold boot loader is similar to my working copy for ZCPR2.  I don't have
the source for LDR.COM yet, but am trying to get it, then I can trace it.
Until then, I wanted to know if anyone else has mentioned this problem to you.
I'll keep you posted to whether this is my problem or a problem with LDR.

--Ted--
--
Ted H. Emigh     Genetics and Statistics, North Carolina State U, Raleigh  NC
USENET:	{akgua decvax duke ihnp4 unc}!mcnc!ecsvax!emigh
ARPA:	decvax!mcnc!ecsvax!emigh@BERKELEY

RCONN@Simtel20.ARPA (08/07/84)

From:  Richard Conn <RCONN@Simtel20.ARPA>

FYI -- This is an answer to that LDR anomaly.  Will see that a change
is posted.

	Rick


Date: Monday, 6 August 1984  12:10-MDT
From: decvax!mcnc!ecsvax!emigh at Berkeley
To:   rconn at SIMTEL20.ARPA
cc:   ecsvax!emigh at Berkeley
Re:   LDR Problem
Original-From: Ted Emigh <emigh@ecsvax>
Location: Genetics and Statistics, N.C. State University
Address: {decvax akgua unc duke ihnp4}!mcnc!ecsvax!emigh
Arpanet: decvax!mcnc!ecsvax!emigh@BERKELEY.ARPA
References: Msg of 2 Aug 1984  14:06-MDT from decvax!mcnc!ecsvax!emigh at Berkeley

Rick,

  The program LDR.COM does not match LDR.MAC (both on SIMTEL20).  I have made
a ZSID listing of LDR.COM,and have printed it next to the LDR.MAC listing
(forgive the difference in mnemonics, I can't locate DDT just now...).
ZSID Disassembly of		LDR.MAC from SIMTEL20
LDR.COM from SIMTEL20
			;
			;  Load Data Buffers from Environment
			;
			setdata:
LD	HL,(0754)	lhld	envptr	; get environment descriptor address
LD	(04DC),HL	shld	envadr
LD	DE,0080		lxi	d,80H	; pt to Z3TCAP
ADD	HL,DE 		dad	d
LD	(04E8),HL	shld	tcapadr
CALL	073F		call	getrcp	; get RCP data
LD	DE,04A6		lxi	d,rcpdata	; load
CALL	02BB		call	sdload
CALL	0701		call	getiop	; get IOP data
LD	DE,04B2		lxi	d,iopdata	; load
CALL	02BB		call	sdload
CALL	06F0		call	getfcp	; get FCP data
LD	DE,04BE		lxi	d,fcpdata	; load
CALL	02BB		call	sdload
			lxi	h,ndridat	; init NDR data in case no entry
			lxi	d,ndrdata
			mvi	b,9	; 9 bytes (1-jmp, 5-ID, 2-adr, 1-size)
			call	moveb
CALL	072E		call	getndr	; get NDR data
			mov	a,h	; no NDR data?
			ora	l
			rz
LD	DE,04CA		lxi	d,ndrdata	; load and fall thru to sdload
CALL	02BB		call	sdload
DEC	DE		dcx	d	; pt to entry count
LD	A,(DE)		ldax	d	; get entry count
PUSH	DE		push	d	; save ptr
LD	H,00		mvi	h,0	; HL = value
LD	L,A		mov	l,a
ADD	HL,HL		dad	h	; *2
LD	D,H		mov	d,h	; DE = value * 2
LD	E,L		mov	e,l
ADD	HL,HL		dad	h	; *4
ADD	HL,HL		dad	h	; *8
ADD	HL,HL		dad	h	; *16
ADD	HL,DE		dad	d	; *18
LD	A,H		mov	a,h	; /128
RLCA			rlc
AND	FE		ani	0feh
LD	H,L		mov	h,a
LD	A,L		mov	a,l
RLCA			rlc
AND	01		ani	1	; A = value * 18 / 128
OR	H		ora	h	; +1
INC	A		inr	a	; get ptr
POP	DE		pop	d	; save value
LD	(DE),A		stax	d
RET			ret				

As you can see, the LDR.COM version does not check for valid Named Directories.
I have used LDR as assembled from LDR.MAC and it is working fine.  This resolves
the problem as far as I am concerned.  If you would still like me to send you
the values in my sys.env file I will do so, but I don't think this is necessary.

--Ted--