• Please review our updated Terms and Rules here

Installing CP/M 3 (Plus?) on a home-built Z80 computer

Having spent a lot of time doing code and document development in CP/M, I can say from first-hand experience that CP/M Plus is a much more pleasant environment. True, most applications are not specific to CP/M Plus, but the extra TPA is a big benefit for compilers and word processors. And the better suite of CP/M utilities is also a major benefit. Re-editing of the (previous) commandline is also a big help, although it takes awhile to get proficient with the edit commands (keys) - I find these days I am too ingrained in the bash command editing and thus have not re-learned CP/M Plus command editing. Being able to use timestamps on files is also handy, and better handling of large disks and files was nice.

I liked the bigger TPA, the BIOS not having to deal with blocking/deblocking sectors, the ability to set disk search order, command line editing, and having the ability to set page mode so it would pause after each page was displayed. Sure, you get get some or all of these with BDOS and CCP replacements but I preferred using the originals.
 
Okay, new log follows with extra debug information. I've added a copy of BIOS3.ASM as well for info so you can see where the debug prints are. I've put a HALT before the jump to CCP to stop the log from repeating constantly (which it is otherwise doing as before.) BIOS: View attachment BIOS3.ASM.txt

To my unknowledgeable eye, it looks like something odd is going on with the banking? :whatthat:

Code:
CP/M Plus Copyright 1982 (c) by Digital Research

ld_ccp executing...
selmem called. curBank=00 A=01
Bank 1 selected...
selmem called. curBank=00 A=00
seldsk called...
settrk: 0000
settrk: 0001
sectrn: 0000
setsec: 0000
setdma: BD59
setbnk: 01
setbnk: 00
read called... dmaBank=00
selmem called. curBank=01 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0001
setsec: 0001
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0002
setsec: 0002
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0003
setsec: 0003
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0004
setsec: 0004
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0005
setsec: 0005
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0006
setsec: 0006
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0007
setsec: 0007
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0008
setsec: 0008
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0009
setsec: 0009
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000A
setsec: 000A
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000B
setsec: 000B
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000C
setsec: 000C
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000D
setsec: 000D
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000E
setsec: 000E
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000F
setsec: 000F
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0010
setsec: 0010
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0011
setsec: 0011
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0012
setsec: 0012
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0013
setsec: 0013
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0014
setsec: 0014
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0015
setsec: 0015
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0016
setsec: 0016
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0017
setsec: 0017
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0018
setsec: 0018
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0019
setsec: 0019
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001A
setsec: 001A
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001B
setsec: 001B
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001C
setsec: 001C
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001D
setsec: 001D
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001E
setsec: 001E
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001F
setsec: 001F
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0000
settrk: 0001
sectrn: 0000
setsec: 0000
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0001
setsec: 0001
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0002
setsec: 0002
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0003
setsec: 0003
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0004
setsec: 0004
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0005
setsec: 0005
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0006
setsec: 0006
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0007
setsec: 0007
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0008
setsec: 0008
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0009
setsec: 0009
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

selmem called. curBank=00 A=01
First bdose call completed...
Second bdose call completed...
selmem called. curBank=00 A=00
selmem called. curBank=01 A=01
Third bdose call completed...
selmem called. curBank=00 A=00
settrk: 000E
sectrn: 0000
setsec: 0000
setdma: 0100
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0001
setsec: 0001
setdma: 0300
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0002
setsec: 0002
setdma: 0500
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0003
setsec: 0003
setdma: 0700
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0004
setsec: 0004
setdma: 0900
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0005
setsec: 0005
setdma: 0B00
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0006
setsec: 0006
setdma: FCF6
setbnk: 01
setbnk: 00
read called... dmaBank=00
selmem called. curBank=01 A=00
read dma: FCF6
selmem called. curBank=00 A=00
read completed, erflag=00

selmem called. curBank=00 A=01
selmem called. curBank=00 A=00
selmem called. curBank=01 A=01
Fourth bdose call (BDOS 20), A=01
HL = 1901
CCP loaded...
 
Having spent a lot of time doing code and document development in CP/M, I can say from first-hand experience that CP/M Plus is a much more pleasant environment. True, most applications are not specific to CP/M Plus, but the extra TPA is a big benefit for compilers and word processors. And the better suite of CP/M utilities is also a major benefit. Re-editing of the (previous) commandline is also a big help, although it takes awhile to get proficient with the edit commands (keys) - I find these days I am too ingrained in the bash command editing and thus have not re-learned CP/M Plus command editing. Being able to use timestamps on files is also handy, and better handling of large disks and files was nice.

