flat assembler
Message board for the users of flat assembler.
Index
> DOS > fasm source for DOS DEBUG clone |
Author |
|
neville 23 Jan 2014, 02:06
Sometimes I wish I had a simple command-line DOS DEBUG-like utility in FAMOS, mainly just for quick disassembling and assembling direct to memory.
I've decided that a cut-down version of Paul Vojta's DEBUG (Japeths's version 1.25) should do the job for me, and I'm hoping to get the final binary down to 16Kbytes or less (originally 22476 bytes). I'll be cutting out all the DOS and EMS/XMS stuff, and also making it 32-bit unreal-mode compatible (retaining 16-bit code of course). As a first step, I've converted the Masm/JWasm source to fasm and posted the zip archive here. The source is pretty well commented. Some of the macros seemed too complicated, so I just eliminated them. Same for some of the data structures, but some were easily converted to fasm so I retained those. I also haven't reproduced the assembler and disassembler tables contained in the original DEBUGTBL.INC. Luckily they don't seem to contain any absolute address references, only relative ones, so I've just extracted them in binary form from the original binary code and they should be fully relocatable. So the fasm source has file 'debugtbl.bin' instead of include 'debugtbl.inc' Debugtbl.bin is currently 5174 bytes and parts of it could easily be converted to fasm source which I might do some time. However it was created with an external program and some complicated macros so some of it will be a bit too hard Similarly, file 'asmtab.bin' contains another 1806 bytes I extracted from the binary. The format of this code is well documented in the source but how the original binary was generated remains a mystery to me atm. Initially I made sure that fasm exactly reproduced the original binary (except for many encoding differences, thankfully none of which changed the binary size!) and checked that at least the "a" and "d" commands were working properly in the newly assembled binary. The feature of just pressing enter to repeat the previous command makes testing a bit easier too! Then I made a couple of changes to the code which reduced its size, and re-tested the binary as a simple check that at least the major address labels were being resolved correctly, and that DEBUGTBL.BIN and ASMTAB.BIN are indeed relocatable. The changes are (see the source for full details): - text 'PTR ' removed from address size display (one of my pet hates - "d" cmd amended to show extended ascii chars and all bytes except 07-1Ah The new binary assembles to 22455 bytes with fasm 1.71.16 but for your convenience I've included a copy in the zip archive. So the attached archive contains: DEBUGF01.ASM = fasm-compatible source from DEBUG125.ASM (187750 bytes) DEBUGTBL.BIN = asm/disasm tables extracted from original DEBUG125.COM (5174 bytes) ASMTAB.BIN = asm table extracted from original DEBUG125.COM (1806 bytes) DEBUGF01.COM = binary assembled by fasm ver 1.71.16 (22455 bytes) Of course it's possible (or even likely) that I've introduced a bug or two during my conversion, so if anybody would like to do more testing I would be very appreciative I hope also you find the source useful and maybe you can adapt it to your own needs.
_________________ FAMOS - the first memory operating system |
|||||||||||
23 Jan 2014, 02:06 |
|
DOS386 01 Feb 2014, 07:37
Interesting (I'll test later)
|
|||
01 Feb 2014, 07:37 |
|
typedef 01 Feb 2014, 07:55
Isn't DOS obsolete? Wait....
|
|||
01 Feb 2014, 07:55 |
|
DOS386 01 Feb 2014, 08:05
> Isn't DOS obsolete? Wait....
No. Don't post here then |
|||
01 Feb 2014, 08:05 |
|
DOS386 19 Feb 2014, 14:26
YES it works (minimal test) ... thanks to neville
PS: it might be a good idea to patch line 7997 too: Code: helpmsg db 'FF-DEBUG (FreeDOS-FASM-DEBUG) v1.25 (neville) help screen',CR,LF |
|||
19 Feb 2014, 14:26 |
|
neville 21 Feb 2014, 20:48
Thanks DOS386
_________________ FAMOS - the first memory operating system |
|||
21 Feb 2014, 20:48 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.