Re: I'm having trouble finding opcodes
- From: Frank Kotler <fbkotler@xxxxxxxxxxx>
- Date: Sun, 30 Apr 2006 14:37:46 -0400
corey wrote:
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
Okay... we've got dos version... I suppose the text at 03A8h is the error message if we haven't got dos 2.0... (what are the chances of *that*??? :)
0CB2:011C 4C DEC SP
0CB2:011D 49 DEC CX
0CB2:011E 53 PUSH BX
0CB2:011F 54 PUSH SP
This isn't code, of course, but the text "LIST"... The "dec sp" is a dead giveaway - *not* something you'd want to do!!!
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.
....
B8+ rw MOV r16,imm16 Move imm16 to r16
Did you forget the "+ rw"?
Best,
Frank
.
- References:
- I'm having trouble finding opcodes
- From: corey
- I'm having trouble finding opcodes
- Prev by Date: NAND
- Next by Date: Re: I'm having trouble finding opcodes
- Previous by thread: I'm having trouble finding opcodes
- Next by thread: Re: I'm having trouble finding opcodes
- Index(es):
Relevant Pages
|