Search code examples
assemblytasm

Turbo assembler cs section explain


I'm trying to trace the program I've searched using turbo assembler but im stocked with this values:

cs:0006->8ED8           mov ds,ax
cs:0392->66B800060000   mov eax,00000600
cs:039A->66B900000000   mov ecx,00000000

can someone help me explain this? Especially the numbers showed in cs part.


Solution

  • "cs" refers to the current code segment, the number after it refers to the offset within the segment. The number after the arrow is the opcode of the instruction.

    cs:0006->8ED8           mov ds,ax
     ^   ^     ^
     |   |     |
     |   |     +-- Opcode of the "mov ds,ax" instruction
     |   |
     |   +-- Offset of the instruction within the code segment (6 bytes)
     |
     +-- Current code segment, see contents of your CS register
    

    See also X86 Memory Segmentation for more details.

    For a list of x86 opcodes, see http://ref.x86asm.net/