So if you're going all the to implement CP/M 3, why not make a little more effort and do MP/M II? There, you get the benefit of multitasking.
 
So if you're going all the to implement CP/M 3, why not make a little more effort and do MP/M II? There, you get the benefit of multitasking.

I would argue that MP/M II is not a replacement for CP/M Plus. For a single user, MP/M II is actually a downgrade. CP/M Plus has a vastly superior UI. MP/M-II has a reduced TPA due to the extra layers of software. The multitasking feature is actually not very useful, as there are no practical applications to use it. CP/NET (Server) was the one big application for multitasking that I knew of. Otherwise, people used the "multi-user" features of MP/M-II but that was to run independent CP/M-like users. But the maximum TPA was significantly smaller (48K) than what most CP/M Plus implementations provided (56K). While you could run multiple users on a single Z80 box with MP/M, it was not very fast if those users were doing much more than data entry.

Also, as I thought I heard this inferred recently, MP/M cannot run on SMP hardware (without significant redesign). It is not a *multiprocessor* OS. I recall some hardware vendors of the time that provided systems with multiple Z80s, but they were all independent single-board Z80 *computers* all housed in a single enclosure, possibly having some shared memory between them. Nothing at all like modern multiprocessor (multicore) systems, and you could not run a single instance of MP/M on a batch of independent computers - they could each run their own, isolated, MP/M instances and then you'd have to build some sort of interconnect and software to support it.
 
Nice to see you are back up and running :)!

>>> setdma: FCF6

What on earth is going on here I wonder?! Unless the last sector of this file contains something 'special' that is required to be loaded just below the BIOS???

If you don't put the HALT in though, it may be that we get a 'good' trace with CP/M producing the A> prompt. It did that once the other day.

Thinking about it the "No space" error return may have been produced in response to CP/M erroneously writing something to the disk in the first place (hence the corruption)... Then it thought it had run out of space (after doing something catastrophic).

In these circumstances - I would be tempted to remove the code for writing to the disk and ALWAYS return an error. This should remove completely (or vastly reduce the probability) of the disk becoming corrupt again due to errant behaviour.

Dave
 
Last edited:
The DMA address of FCF6 must be for a data read - vs. directory - since it is in common memory. Addresses like BD59 are probably directory reads, internal to the BDOS, in bank 0. The low-memory setdma addresses are showing the efficiency of the multi-sector read operation, as the BDOS can directly read physical sectors into the destination without any deblocking or copying. The last, partial, sector of CCP.COM is that read into FCF6 so that one record can be copied out. That all looks correct... at a high level.

But I saw some places, that I believe are the two selmem calls being done in the read path, that look wrong. I see this:
Code:
setdma: 0B00
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

Can you explain why setmda showed 0B00 but "read dma:" is showing 19FE? Could the location from which you are getting (saving) the DMA address be in banked memory and so when accessed from common memory you are getting invalid addresses?

UPDATE: I think this is another cowpie I left for you... dmaAddr, dmaBank, and curBank, need to be in common memory (CSEG). Same is probably true for the sekxxx variables, although those may not be getting accessed after switching to dmaBank.
 
>>> setdma: FCF6

What on earth is going on here I wonder?! Unless the last sector of this file contains something 'special' that is required to be loaded just below the BIOS???

I've just had a look at the memory at that location (from the safety of the monitor ROM) and here's what's there:

Code:
     -0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F
FCF- 00 00 00 00 00 00 20 24 4E 6F 20 46 69 6C 65 24  ...... $No File$
FD0- 20 72 65 71 75 69 72 65 64 24 45 52 41 53 45 20   required$ERASE
FD1- 24 20 28 59 2F 4E 29 3F 20 24 0D 0A 0D 0A 50 72  $ (Y/N)? $....Pr
FD2- 65 73 73 20 52 45 54 55 52 4E 20 74 6F 20 43 6F  ess RETURN to Co
FD3- 6E 74 69 6E 75 65 20 24 20 20 28 55 73 65 72 20  ntinue $  (User
FD4- 30 29 24 00 4E 4F 4E 2D 53 59 53 54 45 4D 20 46  0)$.NON-SYSTEM F
FD5- 49 4C 45 28 53 29 20 45 58 49 53 54 24 00 00 00  ILE(S) EXIST$...
FD6- 3A 00 00 00 D0 0D 00 00 00 01 24 24 24 20 20 20  :.........$$$
FD7- 20 20 53 55 42 00 3C 12 C3 9C 0B FE 41 DA 58 0B    SUB.<.....A.X.
FD8- FE 51 D2 58 0B D1 D5 13 1A B7 C2 58 0B 7E D6 40  .Q.X.......X.~.@
FD9- 12 23 7E FE 3A C2 6B 0B 23 D1 C3 5E 0B 2A 8D 03  .#~.:.k.#..^.*..
FDA- 6A 54 0E 02 7E 12 23 13 0D C2 AE 0B C9 0E 00 1A  jT..~.#.........
FDB- 77 B7 79 C8 23 13 03 C3 B9 0B AF 21 9F 0D 34 FC  w.y.#......!..4.
FDC- E2 09 B7 C0 3A 9F 0D 21 80 00 CD B0 0C AF 7E C9  ....:..!......~.
FDD- 01 40 B4 2A 8D 03 68 7E A1 C9 01 A0 B4 CD DD 0B  .@.*..h~........
FDE- 79 B6 77 C9 01 A0 B4 CD DD 0B 79 2F A6 77 C9 2A  y.w.......y/.w.*
FDF- 8D 03 68 77 C9 2A 8D 03 68 7E C9 CD 49 09 45 3E  ..hw.*..h~..I.E>

Don't know if that helps. RAM is empty (all zeros) from about FB00h onwards until FCF6.

If you don't put the HALT in though, it may be that we get a 'good' trace with CP/M producing the A> prompt. It did that once the other day.

Can I just confirm your comment about making the IO polled instead of interrupt-driven? I haven't done anything with that yet, but still have interrupts disabled. So despite that, I should still be able to type into the CCP if it hasn't otherwise hung, even though the interrupts are disabled?

Thinking about it the "No space" error return may have been produced in response to CP/M erroneously writing something to the disk in the first place (hence the corruption)... Then it thought it had run out of space (after doing something catastrophic).

Yeah, it was pretty catastrophic. Talk about being caught with your pants down! :rolleyes: Still, it's sorted now and if it happens again it's no great shakes.

In these circumstances - I would be tempted to remove the code for writing to the disk and ALWAYS return an error. This should remove completely (or vastly reduce the probability) of the disk becoming corrupt again due to errant behaviour.

Dave

I guess. Righto, so I'm guessing I can't just stick a RET at the start of the write: function? What's this error of which you speak? An FF in the accumulator before RETurning, perhaps?
 
UPDATE: I think this is another cowpie I left for you... dmaAddr, dmaBank, and curBank, need to be in common memory (CSEG). Same is probably true for the sekxxx variables, although those may not be getting accessed after switching to dmaBank.

Righto - making the changes as I finish this. ;)
 
Okay, I've removed the HALT from ld_ccp preventing CCP from being executed after it's loaded. I've enabled interrupts for the moment but might give it a go next with them disabled again.

I've moved the following up before the DSEG statement in BIOS3.ASM (now sits immediately after ccp$fcb and fcb$nr definitions):

Code:
dmaAddr:	.ds	2	;last dma address
dmaBank:	.ds	1	;bank for dma address
curBank:	.ds	1	;current selected bank

sekdsk:		.ds	1	;seek disk number
sektrk:		.ds	2	;seek track number
seksec:		.ds	2	;seek sector number

Updated log follows. Gets as far as 'CCP loaded...' and freezes again.

Code:
CP/M V3.0 Loader
Copyright (C) 1982, Digital Research

 BNKBIOS3 SPR  F200  0E00
 BNKBIOS3 SPR  B300  0D00
 RESBDOS3 SPR  EC00  0600
 BNKBDOS3 SPR  8500  2E00

 59K TPA
Z80 MINICOM II CP/M Plus BIOS 1.0.0 by J.Nock 2017

CP/M Plus Copyright 1982 (c) by Digital Research

ld_ccp executing...
selmem called. curBank=00 A=01
Bank 1 selected...
selmem called. curBank=00 A=00
seldsk called...
settrk: 0000
settrk: 0001
sectrn: 0000
setsec: 0000
setdma: BD59
setbnk: 01
setbnk: 00
read called... dmaBank=00
selmem called. curBank=01 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0001
setsec: 0001
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0002
setsec: 0002
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0003
setsec: 0003
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0004
setsec: 0004
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0005
setsec: 0005
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0006
setsec: 0006
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0007
setsec: 0007
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0008
setsec: 0008
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0009
setsec: 0009
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000A
setsec: 000A
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000B
setsec: 000B
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000C
setsec: 000C
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000D
setsec: 000D
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000E
setsec: 000E
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000F
setsec: 000F
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0010
setsec: 0010
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0011
setsec: 0011
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0012
setsec: 0012
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0013
setsec: 0013
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0014
setsec: 0014
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0015
setsec: 0015
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0016
setsec: 0016
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0017
setsec: 0017
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0018
setsec: 0018
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0019
setsec: 0019
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001A
setsec: 001A
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001B
setsec: 001B
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001C
setsec: 001C
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001D
setsec: 001D
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001E
setsec: 001E
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001F
setsec: 001F
setdma: BD59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0000
settrk: 0001
sectrn: 0000
setsec: 0000
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0001
setsec: 0001
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0002
setsec: 0002
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0003
setsec: 0003
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0004
setsec: 0004
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0005
setsec: 0005
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0006
setsec: 0006
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0007
setsec: 0007
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0008
setsec: 0008
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0009
setsec: 0009
setdma: BB59
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB59
selmem called. curBank=00 A=00
read completed, erflag=00

selmem called. curBank=00 A=01
First bdose call completed...
Second bdose call completed...
selmem called. curBank=00 A=00
selmem called. curBank=01 A=01
Third bdose call completed...
selmem called. curBank=00 A=00
settrk: 000E
sectrn: 0000
setsec: 0000
setdma: 0100
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0001
setsec: 0001
setdma: 0300
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0002
setsec: 0002
setdma: 0500
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0003
setsec: 0003
setdma: 0700
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0004
setsec: 0004
setdma: 0900
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0005
setsec: 0005
setdma: 0B00
setbnk: 01
setbnk: 01
read called... dmaBank=01
selmem called. curBank=01 A=01
read dma: 19FE
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0006
setsec: 0006
setdma: FCF6
setbnk: 01
setbnk: 00
read called... dmaBank=00
selmem called. curBank=01 A=00
read dma: FCF6
selmem called. curBank=00 A=00
read completed, erflag=00

selmem called. curBank=00 A=01
selmem called. curBank=00 A=00
selmem called. curBank=01 A=01
Fourth bdose call (BDOS 20), A=01
HL = 1901
CCP loaded...
 
Just got back from my afternoon walk...

Keep the interrupts DISABLED for now. If you change more than one thing at any given time you don't know what has worked and what has not. Did the code modification work and the interrupts screw us up for example?

If the code in the status and con in/out entry points polls the SIO, then you should be able to communicate with CP/M - but only if they work...

If you have moved the data items from DSEG to CSEG, then the code trace you have produced has not followed the code change - (e.g. 'setdma: 0B00' vs 'read dma: 19FE').

In fact, if you look at the trace you will see it trying to 'setdma:' for 'sensible numbers' but the 'read dma:' is always 19FE (implying it is loading all of the sector information for the CCP into 19FE and not the correct location).

Did it 'build' correctly? i.e. are you looking for errors in the assembly and link process? If not - and an error occurred in the assembly - you may well be linking with the old object file...

Dave
 
Hang on - updated log follows. It's possible I forgot to generate a new CPM3.SYS with the updated BIOS last time. :rolleyes:

This time around, things ARE different. The cluster of selmem statements at the end almost hide the fact that the A> prompt is shown. It's responding to input, as well, but not in the way you'd like. If I press ENTER, it displays another couple of selmems and then erases most of them. Pressing further keys causes corruption, like below:

