DOS debug.exe and 16-bit I/O?

Hi all. I'm working on a custom ISA board, and want to use the MS-DOS "debug" command as one option to buzz it out. The debugger has an 'I', or input, mode where you tell it an address in I/O space and it reads a byte back to you.

And that works. Sort of. The custom board is all based around 16-bit I/O access. If i go to the address of interest + 1, i get the high byte of the data. But if i just go to the address of interest, all i get is FF.

Im guessing this is because this board has no latch, it just extends the bus into the instrumentation i'm working on. I have to do a 16-bit access to see the low byte of the word. The board works fine with the driver software that was written for it, so i know everything else works.

Shouldn't there be a way to put debug into 16-bit mode? I'm pretty sure the IN and OUT instructions have a 16-bit addressing mode. But everything ive seen about its I and O commands are for single bytes.

Now i know there's a less simple way to do it: use Debug to assemble a tiny program. But im trying to avoid this solution, or installing any third-party software. Part of the idea is the ability to tell a customer over the phone to just pull up a command prompt and read bytes back to me if they ever have a problem.

Reply to
Scuch
Loading thread data ...

Sounds like they didn't get the 8/16 bit circuitry right.

The I and O commands are a rather recent addition to Debug (was it MSDOS 5.0 or 6.0?), so be glad they are there at all. The more advanced SYMDEB doesn't have 16-bit I/O either.

Using only Debug, I don't think there is any easier than:

DEBUG a in ax,dx rdx 3f8 g101 q

Or you could prepare a response file:

--- read3f8.rsp --- a in ax,dx

rdx

3f8 g101 q
--
and let the customer type
debug < read3f8.rsp

Karl Olsen
Reply to
Karl Olsen

This may or may not help you but you can accomplish this kind of I/O with a PD Forth kernel. They usually have functions called PC! (port character store) and PC@ (port character @). They can be used interactively at the Forth command line or you can write the commands as a script and run the file over and over as needed.

PC! is literally no more code than POP an address into dx, POP a byte into AX and OUT with a return to the Forth interpreter.

There are similar words to access memory, fill memory blocks etc. It can be a very handy tool to test new silicon.

Try

formatting link

The most comprehensive DOS system is call FPC. The sysem is huge but all you really need is F.EXE (168K) to access the two I/O routines.

Might help with getting the new silicon working.

Post here or email me directly if you need more info.

Best of Luck

Brian Fox Western Union Canada brian dot fox at rogers dotcom

Reply to
Brian Fox

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.