Re: Disassembling a DOS COM file



; Yes, it is very easy.

; But it depends if the author of a "com" program wants
; his program to be easily disassembled.
; The listing of a very simple, but encrypted
; "Hello, World!" program that decrypts itself.
org 100h
lea si, ecrypted
mov cx, tail - ecrypted
decrypt:
add [si], 255
inc si
loop decrypt
ecrypted db 187,26,2,181,10,206,34,185,1,1,206,23
db 196,73,102,109,109,112,45,33
db 88,112,115,109,101,34,37
tail:
; simplest encryption, there ain't simpler than that.
; it may look like program doesn't do something special,
; but in fact it prints out a message using interrupt 21h...
; assembled and checked with emu8086 version 4.00-Beta-12
end

.