Closed assad-ebrahim-uk closed 7 months ago
You're right, it seems Debug/X mimics exactly MS Debug's behavior. L accepts 100h as address only, W is more generous here. I guess it's best to adjust the help screen and leave the program as it is.
Andreas, thanks for the reply. Given that the feature is not there, I agree it’s probably better to leave the program as it is to avoid complications around folks wondering why a loaded program does not run. If you want me to draft some wording to clarify the Manual / Help file, let me know and am happy to do it.
For a use case like mine, a solution (that falls to the programmer) would be to read binary data from disk and put it wherever desired.
I believe in Debug/X if you load a file that has a name ending in eg ".bin" (not ".com" nor ".exe" nor ".hex") then the L command accepts other addresses such as l 200
. This is true of lDebug as well.
In lDebug you can run the debugger init with /F
or run the command install fswitch
to treat any file as a flat binary. This will enable commands like l 200
but you will load MZ .EXE files as if they were flat binaries (header and all) instead of loading and relocating the .EXE image as instructed by the header.
Confirming this works: .bin filename with binary data loads up into any specified address location using L command. Many thanks ECM!
@Baron-von-Riedesel : Suggested addition to the file Debug.txt in the paragraph starting "The Load command (L)..." "Note: to load binary data into a location other than CS:100, ensure the filename is not .com or .exe (you can use .bin). Then the command L 200 or L 1000 works."
I added the hint to debug.txt. Also, if debugger is in protected-mode (DebugX): to load/write non-program files is rejected, and reading/writing sectors triggers a check whether a DOS extender is active.
I did not see the hint in debug.txt in the L command section in either the main branch (shows last edit last week) or the new branch. Am I looking in the wrong location?
Am I looking in the wrong location?
No. I just didn't upload the change yet.
Is loading a .COM file into generic destination address supported?
Documentation (debug.txt) indicates the 'load program (L)' command accepts an optional destination address: L [address] Documentation mention no constraints on the address. However, in practice it appears only L 100 is accepted. All of the below variations work with 100 but not with e.g. 600 L 600 L CS:600 L 0600 L 072A:0600
Intended Use Case: To load a program into the default address (0x100). To then load separately created binary user data file into a designated space (e.g. 0x600) which the program knows to access. E.g. N program.com L
N data.com L 600
Thanks!