Code:
selmem called. curBank=00 A=01
selmem called. curBank=01 A=00A
selmem called. curBank=00 A=01
selmem called. curBank=01 A=00>
▒▒▒m2▒▒▒▒▒                                                                     ▒
   ▒▒▒^F▒5▒▒▒^]▒▒▒▒▒*(▒~▒▒o▒#"(▒▒▒M▒▒^W�▒▒*(▒~▒▒`▒▒▒▒^]▒▒▒U▒▒▒o▒▒▒j▒*(▒~#"(▒Ñ▒!*▒~6^@▒▒s▒!+▒6^@▒▒▒▒:+▒▒�▒x▒o▒ͳ▒*&▒~▒2+▒▒o▒#"&▒!+▒6^W▒▒M▒▒^A▒Ō:▒▒W:▒▒▒▒▒2▒▒x▒▒^K▒^E▒ͺ▒▒*(▒+"(▒^Zw▒▒^K▒▒^B▒^K▒:▒▒▒▒܌>^W2*▒2▒▒▒:▒▒*(▒^D^E:▒▒▒▒▒+^Zw^[▒▒"(▒▒▒ͺ▒:▒▒G:▒h▒3▒3~^▒͉

Here's the full log, without any key presses at the prompt at the end:

Code:
CP/M Plus Copyright 1982 (c) by Digital Research

ld_ccp executing...
selmem called. curBank=00 A=01
Bank 1 selected...
selmem called. curBank=01 A=00
seldsk called...
settrk: 0000
settrk: 0001
sectrn: 0000
setsec: 0000
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0001
setsec: 0001
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0002
setsec: 0002
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0003
setsec: 0003
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0004
setsec: 0004
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0005
setsec: 0005
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0006
setsec: 0006
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0007
setsec: 0007
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0008
setsec: 0008
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0009
setsec: 0009
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000A
setsec: 000A
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000B
setsec: 000B
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000C
setsec: 000C
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000D
setsec: 000D
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000E
setsec: 000E
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000F
setsec: 000F
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0010
setsec: 0010
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0011
setsec: 0011
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0012
setsec: 0012
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0013
setsec: 0013
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0014
setsec: 0014
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0015
setsec: 0015
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0016
setsec: 0016
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0017
setsec: 0017
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0018
setsec: 0018
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0019
setsec: 0019
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001A
setsec: 001A
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001B
setsec: 001B
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001C
setsec: 001C
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001D
setsec: 001D
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001E
setsec: 001E
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 001F
setsec: 001F
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0000
settrk: 0001
sectrn: 0000
setsec: 0000
setdma: BB50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0001
setsec: 0001
setdma: BB50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0002
setsec: 0002
setdma: BB50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0003
setsec: 0003
setdma: BB50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0004
setsec: 0004
setdma: BB50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0005
setsec: 0005
setdma: BB50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0006
setsec: 0006
setdma: BB50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0007
setsec: 0007
setdma: BB50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0008
setsec: 0008
setdma: BB50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0009
setsec: 0009
setdma: BB50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BB50
selmem called. curBank=00 A=00
read completed, erflag=00

selmem called. curBank=00 A=01
First bdose call completed...
Second bdose call completed...
selmem called. curBank=01 A=00
selmem called. curBank=00 A=01
Third bdose call completed...
selmem called. curBank=01 A=00
settrk: 000E
sectrn: 0000
setsec: 0000
setdma: 0100
setbnk: 00
setbnk: 01
read called... dmaBank=01
selmem called. curBank=00 A=01
read dma: 0100
selmem called. curBank=01 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0001
setsec: 0001
setdma: 0300
setbnk: 00
setbnk: 01
read called... dmaBank=01
selmem called. curBank=00 A=01
read dma: 0300
selmem called. curBank=01 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0002
setsec: 0002
setdma: 0500
setbnk: 00
setbnk: 01
read called... dmaBank=01
selmem called. curBank=00 A=01
read dma: 0500
selmem called. curBank=01 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0003
setsec: 0003
setdma: 0700
setbnk: 00
setbnk: 01
read called... dmaBank=01
selmem called. curBank=00 A=01
read dma: 0700
selmem called. curBank=01 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0004
setsec: 0004
setdma: 0900
setbnk: 00
setbnk: 01
read called... dmaBank=01
selmem called. curBank=00 A=01
read dma: 0900
selmem called. curBank=01 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0005
setsec: 0005
setdma: 0B00
setbnk: 00
setbnk: 01
read called... dmaBank=01
selmem called. curBank=00 A=01
read dma: 0B00
selmem called. curBank=01 A=00
read completed, erflag=00

settrk: 000E
sectrn: 0006
setsec: 0006
setdma: FD0F
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: FD0F
selmem called. curBank=00 A=00
read completed, erflag=00

selmem called. curBank=00 A=01
selmem called. curBank=01 A=00
selmem called. curBank=00 A=01
Fourth bdose call (BDOS 20), A=01
HL = 1901
CCP loaded...

selmem called. curBank=01 A=00
selmem called. curBank=00 A=01
selmem called. curBank=01 A=00
selmem called. curBank=00 A=01
selmem called. curBank=01 A=00
selmem called. curBank=00 A=01
selmem called. curBank=01 A=00
selmem called. curBank=00 A=01
selmem called. curBank=01 A=00
settrk: 0000
settrk: 0001
sectrn: 0000
setsec: 0000
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0001
setsec: 0001
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0002
setsec: 0002
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0003
setsec: 0003
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0004
setsec: 0004
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0005
setsec: 0005
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0006
setsec: 0006
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0007
setsec: 0007
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0008
setsec: 0008
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 0009
setsec: 0009
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

settrk: 0001
sectrn: 000A
setsec: 000A
setdma: BD50
setbnk: 00
setbnk: 00
read called... dmaBank=00
selmem called. curBank=00 A=00
read dma: BD50
selmem called. curBank=00 A=00
read completed, erflag=00

selmem called. curBank=00 A=01
selmem called. curBank=01 A=00A
selmem called. curBank=00 A=01
selmem called. curBank=01 A=00>
selmem called. curBank=00 A=01
selmem called. curBank=01 A=00
 
Keep the interrupts DISABLED for now. If you change more than one thing at any given time you don't know what has worked and what has not. Did the code modification work and the interrupts screw us up for example?

I've disabled interrupts again and tried again - same log, but this time pressing keys at the end does nothing - system is 'frozen' (or just not checking for input.)

Did it 'build' correctly? i.e. are you looking for errors in the assembly and link process? If not - and an error occurred in the assembly - you may well be linking with the old object file...

Dave

Yeah, I was so keen to try the fix I forgot to run GENCPM...!!!
 
So, maybe some problem with the interrupt console. It probably would have been better to just use polled input from the start. something as tricky as interrupt-driven input should be an enhancement after the rest works.
 
So, maybe some problem with the interrupt console. It probably would have been better to just use polled input from the start. something as tricky as interrupt-driven input should be an enhancement after the rest works.

I think I'm a little confused about how to switch over from interrupt-driven input to polled input. Are there any examples I can work from?

EDIT: I'll remove most of the debug-prints too - seems these particular ones are no longer needed?
 
You're not far off now :) :) :)!

Yes, please follow the full build process every time checking for errors. You will find that you get to your end point quicker if you do rather than back-tracking!

You need to modify const: to see if the SIO has a receiver character ready and modify conin: to read that character from the SIO. Ignore everything to do with your interrupt buffers...

The output side (conost and conout) already appear to do the correct thing with the SIO anyhow.

Dave
 
Last edited:
You're not far off now :) :) :)!

Yes, please follow the full build process every time checking for errors. You will find that you get to your end point quicker if you do!

Dave

Sorry Dave - I was just excited to be making progress after the drive-wipe incident yesterday! :)

