Re: I'm having trouble finding opcodes



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
.



Relevant Pages

  • Re: which way is faster?
    ... So what you ask me here would be a tiny OS on top of DOS. ... alternatives to unless using hardware acceleration. ... PUSH ebx ... MOV edx,01000;scan line size ...
    (alt.lang.asm)
  • Re: need to be able to know basic MASM ONLY
    ... The reason Dirk's code looks "different" may be that it's for dos. ... START: mov ax, DATEN ... trying to compile his first program, after that I abandoned it all. ... VS with Nasm (hmmm, ...
    (comp.lang.asm.x86)
  • Re: which way is faster?
    ... So what you ask me here would be a tiny OS on top of DOS. ... PUSH ebx ... MOV edx,01000;scan line size ... EMM and XMS wont do well here, because IRQs become disabled for too ...
    (alt.lang.asm)
  • Re: Am I on the right track?
    ... "Assembly Language step by step with Dos and Linux". ... disassemble the .exe and study it. ... A few more for dos - nothing as impressive as dazzle, but may have some ideas on how dazzle might do it. ... PAL1: mov dx,3C8h ...
    (comp.lang.asm.x86)
  • Re: Am I on the right track?
    ... "Assembly Language step by step with Dos and Linux". ... disassemble the .exe and study it. ... A few more for dos - nothing as impressive as dazzle, but may have some ideas on how dazzle might do it. ... PAL1: mov dx,3C8h ...
    (comp.lang.asm.x86)