I'm having trouble finding opcodes
- From: "corey" <coreymcflintock@xxxxxxxxxxx>
- Date: 30 Apr 2006 10:16:34 -0700
Here's a bit of code I've disassembled (start of a .com file):
debug list.com
-u
0CB2:0100 BC0C6B MOV SP,6B0C
0CB2:0103 1E PUSH DS
0CB2:0104 2BC0 SUB AX,AX
0CB2:0106 50 PUSH AX
0CB2:0107 89262501 MOV [0125],SP
0CB2:010B B430 MOV AH,30
0CB2:010D CD21 INT 21
0CB2:010F 3C02 CMP AL,02
0CB2:0111 7203 JB 0116
0CB2:0113 E9B208 JMP 09C8
0CB2:0116 BAA803 MOV DX,03A8
0CB2:0119 E97B0A JMP 0B97
0CB2:011C 4C DEC SP
0CB2:011D 49 DEC CX
0CB2:011E 53 PUSH BX
0CB2:011F 54 PUSH SP
Here's the file disassembled using the 'Bubble' disassembler:
;********* File: list.com *************
;
code SEGMENT
ASSUME CS:code, DS:code
ORG 100h
strt:
MOV SP ,6B0Ch
PUSH DS
SUB AX,AX
PUSH AX
MOV [0125h],SP
MOV AH ,30h
INT 21 ; DOS Function Call
I thought the 'BC' hex code at the start of the first listing would be
found in the list of intel op codes for MOV, but here's the list of
opcodes for MOV and it's not in there. I've looked at intel
documentation too.
This is the Intel list of opcodes for MOV:
MOV - Move
88 / r MOV r/m8,r8 Move r8 to r/m8
89 / r MOV r/m16,r16 Move r16 to r/m16
89 / r MOV r/m32,r32 Move r32 to r/m32
8A / r MOV r8,r/m8 Move r/m8 to r8
8B / r MOV r16,r/m16 Move r/m16 to r16
8B / r MOV r32,r/m32 Move r/m32 to r32
8C / r MOV r/m16,Sreg** Move segment register to r/m16
8E / r MOV Sreg,r/m16** Move r/m16 to segment register
A0 MOV AL, moffs8* Move byte at ( seg:offset) to AL
A1 MOV AX, moffs16* Move word at ( seg:offset) to AX
A1 MOV EAX, moffs32* Move doubleword at ( seg:offset) to EAX
A2 MOV moffs8*,AL Move AL to ( seg:offset)
A3 MOV moffs16*,AX Move AX to ( seg:offset)
A3 MOV moffs32*,EAX Move EAX to ( seg:offset)
B0+ rb MOV r8,imm8 Move imm8 to r8
B8+ rw MOV r16,imm16 Move imm16 to r16
B8+ rd MOV r32,imm32 Move imm32 to r32
C6 / 0 MOV r/m8,imm8 Move imm8 to r/m8
C7 / 0 MOV r/m16,imm16 Move imm16 to r/m16
C7 / 0 MOV r/m32,imm32 Move imm32 to r/m32
Where is hex BC? Anyone know?
Help please i'm trying to write a disassembler - I've managed it for
Z80 but I can't even start with x86.
I thought the first line would be:
'BC' - opcode for move
'OC' - second part of
destination memory address
'6B' - first part of
destination memory address.
The BC instruction is not listed as the opcode for 'MOV' by intel and i
unassembled in the first example using DEBUG.
help
anyone?
.
- Follow-Ups:
- Re: I'm having trouble finding opcodes
- From: Herbert Kleebauer
- Re: I'm having trouble finding opcodes
- From: Frank Kotler
- Re: I'm having trouble finding opcodes
- Prev by Date: Re: I'd like to learn asm...
- Next by Date: Re: HLA vs ???
- Previous by thread: frame pointer
- Next by thread: Re: I'm having trouble finding opcodes
- Index(es):
Relevant Pages
|