Re:A 28-byte “hello, world” program assembled with DEBUG.EXE...
by 13of40 on Sunday October 30, 2022 @06:13PM
(#33399412)
MS-DOS v1 didn't have an assembler in debug.exe (or was it .com?) so the only way to author machine code on a 5150 with no extra dev tools was to code it on paper, translate it by hand, and enter it in hex.
[ Parent
| on HN ]
Re:A 28-byte “hello, world” program assembled with DEBUG.EXE...
by susam on Sunday October 30, 2022 @06:41PM
(#33399739)
You are right. It was DEBUG.COM. Indeed it did not have an assembler. It had a disassembler though. An archived copy of it can be found here: https://github.com/microsoft/MS-DOS/blob/master/v1.25/bin/DE...
C:\>DEBUG.COM
-A
^ Error
-N HELLO.COM
-L
-U 100 107
0340:0100 B409 MOV AH,09
0340:0102 BA0801 MOV DX,0108
0340:0105 CD21 INT 21
0340:0107 C3 RET
-
Re:A 28-byte “hello, world” program assembled with DEBUG.EXE...
by WalterBright on Monday October 31, 2022 @02:48AM
(#33402721)
Here's a one file disassembler for x86 and its successors:
https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ba...
The fun thing to do with it is send it your name and have it disassemble it.
(I use it to check the object code generated by the compiler. Instead of pretty-printing the instruction stream, it disassembles the binary object code. This helps to find mistakes in either the code generation or the disassembler, as they must match.)
Anyhow, feel free to incorporate it into your obj file dumper, exe file dumper, debugger, or any tool that can benefit by examining code.