Okay, I've made an attempt to de-interruptify the CCP IO... still no life at the prompt, however. This is what I'm trying:

Code:
conin:
	CALL	const
	JR	Z,conin
	IN	A,(SIOA_D)
	RET

const:
	PUSH	HL
	; Check if there is a char in channel A
	SUB	A
	OUT 	(SIOA_C),A
	IN   	A,(SIOA_C)	; Status byte D2=TX Buff Empty, D0=RX char ready
	RRCA			; Rotates RX status into Carry Flag,
	JR	NC,nochars
	POP	HL
	LD	A,$FF
	RET
	
nochars:
	POP	HL
	XOR	A
	RET

EDIT: Just realised - the PUSH/POP HL's are leftovers from the interrupt-driven code. I'll remove them, but they shouldn't have affected how it works (and it's not working.)
 
Last edited:
I do see what I think is wrong with your interrupt console input code. "conin" pops HL at the end but never pushes it. Also, "const" pushes and pops HL but doesn't need to.
 
I do see what I think is wrong with your interrupt console input code. "conin" pops HL at the end but never pushes it. Also, "const" pushes and pops HL but doesn't need to.

I fixed the loitering POP HL from conin: before testing the code (it still doesn't work) - have spotted the unnecessary push/pops in const, but they balance out so shouldn't affect the functionality?

EDIT: Have removed extra push/pops - no change on functionality. Still freezes at the prompt.
 
Back
Top