
This whole PNUM setup is so you can investigate every possible instructions
OP code 0-255, often followed by an extension code byte 0-255,
written in binary so you can see their bits, (76-543-210 is the pattern)
followed by NOP filler bytes, so each instruction has enough filler bytes
that is doesn't eat up the next p### or it's EXTenstion code byte.

The .bat files are set up to find p### stuff at c:\DIS\PNUM\*.*
So you must have that directory setup, or rewrite the .bat files.

Copy PNUM.bat PNUMs.bat & PPNUM.bat to c:\ root dir or any dir in DOS path.
Then make a directory, enter it, and type
PNUM 216 2
a series of files will be created that will
assemble.bat	assembles p216.asm	rewrite it to find & use FASM.
ddis.bat	disassemble p216.com, assemble the p216.dis file as RR.asm
		and disassembles that to RR.DIS   Then compare .BATs
aFCC.bat	will FCC p216.com RR.com
aFCV.bat	will FCV p216.com RR.com
aFCVrr.bat	will FCV p216.dis RR.dis

Note, RR.asm is a copy of p216.dis Then assembled to RR.com & DIS makes RR.dis
so FCV can compare the two dis files, if they are the same. Then DIS.com
can create an .asm that assembles to the same code,
for all the p### instructions, & that is what you need in a disassembler.

If a.com file can be disassembled and
FASM re assembled to be the same as the original .com
you have atchieved your DIS.com goal, of creating a starting point that works,
they you can screw up everything except the backups,
while testing everything in TRIAL & ERROR mode.
AND that was what I wanted in a disassembler,
along with enough info on each line to understand & fix it.
Anything but stuck, is good.

It does get a bit complicated though.
I use STR.com to get all the p216 lines out of the mixed up file.dis
STRnot.com removes extra NOP statements.
The P###.asm needs more or less NOPs sometimes.
A work around is needed to do ESC= p015 code byte, OP code byte,
& EXTension byte, & other OPcodes like 386+ code has a DB 66h prefix = p102
STRPUT p###.asm new.asm 66 B 15,
will change	(DB ###,10101010b,144,144)
to		(DB 15, ###,10101010b,144,144)
so you can alter a pNUMs.bat file, to do ESC code or 386= 66h code, etc.
Get creative:  pnums _122 2
STRPUT p_122.asm px122.asm 95 15,

I don't expect others to get into this,
 but it is a way to discover every possible code combination there is,
 and THAT was required for me to move forward, else I was stuck.

Note, p###.asm files have the start of SET2 & SET3 altered
 to check for signed numbers.
 You may want to change the numbers back to ,144,144 type stuff ?

This p###.bat stuff just gets the bulk of the work done
 & you have to fix it the way you want it.

Names, RR, p###, etc are made to sit in alphebetical order in the directory.
Everything below p###.asm CAN BE DELETED to start all over again. 

QDD32.exe nDISasm.exe DISn.com qDIS.bat nDIS.bat FCV.com are the tools
 I often use to find code mistakes in my p###.asm DIS.com outFiles.

DBUG.bat	needs INSIGHT.com debugger downloaded.
DBUGTD.bat	needs Tasm Turbo Debugger TD.exe downloaded.
or just rewrite c:\DIS\PNUM\DBUG.bat to use your favorite debuggers.

PPNUM.BAT is the start of a 2 input incremented .asm
and PPnum#.asm 2-4 is all I have made so far.
PPNUM 015 001 4
will make the incremented .asm
015	= the ESC#	(ESCape the one byte OP code limit)
001	= the OP code#	(SMSW & LMSW)
4	= the NOP count



EOF
