Updated COMPAQ MS-DOS READMEs, along with a few PCx86 debugger improvements
This commit is contained in:
parent
010da30353
commit
3abd13e8ca
11 changed files with 1803 additions and 1656 deletions
|
|
@ -133,17 +133,45 @@ look at the code, using the PCjs Debugger to stop at the first instruction:
|
||||||
&0000:7C01 BCE701 MOV SP,01E7
|
&0000:7C01 BCE701 MOV SP,01E7
|
||||||
&0000:7C04 B8C007 MOV AX,07C0
|
&0000:7C04 B8C007 MOV AX,07C0
|
||||||
&0000:7C07 8ED0 MOV SS,AX
|
&0000:7C07 8ED0 MOV SS,AX
|
||||||
&0000:7C09 FB STI
|
&0000:7C09 FB STI
|
||||||
|
;
|
||||||
|
; At this point, the stack has been set to an unused region INSIDE the boot sector, because
|
||||||
|
; 07C0:01E7 is the same as 0000:7C00+01E7 or 0000:7DE7. This puts a fairly low limit on stack
|
||||||
|
; usage: as more stack is used, the COMPAQ copyright string will be trashed first, then boot
|
||||||
|
; sector data, then boot sector code.
|
||||||
|
;
|
||||||
|
; Curiously, the value 01E7 is also stored at 07C0:01E7. Also curious is the choice of an ODD
|
||||||
|
; address for the stack (although, for the 8088, this presumably didn't affect performance).
|
||||||
|
;
|
||||||
&0000:7C0A 8ED8 MOV DS,AX
|
&0000:7C0A 8ED8 MOV DS,AX
|
||||||
&0000:7C0C 8EC0 MOV ES,AX
|
&0000:7C0C 8EC0 MOV ES,AX
|
||||||
&0000:7C0E 33C0 XOR AX,AX
|
;
|
||||||
|
; All of DS:0, ES:0, and SS:0 now point to the beginning of the boot sector, as does CS:7C00.
|
||||||
|
;
|
||||||
|
&0000:7C0E 33C0 XOR AX,AX ; perform a disk reset
|
||||||
&0000:7C10 CD13 INT 13
|
&0000:7C10 CD13 INT 13
|
||||||
|
;
|
||||||
|
; Read 1 sector (the 4th sector, which is the first sector of the directory) into memory immediately
|
||||||
|
; above the boot sector (07C0:0200).
|
||||||
|
;
|
||||||
&0000:7C12 B80102 MOV AX,0201
|
&0000:7C12 B80102 MOV AX,0201
|
||||||
&0000:7C15 BB0002 MOV BX,0200
|
&0000:7C15 BB0002 MOV BX,0200
|
||||||
&0000:7C18 B90400 MOV CX,0004
|
&0000:7C18 B90400 MOV CX,0004
|
||||||
&0000:7C1B 33D2 XOR DX,DX
|
&0000:7C1B 33D2 XOR DX,DX
|
||||||
&0000:7C1D E88B00 CALL 7CAB
|
&0000:7C1D E88B00 CALL 7CAB ; call DISK_IO
|
||||||
&0000:7C20 EB1C JMP 7C3E
|
&0000:7C20 EB1C JMP 7C3E
|
||||||
|
;
|
||||||
|
; ERROR: print error message and start over.
|
||||||
|
;
|
||||||
|
; Setting DS:BX to 07C0:00DA references the same memory as CS:7CDA:
|
||||||
|
;
|
||||||
|
; >> db cs:7cda cs:7d22
|
||||||
|
; &0000:7CDA 0A 0D 4E 6F 6E 2D 53 79-73 74 65 6D 20 64 69 73 ..Non-System dis
|
||||||
|
; &0000:7CEA 6B 20 6F 72 20 64 69 73-6B 20 65 72 72 6F 72 0A k or disk error.
|
||||||
|
; &0000:7CFA 0D 52 65 70 6C 61 63 65-20 61 6E 64 20 73 74 72 .Replace and str
|
||||||
|
; &0000:7D0A 69 6B 65 20 61 6E 79 20-6B 65 79 20 77 68 65 6E ike any key when
|
||||||
|
; &0000:7D1A 20 72 65 61 64 79 0A 0D-24 ready..$
|
||||||
|
;
|
||||||
&0000:7C22 BBDA00 MOV BX,00DA
|
&0000:7C22 BBDA00 MOV BX,00DA
|
||||||
&0000:7C25 8A07 MOV AL,[BX]
|
&0000:7C25 8A07 MOV AL,[BX]
|
||||||
&0000:7C27 3C24 CMP AL,24
|
&0000:7C27 3C24 CMP AL,24
|
||||||
|
|
@ -157,25 +185,54 @@ look at the code, using the PCjs Debugger to stop at the first instruction:
|
||||||
&0000:7C35 EBEE JMP 7C25
|
&0000:7C35 EBEE JMP 7C25
|
||||||
&0000:7C37 33C0 XOR AX,AX
|
&0000:7C37 33C0 XOR AX,AX
|
||||||
&0000:7C39 CD16 INT 16
|
&0000:7C39 CD16 INT 16
|
||||||
&0000:7C3B EBC3 JMP 7C00
|
&0000:7C3B EBC3 JMP 7C00 ; start over
|
||||||
&0000:7C3D C3 RET
|
&0000:7C3D C3 RET ; unreachable RET?
|
||||||
|
|
||||||
&0000:7C3E FC CLD
|
&0000:7C3E FC CLD
|
||||||
&0000:7C3F 8BF3 MOV SI,BX
|
&0000:7C3F 8BF3 MOV SI,BX
|
||||||
&0000:7C41 BFC400 MOV DI,00C4
|
&0000:7C41 BFC400 MOV DI,00C4 ; ES:DI -> 7C0:C4 (aka 0:7CC4)
|
||||||
&0000:7C44 B90B00 MOV CX,000B
|
&0000:7C44 B90B00 MOV CX,000B
|
||||||
&0000:7C47 F3 REPZ
|
&0000:7C47 F3 REPZ
|
||||||
&0000:7C48 A6 CMPSB
|
&0000:7C48 A6 CMPSB
|
||||||
&0000:7C49 75D7 JNZ 7C22
|
&0000:7C49 75D7 JNZ 7C22 ; if first DIRENTRY was not "IOSYS.COM", jump to ERROR
|
||||||
&0000:7C4B 83C615 ADD SI,0015
|
&0000:7C4B 83C615 ADD SI,0015
|
||||||
&0000:7C4E B90B00 MOV CX,000B
|
&0000:7C4E B90B00 MOV CX,000B
|
||||||
&0000:7C51 F3 REPZ
|
&0000:7C51 F3 REPZ
|
||||||
&0000:7C52 A6 CMPSB
|
&0000:7C52 A6 CMPSB
|
||||||
&0000:7C53 75CD JNZ 7C22
|
&0000:7C53 75CD JNZ 7C22 ; if second DIRENTRY was not "IOSYS.COM", jump to ERROR
|
||||||
&0000:7C55 B80102 MOV AX,0201
|
&0000:7C55 B80102 MOV AX,0201
|
||||||
&0000:7C58 BB0002 MOV BX,0200
|
&0000:7C58 BB0002 MOV BX,0200
|
||||||
&0000:7C5B B90200 MOV CX,0002
|
&0000:7C5B B90200 MOV CX,0002
|
||||||
&0000:7C5E 33D2 XOR DX,DX
|
&0000:7C5E 33D2 XOR DX,DX
|
||||||
&0000:7C60 E84800 CALL 7CAB
|
&0000:7C60 E84800 CALL 7CAB ; call DISK_IO to read 1st FAT sector
|
||||||
|
;
|
||||||
|
; At this point, the directory sector is gone, and all this code did with it was verify the names of
|
||||||
|
; the first two entries. It did not examine or record their starting cluster numbers. And in the FAT
|
||||||
|
; sector just read, only one byte (the first byte) will be examined next: the media ID byte.
|
||||||
|
;
|
||||||
|
; Further reading will rely on on two hard-coded tables inside the boot sector: one table at DS:126 (CS:7D26)
|
||||||
|
; if the FAT media ID byte is 0xFE (160Kb diskette), or another table at DS:13C (CS:7D3C) if the FAT media ID
|
||||||
|
; byte is 0xFF (320Kb diskette). If the FAT media ID byte is neither, off to ERROR we go.
|
||||||
|
;
|
||||||
|
; Here's the table for the 160Kb diskette:
|
||||||
|
;
|
||||||
|
; >> dw cs:7d26 l11.
|
||||||
|
; &0000:7D26 0201 0008 0000 0208 0200 0101 0000 0208 ................
|
||||||
|
; &0000:7D36 1000 0201 0000 ......
|
||||||
|
;
|
||||||
|
; and here's the table for the 320Kb diskette:
|
||||||
|
;
|
||||||
|
; >> dw cs:7d3c l11.
|
||||||
|
; &0000:7D3C 0206 0003 0100 0208 0C00 0101 0000 0203 ................
|
||||||
|
; &0000:7D4C 1000 0101 0100 ......
|
||||||
|
;
|
||||||
|
; These tables are then followed by a DWORD jump address:
|
||||||
|
;
|
||||||
|
; >> dw cs:7d52 l2
|
||||||
|
; &0000:7D52 0000 0060 ..`.
|
||||||
|
;
|
||||||
|
; which means that the "JMP FAR [0152]" instruction will jump to 60:0 after the reads are complete.
|
||||||
|
;
|
||||||
&0000:7C63 8A27 MOV AH,[BX]
|
&0000:7C63 8A27 MOV AH,[BX]
|
||||||
&0000:7C65 80FCFE CMP AH,FE
|
&0000:7C65 80FCFE CMP AH,FE
|
||||||
&0000:7C68 BE2601 MOV SI,0126
|
&0000:7C68 BE2601 MOV SI,0126
|
||||||
|
|
@ -203,6 +260,9 @@ look at the code, using the PCjs Debugger to stop at the first instruction:
|
||||||
&0000:7CA1 8B5414 MOV DX,[SI+14]
|
&0000:7CA1 8B5414 MOV DX,[SI+14]
|
||||||
&0000:7CA4 E80400 CALL 7CAB
|
&0000:7CA4 E80400 CALL 7CAB
|
||||||
&0000:7CA7 FF2E5201 JMP FAR [0152]
|
&0000:7CA7 FF2E5201 JMP FAR [0152]
|
||||||
|
;
|
||||||
|
; DISK_IO: read AL sector(s) identified by the CHS values in CX:DX into ES:BX, using DI as a retry counter.
|
||||||
|
;
|
||||||
&0000:7CAB BF0500 MOV DI,0005
|
&0000:7CAB BF0500 MOV DI,0005
|
||||||
&0000:7CAE 57 PUSH DI
|
&0000:7CAE 57 PUSH DI
|
||||||
&0000:7CAF 50 PUSH AX
|
&0000:7CAF 50 PUSH AX
|
||||||
|
|
@ -216,9 +276,10 @@ look at the code, using the PCjs Debugger to stop at the first instruction:
|
||||||
&0000:7CBB 58 POP AX
|
&0000:7CBB 58 POP AX
|
||||||
&0000:7CBC 5F POP DI
|
&0000:7CBC 5F POP DI
|
||||||
&0000:7CBD 4F DEC DI
|
&0000:7CBD 4F DEC DI
|
||||||
&0000:7CBE 75EE JNZ 7CAE
|
&0000:7CBE 75EE JNZ 7CAE
|
||||||
&0000:7CC0 58 POP AX
|
&0000:7CC0 58 POP AX ; retry count exhausted
|
||||||
&0000:7CC1 E95EFF JMP 7C22
|
&0000:7CC1 E95EFF JMP 7C22 ; jump to PRINT function
|
||||||
|
|
||||||
>> db 7cc4 l13c
|
>> db 7cc4 l13c
|
||||||
&7CC4 49 4F 53 59 53 20 20 20-43 4F 4D 4D 53 44 4F 53 IOSYS COMMSDOS
|
&7CC4 49 4F 53 59 53 20 20 20-43 4F 4D 4D 53 44 4F 53 IOSYS COMMSDOS
|
||||||
&7CD4 20 20 20 43 4F 4D 0A 0D-4E 6F 6E 2D 53 79 73 74 COM..Non-Syst
|
&7CD4 20 20 20 43 4F 4D 0A 0D-4E 6F 6E 2D 53 79 73 74 COM..Non-Syst
|
||||||
|
|
@ -241,6 +302,10 @@ look at the code, using the PCjs Debugger to stop at the first instruction:
|
||||||
&7DE4 00 00 00 E7 01 00 00 00-00 00 00 00 00 00 00 00 ................
|
&7DE4 00 00 00 E7 01 00 00 00-00 00 00 00 00 00 00 00 ................
|
||||||
&7DF4 00 00 00 00 00 00 00 00-00 00 00 00
|
&7DF4 00 00 00 00 00 00 00 00-00 00 00 00
|
||||||
|
|
||||||
|
In terms of raw code (90 instructions), it's shorter than the PC-DOS 1.00 boot sector (99 instructions),
|
||||||
|
even though it supports twice as many disk formats. This is because it uses tables to describe both the
|
||||||
|
different disk formats *and* the discrete read operations, relieving the code from dealing with track boundaries.
|
||||||
|
|
||||||
### Mounting the COMPAQ MS-DOS 1.11 Diskette
|
### Mounting the COMPAQ MS-DOS 1.11 Diskette
|
||||||
|
|
||||||
Note that the disk cannot be mounted by a modern operating system (e.g., macOS), because it lacks a proper
|
Note that the disk cannot be mounted by a modern operating system (e.g., macOS), because it lacks a proper
|
||||||
|
|
@ -279,11 +344,15 @@ converts the modified JSON back into an IMG file.
|
||||||
diskdump --disk=COMPAQ-DOS111.img --format=json --forceBPB --output=COMPAQ-DOS111-BPB.json
|
diskdump --disk=COMPAQ-DOS111.img --format=json --forceBPB --output=COMPAQ-DOS111-BPB.json
|
||||||
warning: BPB has been updated
|
warning: BPB has been updated
|
||||||
327680-byte disk image saved to COMPAQ-DOS111-BPB.json
|
327680-byte disk image saved to COMPAQ-DOS111-BPB.json
|
||||||
|
|
||||||
diskdump --disk=COMPAQ-DOS111-BPB.json --format=img --output=COMPAQ-DOS111-BPB.img
|
diskdump --disk=COMPAQ-DOS111-BPB.json --format=img --output=COMPAQ-DOS111-BPB.img
|
||||||
327680-byte disk image saved to COMPAQ-DOS111-BPB.img
|
327680-byte disk image saved to COMPAQ-DOS111-BPB.img
|
||||||
|
|
||||||
|
The next series of commands make the image read-only (otherwise, macOS may create hidden files inside the image after
|
||||||
|
mounting it), mount the image as `/Volumes/Untitled`, and then copy the contents of the image to a folder named `Disk`:
|
||||||
|
|
||||||
chmod -w COMPAQ-DOS111-BPB.img
|
chmod -w COMPAQ-DOS111-BPB.img
|
||||||
open COMPAQ-DOS111-BPB.img
|
open COMPAQ-DOS111-BPB.img
|
||||||
mkdir COMPAQ-DOS111
|
cp -pr /Volumes/Untitled Disk
|
||||||
cp -pr /Volumes/Untitled/ COMPAQ-DOS111
|
|
||||||
|
|
||||||
[Return to [COMPAQ MS-DOS Disks](/disks/pcx86/dos/compaq/)]
|
[Return to [COMPAQ MS-DOS Disks](/disks/pcx86/dos/compaq/)]
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ because it includes lots of commentary, allowing the boot sector to more or less
|
||||||
pop ax ; remaining sectors
|
pop ax ; remaining sectors
|
||||||
call add_si_sectors ; bx += si*512
|
call add_si_sectors ; bx += si*512
|
||||||
sub ax, si ; remaining -= read
|
sub ax, si ; remaining -= read
|
||||||
jz done ; none left
|
jz done ; none left
|
||||||
inc ch ; next track
|
inc ch ; next track
|
||||||
mov cl, 1 ; start at sector 1
|
mov cl, 1 ; start at sector 1
|
||||||
mov si, 8 ; read up to 8 sectors
|
mov si, 8 ; read up to 8 sectors
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1071,7 +1071,7 @@ class Bus extends Component {
|
||||||
}
|
}
|
||||||
if (!fSymbol || fNearest) {
|
if (!fSymbol || fNearest) {
|
||||||
if (bto.obj.idComponent) {
|
if (bto.obj.idComponent) {
|
||||||
return bto.obj.idComponent + '+' + Str.toHexLong(bto.off + off);
|
return bto.obj.idComponent + '+' + Str.toHex(bto.off + off, 0, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -166,9 +166,9 @@ class DebuggerX86 extends Debugger {
|
||||||
* Finally, for TEMPORARY breakpoint addresses, we set fTempBreak to true, so that they can be
|
* Finally, for TEMPORARY breakpoint addresses, we set fTempBreak to true, so that they can be
|
||||||
* automatically cleared when they're hit.
|
* automatically cleared when they're hit.
|
||||||
*/
|
*/
|
||||||
this.dbgAddrNextCode = this.newAddr();
|
this.dbgAddrNextCode = this.newAddr(0, 0);
|
||||||
this.dbgAddrNextData = this.newAddr();
|
this.dbgAddrNextData = this.newAddr(0, 0);
|
||||||
this.dbgAddrAssemble = this.newAddr();
|
this.dbgAddrAssemble = this.newAddr(0, 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* aSymbolTable is an array of SymbolTable objects, one per ROM or other chunk of address space,
|
* aSymbolTable is an array of SymbolTable objects, one per ROM or other chunk of address space,
|
||||||
|
|
@ -1943,7 +1943,7 @@ class DebuggerX86 extends Debugger {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dumpHistory(sPrev, sLines)
|
* dumpHistory(sPrev, sLines, sComment)
|
||||||
*
|
*
|
||||||
* If sLines is not a number, it can be a instruction filter. However, for the moment, the only
|
* If sLines is not a number, it can be a instruction filter. However, for the moment, the only
|
||||||
* supported filter is "call", which filters the history buffer for all CALL and RET instructions
|
* supported filter is "call", which filters the history buffer for all CALL and RET instructions
|
||||||
|
|
@ -1952,8 +1952,9 @@ class DebuggerX86 extends Debugger {
|
||||||
* @this {DebuggerX86}
|
* @this {DebuggerX86}
|
||||||
* @param {string} [sPrev] is a (decimal) number of instructions to rewind to (default is 10)
|
* @param {string} [sPrev] is a (decimal) number of instructions to rewind to (default is 10)
|
||||||
* @param {string} [sLines] is a (decimal) number of instructions to print (default is, again, 10)
|
* @param {string} [sLines] is a (decimal) number of instructions to print (default is, again, 10)
|
||||||
|
* @param {string} [sComment] (should be either "history" or "cycles"; default is "history")
|
||||||
*/
|
*/
|
||||||
dumpHistory(sPrev, sLines)
|
dumpHistory(sPrev, sLines, sComment = "history")
|
||||||
{
|
{
|
||||||
var sMore = "";
|
var sMore = "";
|
||||||
var cHistory = 0;
|
var cHistory = 0;
|
||||||
|
|
@ -2021,10 +2022,8 @@ class DebuggerX86 extends Debugger {
|
||||||
*/
|
*/
|
||||||
var dbgAddrNew = this.newAddr(dbgAddr.off, dbgAddr.sel, dbgAddr.addr, dbgAddr.type, dbgAddr.fData32, dbgAddr.fAddr32);
|
var dbgAddrNew = this.newAddr(dbgAddr.off, dbgAddr.sel, dbgAddr.addr, dbgAddr.type, dbgAddr.fData32, dbgAddr.fAddr32);
|
||||||
|
|
||||||
var sComment = "history";
|
|
||||||
var nSequence = nPrev--;
|
var nSequence = nPrev--;
|
||||||
if (DEBUG && dbgAddr.cycleCount != null) {
|
if (dbgAddr.cycleCount != null && sComment == "cycles") {
|
||||||
sComment = "cycles";
|
|
||||||
nSequence = dbgAddr.cycleCount;
|
nSequence = dbgAddr.cycleCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2894,9 +2893,11 @@ class DebuggerX86 extends Debugger {
|
||||||
{
|
{
|
||||||
var state = new State(this);
|
var state = new State(this);
|
||||||
state.set(0, this.packAddr(this.dbgAddrNextCode));
|
state.set(0, this.packAddr(this.dbgAddrNextCode));
|
||||||
state.set(1, this.packAddr(this.dbgAddrAssemble));
|
state.set(1, this.packAddr(this.dbgAddrNextData));
|
||||||
state.set(2, [this.aPrevCmds, this.fAssemble, this.bitsMessage]);
|
state.set(2, this.packAddr(this.dbgAddrAssemble));
|
||||||
state.set(3, this.aSymbolTable);
|
state.set(3, [this.aPrevCmds, this.fAssemble, this.bitsMessage]);
|
||||||
|
state.set(4, this.aSymbolTable);
|
||||||
|
state.set(5, [this.aBreakExec, this.aBreakRead, this.aBreakWrite]);
|
||||||
return state.data();
|
return state.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2912,15 +2913,27 @@ class DebuggerX86 extends Debugger {
|
||||||
restore(data)
|
restore(data)
|
||||||
{
|
{
|
||||||
var i = 0;
|
var i = 0;
|
||||||
if (data[2] !== undefined) {
|
if (data[i]) this.dbgAddrNextCode = this.unpackAddr(data[i++]);
|
||||||
this.dbgAddrNextCode = this.unpackAddr(data[i++]);
|
/*
|
||||||
this.dbgAddrAssemble = this.unpackAddr(data[i++]);
|
* dbgAddrNextData wasn't saved until there were at least 6 elements, hence the check for data[5] instead of data[i]
|
||||||
|
*/
|
||||||
|
if (data[5]) this.dbgAddrNextData = this.unpackAddr(data[i++]);
|
||||||
|
if (data[i]) this.dbgAddrAssemble = this.unpackAddr(data[i++]);
|
||||||
|
if (data[i]) {
|
||||||
this.aPrevCmds = data[i][0];
|
this.aPrevCmds = data[i][0];
|
||||||
if (typeof this.aPrevCmds == "string") this.aPrevCmds = [this.aPrevCmds];
|
if (typeof this.aPrevCmds == "string") this.aPrevCmds = [this.aPrevCmds];
|
||||||
this.fAssemble = data[i][1];
|
this.fAssemble = data[i][1];
|
||||||
this.bitsMessage |= data[i][2]; // keep our current message bits set, and simply "add" any extra bits defined by the saved state
|
this.bitsMessage |= data[i][2]; // keep our current message bits set, and simply "add" any extra bits defined by the saved state
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if (data[i]) {
|
||||||
|
this.aSymbolTable = data[i++];
|
||||||
|
}
|
||||||
|
if (data[i]) {
|
||||||
|
this.restoreBreakpoints(this.aBreakExec, data[i][0]);
|
||||||
|
this.restoreBreakpoints(this.aBreakRead, data[i][1]);
|
||||||
|
this.restoreBreakpoints(this.aBreakWrite, data[i][2]);
|
||||||
}
|
}
|
||||||
if (data[3]) this.aSymbolTable = data[3];
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3077,7 +3090,7 @@ class DebuggerX86 extends Debugger {
|
||||||
this.aaOpcodeCounts[bOpcode][1]++;
|
this.aaOpcodeCounts[bOpcode][1]++;
|
||||||
var dbgAddr = this.aOpcodeHistory[this.iOpcodeHistory];
|
var dbgAddr = this.aOpcodeHistory[this.iOpcodeHistory];
|
||||||
this.setAddr(dbgAddr, cpu.getIP(), cpu.getCS());
|
this.setAddr(dbgAddr, cpu.getIP(), cpu.getCS());
|
||||||
if (DEBUG) dbgAddr.cycleCount = cpu.getCycles();
|
dbgAddr.cycleCount = cpu.getCycles();
|
||||||
if (++this.iOpcodeHistory == this.aOpcodeHistory.length) this.iOpcodeHistory = 0;
|
if (++this.iOpcodeHistory == this.aOpcodeHistory.length) this.iOpcodeHistory = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3208,7 +3221,7 @@ class DebuggerX86 extends Debugger {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* addBreakpoint(aBreak, dbgAddr, fTempBreak)
|
* addBreakpoint(aBreak, dbgAddr, fTempBreak, fQuiet)
|
||||||
*
|
*
|
||||||
* In case you haven't already figured this out, all our breakpoint commands use the address
|
* In case you haven't already figured this out, all our breakpoint commands use the address
|
||||||
* to identify a breakpoint, not an incrementally assigned breakpoint index like other debuggers;
|
* to identify a breakpoint, not an incrementally assigned breakpoint index like other debuggers;
|
||||||
|
|
@ -3232,9 +3245,10 @@ class DebuggerX86 extends Debugger {
|
||||||
* @param {Array} aBreak
|
* @param {Array} aBreak
|
||||||
* @param {DbgAddrX86} dbgAddr
|
* @param {DbgAddrX86} dbgAddr
|
||||||
* @param {boolean} [fTempBreak]
|
* @param {boolean} [fTempBreak]
|
||||||
|
* @param {boolean} [fQuiet]
|
||||||
* @return {boolean} true if breakpoint added, false if already exists
|
* @return {boolean} true if breakpoint added, false if already exists
|
||||||
*/
|
*/
|
||||||
addBreakpoint(aBreak, dbgAddr, fTempBreak)
|
addBreakpoint(aBreak, dbgAddr, fTempBreak, fQuiet)
|
||||||
{
|
{
|
||||||
var fSuccess = true;
|
var fSuccess = true;
|
||||||
|
|
||||||
|
|
@ -3276,7 +3290,7 @@ class DebuggerX86 extends Debugger {
|
||||||
dbgAddr.fTempBreak = true;
|
dbgAddr.fTempBreak = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.printBreakpoint(aBreak, aBreak.length-1, "set");
|
if (!fQuiet) this.printBreakpoint(aBreak, aBreak.length-1, "set");
|
||||||
this.historyInit();
|
this.historyInit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3363,6 +3377,22 @@ class DebuggerX86 extends Debugger {
|
||||||
this.println(aBreak[0] + ' ' + this.toHexAddr(dbgAddr) + (sAction? (' ' + sAction) : (dbgAddr.sCmd? (' "' + dbgAddr.sCmd + '"') : '')));
|
this.println(aBreak[0] + ' ' + this.toHexAddr(dbgAddr) + (sAction? (' ' + sAction) : (dbgAddr.sCmd? (' "' + dbgAddr.sCmd + '"') : '')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* restoreBreakpoints(aBreak, aDbgAddr)
|
||||||
|
*
|
||||||
|
* @this {DebuggerX86}
|
||||||
|
* @param {Array} aBreak
|
||||||
|
* @param {Array} aDbgAddr
|
||||||
|
*/
|
||||||
|
restoreBreakpoints(aBreak, aDbgAddr)
|
||||||
|
{
|
||||||
|
if (aDbgAddr[0] != aBreak[0]) return;
|
||||||
|
for (var i = 1; i < aDbgAddr.length; i++) {
|
||||||
|
var dbgAddr = aDbgAddr[i];
|
||||||
|
this.addBreakpoint(aBreak, dbgAddr, dbgAddr.fTempBreak, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setTempBreakpoint(dbgAddr)
|
* setTempBreakpoint(dbgAddr)
|
||||||
*
|
*
|
||||||
|
|
@ -4761,9 +4791,8 @@ class DebuggerX86 extends Debugger {
|
||||||
/**
|
/**
|
||||||
* doDump(asArgs)
|
* doDump(asArgs)
|
||||||
*
|
*
|
||||||
* The length parameter is interpreted as a number of bytes (in hex, by default).
|
* For memory dumps, the second parameter (sLen) is interpreted as a length (by default, in hex)
|
||||||
* If the length is omitted/undefined, it defaults to 0x80 (128.) bytes, which normally
|
* only if it contains an 'l' prefix; otherwise it's interpreted as an ending address (inclusive).
|
||||||
* translates to 8 lines of data.
|
|
||||||
*
|
*
|
||||||
* @this {DebuggerX86}
|
* @this {DebuggerX86}
|
||||||
* @param {Array.<string>} asArgs (formerly sCmd, [sAddr], [sLen] and [sBytes])
|
* @param {Array.<string>} asArgs (formerly sCmd, [sAddr], [sLen] and [sBytes])
|
||||||
|
|
@ -4878,12 +4907,10 @@ class DebuggerX86 extends Debugger {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!sAddr) sCmd = this.sCmdDumpPrev || "db";
|
if (!sAddr) sCmd = this.sCmdDumpPrev || "db";
|
||||||
} else {
|
|
||||||
this.sCmdDumpPrev = sCmd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sCmd == "dh") {
|
if (sCmd == "dh") {
|
||||||
this.dumpHistory(sAddr, sLen);
|
this.dumpHistory(sAddr, sLen, sBytes);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4900,16 +4927,27 @@ class DebuggerX86 extends Debugger {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sCmd[1] && "bwd".indexOf(sCmd[1]) < 0) {
|
||||||
|
this.println("unrecognized dump command");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sCmdDumpPrev = sCmd;
|
||||||
|
|
||||||
var dbgAddr = this.parseAddr(sAddr);
|
var dbgAddr = this.parseAddr(sAddr);
|
||||||
if (!dbgAddr || dbgAddr.sel == null && dbgAddr.addr == null) return;
|
if (!dbgAddr || dbgAddr.sel == null && dbgAddr.addr == null) return;
|
||||||
|
|
||||||
var len = 0; // 0 is not a default; it triggers the appropriate default below
|
var len = 0;
|
||||||
if (sLen) {
|
if (sLen) {
|
||||||
if (sLen.charAt(0) == 'l') {
|
if (sLen.charAt(0) == 'l') {
|
||||||
sLen = sLen.substr(1) || sBytes;
|
sLen = sLen.substr(1) || sBytes;
|
||||||
|
len = this.parseValue(sLen);
|
||||||
|
} else {
|
||||||
|
var dbgAddrEnd = this.parseAddr(sLen);
|
||||||
|
if (!dbgAddrEnd) return;
|
||||||
|
len = dbgAddrEnd.off - dbgAddr.off + 1;
|
||||||
}
|
}
|
||||||
len = this.parseValue(sLen) >>> 0; // negative lengths not allowed
|
if (len < 0 || len > 0x10000) len = 0;
|
||||||
if (len > 0x10000) len = 0x10000; // prevent bad user (or variable) input from producing excessive output
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var sDump = "";
|
var sDump = "";
|
||||||
|
|
@ -4938,7 +4976,7 @@ class DebuggerX86 extends Debugger {
|
||||||
cb--;
|
cb--;
|
||||||
}
|
}
|
||||||
if (sDump) sDump += '\n';
|
if (sDump) sDump += '\n';
|
||||||
sDump += sAddr + " " + sData + ((i == 0)? (' ' + sChars) : "");
|
sDump += sAddr + " " + sData + Str.pad(sChars, sChars.length + i * 3 + 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sDump) this.println(sDump);
|
if (sDump) this.println(sDump);
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ DiskAPI.GEOMETRIES = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Media descriptor bytes for DOS-compatible FAT-formatted disks (stored in the first byte of the FAT)
|
* Media ID (descriptor) bytes for DOS-compatible FAT-formatted disks (stored in the first byte of the FAT)
|
||||||
*/
|
*/
|
||||||
DiskAPI.FAT = {
|
DiskAPI.FAT = {
|
||||||
MEDIA_160KB: 0xFE, // 5.25-inch, 1-sided, 8-sector, 40-track
|
MEDIA_160KB: 0xFE, // 5.25-inch, 1-sided, 8-sector, 40-track
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
|
@ -246,7 +246,7 @@ DiskAPI.GEOMETRIES = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Media descriptor bytes for DOS-compatible FAT-formatted disks (stored in the first byte of the FAT)
|
* Media ID (descriptor) bytes for DOS-compatible FAT-formatted disks (stored in the first byte of the FAT)
|
||||||
*/
|
*/
|
||||||
DiskAPI.FAT = {
|
DiskAPI.FAT = {
|
||||||
MEDIA_160KB: 0xFE, // 5.25-inch, 1-sided, 8-sector, 40-track
|
MEDIA_160KB: 0xFE, // 5.25-inch, 1-sided, 8-sector, 40-track
|
||||||
|
|
@ -9319,7 +9319,7 @@ class Bus extends Component {
|
||||||
}
|
}
|
||||||
if (!fSymbol || fNearest) {
|
if (!fSymbol || fNearest) {
|
||||||
if (bto.obj.idComponent) {
|
if (bto.obj.idComponent) {
|
||||||
return bto.obj.idComponent + '+' + Str.toHexLong(bto.off + off);
|
return bto.obj.idComponent + '+' + Str.toHex(bto.off + off, 0, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -66361,9 +66361,9 @@ class DebuggerX86 extends Debugger {
|
||||||
* Finally, for TEMPORARY breakpoint addresses, we set fTempBreak to true, so that they can be
|
* Finally, for TEMPORARY breakpoint addresses, we set fTempBreak to true, so that they can be
|
||||||
* automatically cleared when they're hit.
|
* automatically cleared when they're hit.
|
||||||
*/
|
*/
|
||||||
this.dbgAddrNextCode = this.newAddr();
|
this.dbgAddrNextCode = this.newAddr(0, 0);
|
||||||
this.dbgAddrNextData = this.newAddr();
|
this.dbgAddrNextData = this.newAddr(0, 0);
|
||||||
this.dbgAddrAssemble = this.newAddr();
|
this.dbgAddrAssemble = this.newAddr(0, 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* aSymbolTable is an array of SymbolTable objects, one per ROM or other chunk of address space,
|
* aSymbolTable is an array of SymbolTable objects, one per ROM or other chunk of address space,
|
||||||
|
|
@ -68138,7 +68138,7 @@ class DebuggerX86 extends Debugger {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dumpHistory(sPrev, sLines)
|
* dumpHistory(sPrev, sLines, sComment)
|
||||||
*
|
*
|
||||||
* If sLines is not a number, it can be a instruction filter. However, for the moment, the only
|
* If sLines is not a number, it can be a instruction filter. However, for the moment, the only
|
||||||
* supported filter is "call", which filters the history buffer for all CALL and RET instructions
|
* supported filter is "call", which filters the history buffer for all CALL and RET instructions
|
||||||
|
|
@ -68147,8 +68147,9 @@ class DebuggerX86 extends Debugger {
|
||||||
* @this {DebuggerX86}
|
* @this {DebuggerX86}
|
||||||
* @param {string} [sPrev] is a (decimal) number of instructions to rewind to (default is 10)
|
* @param {string} [sPrev] is a (decimal) number of instructions to rewind to (default is 10)
|
||||||
* @param {string} [sLines] is a (decimal) number of instructions to print (default is, again, 10)
|
* @param {string} [sLines] is a (decimal) number of instructions to print (default is, again, 10)
|
||||||
|
* @param {string} [sComment] (should be either "history" or "cycles"; default is "history")
|
||||||
*/
|
*/
|
||||||
dumpHistory(sPrev, sLines)
|
dumpHistory(sPrev, sLines, sComment = "history")
|
||||||
{
|
{
|
||||||
var sMore = "";
|
var sMore = "";
|
||||||
var cHistory = 0;
|
var cHistory = 0;
|
||||||
|
|
@ -68216,10 +68217,8 @@ class DebuggerX86 extends Debugger {
|
||||||
*/
|
*/
|
||||||
var dbgAddrNew = this.newAddr(dbgAddr.off, dbgAddr.sel, dbgAddr.addr, dbgAddr.type, dbgAddr.fData32, dbgAddr.fAddr32);
|
var dbgAddrNew = this.newAddr(dbgAddr.off, dbgAddr.sel, dbgAddr.addr, dbgAddr.type, dbgAddr.fData32, dbgAddr.fAddr32);
|
||||||
|
|
||||||
var sComment = "history";
|
|
||||||
var nSequence = nPrev--;
|
var nSequence = nPrev--;
|
||||||
if (DEBUG && dbgAddr.cycleCount != null) {
|
if (dbgAddr.cycleCount != null && sComment == "cycles") {
|
||||||
sComment = "cycles";
|
|
||||||
nSequence = dbgAddr.cycleCount;
|
nSequence = dbgAddr.cycleCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -69089,9 +69088,11 @@ class DebuggerX86 extends Debugger {
|
||||||
{
|
{
|
||||||
var state = new State(this);
|
var state = new State(this);
|
||||||
state.set(0, this.packAddr(this.dbgAddrNextCode));
|
state.set(0, this.packAddr(this.dbgAddrNextCode));
|
||||||
state.set(1, this.packAddr(this.dbgAddrAssemble));
|
state.set(1, this.packAddr(this.dbgAddrNextData));
|
||||||
state.set(2, [this.aPrevCmds, this.fAssemble, this.bitsMessage]);
|
state.set(2, this.packAddr(this.dbgAddrAssemble));
|
||||||
state.set(3, this.aSymbolTable);
|
state.set(3, [this.aPrevCmds, this.fAssemble, this.bitsMessage]);
|
||||||
|
state.set(4, this.aSymbolTable);
|
||||||
|
state.set(5, [this.aBreakExec, this.aBreakRead, this.aBreakWrite]);
|
||||||
return state.data();
|
return state.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -69107,15 +69108,27 @@ class DebuggerX86 extends Debugger {
|
||||||
restore(data)
|
restore(data)
|
||||||
{
|
{
|
||||||
var i = 0;
|
var i = 0;
|
||||||
if (data[2] !== undefined) {
|
if (data[i]) this.dbgAddrNextCode = this.unpackAddr(data[i++]);
|
||||||
this.dbgAddrNextCode = this.unpackAddr(data[i++]);
|
/*
|
||||||
this.dbgAddrAssemble = this.unpackAddr(data[i++]);
|
* dbgAddrNextData wasn't saved until there were at least 6 elements, hence the check for data[5] instead of data[i]
|
||||||
|
*/
|
||||||
|
if (data[5]) this.dbgAddrNextData = this.unpackAddr(data[i++]);
|
||||||
|
if (data[i]) this.dbgAddrAssemble = this.unpackAddr(data[i++]);
|
||||||
|
if (data[i]) {
|
||||||
this.aPrevCmds = data[i][0];
|
this.aPrevCmds = data[i][0];
|
||||||
if (typeof this.aPrevCmds == "string") this.aPrevCmds = [this.aPrevCmds];
|
if (typeof this.aPrevCmds == "string") this.aPrevCmds = [this.aPrevCmds];
|
||||||
this.fAssemble = data[i][1];
|
this.fAssemble = data[i][1];
|
||||||
this.bitsMessage |= data[i][2]; // keep our current message bits set, and simply "add" any extra bits defined by the saved state
|
this.bitsMessage |= data[i][2]; // keep our current message bits set, and simply "add" any extra bits defined by the saved state
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if (data[i]) {
|
||||||
|
this.aSymbolTable = data[i++];
|
||||||
|
}
|
||||||
|
if (data[i]) {
|
||||||
|
this.restoreBreakpoints(this.aBreakExec, data[i][0]);
|
||||||
|
this.restoreBreakpoints(this.aBreakRead, data[i][1]);
|
||||||
|
this.restoreBreakpoints(this.aBreakWrite, data[i][2]);
|
||||||
}
|
}
|
||||||
if (data[3]) this.aSymbolTable = data[3];
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -69272,7 +69285,7 @@ class DebuggerX86 extends Debugger {
|
||||||
this.aaOpcodeCounts[bOpcode][1]++;
|
this.aaOpcodeCounts[bOpcode][1]++;
|
||||||
var dbgAddr = this.aOpcodeHistory[this.iOpcodeHistory];
|
var dbgAddr = this.aOpcodeHistory[this.iOpcodeHistory];
|
||||||
this.setAddr(dbgAddr, cpu.getIP(), cpu.getCS());
|
this.setAddr(dbgAddr, cpu.getIP(), cpu.getCS());
|
||||||
if (DEBUG) dbgAddr.cycleCount = cpu.getCycles();
|
dbgAddr.cycleCount = cpu.getCycles();
|
||||||
if (++this.iOpcodeHistory == this.aOpcodeHistory.length) this.iOpcodeHistory = 0;
|
if (++this.iOpcodeHistory == this.aOpcodeHistory.length) this.iOpcodeHistory = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -69403,7 +69416,7 @@ class DebuggerX86 extends Debugger {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* addBreakpoint(aBreak, dbgAddr, fTempBreak)
|
* addBreakpoint(aBreak, dbgAddr, fTempBreak, fQuiet)
|
||||||
*
|
*
|
||||||
* In case you haven't already figured this out, all our breakpoint commands use the address
|
* In case you haven't already figured this out, all our breakpoint commands use the address
|
||||||
* to identify a breakpoint, not an incrementally assigned breakpoint index like other debuggers;
|
* to identify a breakpoint, not an incrementally assigned breakpoint index like other debuggers;
|
||||||
|
|
@ -69427,9 +69440,10 @@ class DebuggerX86 extends Debugger {
|
||||||
* @param {Array} aBreak
|
* @param {Array} aBreak
|
||||||
* @param {DbgAddrX86} dbgAddr
|
* @param {DbgAddrX86} dbgAddr
|
||||||
* @param {boolean} [fTempBreak]
|
* @param {boolean} [fTempBreak]
|
||||||
|
* @param {boolean} [fQuiet]
|
||||||
* @return {boolean} true if breakpoint added, false if already exists
|
* @return {boolean} true if breakpoint added, false if already exists
|
||||||
*/
|
*/
|
||||||
addBreakpoint(aBreak, dbgAddr, fTempBreak)
|
addBreakpoint(aBreak, dbgAddr, fTempBreak, fQuiet)
|
||||||
{
|
{
|
||||||
var fSuccess = true;
|
var fSuccess = true;
|
||||||
|
|
||||||
|
|
@ -69471,7 +69485,7 @@ class DebuggerX86 extends Debugger {
|
||||||
dbgAddr.fTempBreak = true;
|
dbgAddr.fTempBreak = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.printBreakpoint(aBreak, aBreak.length-1, "set");
|
if (!fQuiet) this.printBreakpoint(aBreak, aBreak.length-1, "set");
|
||||||
this.historyInit();
|
this.historyInit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -69558,6 +69572,22 @@ class DebuggerX86 extends Debugger {
|
||||||
this.println(aBreak[0] + ' ' + this.toHexAddr(dbgAddr) + (sAction? (' ' + sAction) : (dbgAddr.sCmd? (' "' + dbgAddr.sCmd + '"') : '')));
|
this.println(aBreak[0] + ' ' + this.toHexAddr(dbgAddr) + (sAction? (' ' + sAction) : (dbgAddr.sCmd? (' "' + dbgAddr.sCmd + '"') : '')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* restoreBreakpoints(aBreak, aDbgAddr)
|
||||||
|
*
|
||||||
|
* @this {DebuggerX86}
|
||||||
|
* @param {Array} aBreak
|
||||||
|
* @param {Array} aDbgAddr
|
||||||
|
*/
|
||||||
|
restoreBreakpoints(aBreak, aDbgAddr)
|
||||||
|
{
|
||||||
|
if (aDbgAddr[0] != aBreak[0]) return;
|
||||||
|
for (var i = 1; i < aDbgAddr.length; i++) {
|
||||||
|
var dbgAddr = aDbgAddr[i];
|
||||||
|
this.addBreakpoint(aBreak, dbgAddr, dbgAddr.fTempBreak, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setTempBreakpoint(dbgAddr)
|
* setTempBreakpoint(dbgAddr)
|
||||||
*
|
*
|
||||||
|
|
@ -70956,9 +70986,8 @@ class DebuggerX86 extends Debugger {
|
||||||
/**
|
/**
|
||||||
* doDump(asArgs)
|
* doDump(asArgs)
|
||||||
*
|
*
|
||||||
* The length parameter is interpreted as a number of bytes, in hex, which we convert to the appropriate number
|
* For memory dumps, the second parameter (sLen) is interpreted as a length (by default, in hex)
|
||||||
* of lines, because we always display whole lines. If the length is omitted/undefined, it defaults to 0x80 (128.)
|
* only if it contains an 'l' prefix; otherwise it's interpreted as an ending address (inclusive).
|
||||||
* bytes, which normally translates to 8 lines.
|
|
||||||
*
|
*
|
||||||
* @this {DebuggerX86}
|
* @this {DebuggerX86}
|
||||||
* @param {Array.<string>} asArgs (formerly sCmd, [sAddr], [sLen] and [sBytes])
|
* @param {Array.<string>} asArgs (formerly sCmd, [sAddr], [sLen] and [sBytes])
|
||||||
|
|
@ -71073,12 +71102,10 @@ class DebuggerX86 extends Debugger {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!sAddr) sCmd = this.sCmdDumpPrev || "db";
|
if (!sAddr) sCmd = this.sCmdDumpPrev || "db";
|
||||||
} else {
|
|
||||||
this.sCmdDumpPrev = sCmd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sCmd == "dh") {
|
if (sCmd == "dh") {
|
||||||
this.dumpHistory(sAddr, sLen);
|
this.dumpHistory(sAddr, sLen, sBytes);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71095,16 +71122,27 @@ class DebuggerX86 extends Debugger {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sCmd[1] && "bwd".indexOf(sCmd[1]) < 0) {
|
||||||
|
this.println("unrecognized dump command");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sCmdDumpPrev = sCmd;
|
||||||
|
|
||||||
var dbgAddr = this.parseAddr(sAddr);
|
var dbgAddr = this.parseAddr(sAddr);
|
||||||
if (!dbgAddr || dbgAddr.sel == null && dbgAddr.addr == null) return;
|
if (!dbgAddr || dbgAddr.sel == null && dbgAddr.addr == null) return;
|
||||||
|
|
||||||
var len = 0; // 0 is not a default; it triggers the appropriate default below
|
var len = 0;
|
||||||
if (sLen) {
|
if (sLen) {
|
||||||
if (sLen.charAt(0) == 'l') {
|
if (sLen.charAt(0) == 'l') {
|
||||||
sLen = sLen.substr(1) || sBytes;
|
sLen = sLen.substr(1) || sBytes;
|
||||||
|
len = this.parseValue(sLen);
|
||||||
|
} else {
|
||||||
|
var dbgAddrEnd = this.parseAddr(sLen);
|
||||||
|
if (!dbgAddrEnd) return;
|
||||||
|
len = dbgAddrEnd.off - dbgAddr.off + 1;
|
||||||
}
|
}
|
||||||
len = this.parseValue(sLen) >>> 0; // negative lengths not allowed
|
if (len < 0 || len > 0x10000) len = 0;
|
||||||
if (len > 0x10000) len = 0x10000; // prevent bad user (or variable) input from producing excessive output
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var sDump = "";
|
var sDump = "";
|
||||||
|
|
@ -71133,7 +71171,7 @@ class DebuggerX86 extends Debugger {
|
||||||
cb--;
|
cb--;
|
||||||
}
|
}
|
||||||
if (sDump) sDump += '\n';
|
if (sDump) sDump += '\n';
|
||||||
sDump += sAddr + " " + sData + ((i == 0)? (' ' + sChars) : "");
|
sDump += sAddr + " " + sData + Str.pad(sChars, sChars.length + i * 3 + 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sDump) this.println(sDump);
|
if (sDump) this.println(sDump);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -246,7 +246,7 @@ DiskAPI.GEOMETRIES = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Media descriptor bytes for DOS-compatible FAT-formatted disks (stored in the first byte of the FAT)
|
* Media ID (descriptor) bytes for DOS-compatible FAT-formatted disks (stored in the first byte of the FAT)
|
||||||
*/
|
*/
|
||||||
DiskAPI.FAT = {
|
DiskAPI.FAT = {
|
||||||
MEDIA_160KB: 0xFE, // 5.25-inch, 1-sided, 8-sector, 40-track
|
MEDIA_160KB: 0xFE, // 5.25-inch, 1-sided, 8-sector, 40-track
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue