GNU Info

Info Node: (nasm.info)Section A.3.1

(nasm.info)Section A.3.1


Next: Section A.3.2 Prev: Section A.3 Up: Section A.3
Enter node , (file) or (file)node

A.3.1. COM Files: Specifying an Origin
--------------------------------------

   To disassemble a `DOS .COM' file correctly, a disassembler must
assume that the first instruction in the file is loaded at address
`0x100', rather than at zero. NDISASM, which assumes by default that
any file you give it is loaded at zero, will therefore need to be
informed of this.

   The `-o' option allows you to declare a different origin for the file
you are disassembling. Its argument may be expressed in any of the NASM
numeric formats: decimal by default, if it begins with ``$'' or ``0x''
or ends in ``H'' it's `hex', if it ends in ``Q'' it's `octal', and if
it ends in ``B'' it's `binary'.

   Hence, to disassemble a `.COM' file:

            ndisasm -o100h filename.com

   will do the trick.


automatically generated by info2www version 1.2.2.9