Depending on what you want to do, creating a com
file directly using nasm
is a simple option. You should not use any sections, and specify org 100h
to compensate for the load address.
Example:
ORG 100h
lea dx, [msg]
mov ah,9
int 21h
mov ax, 4c00h
int 21h
msg: DB 'HELLO WORLD$'
Assemble as: nasm -f bin -o test.com test.asm
Dosbox itself has an optional built-in debugger albeit not a very sophisticated one. Could be good enough for your purposes.