flat assembler
Message board for the users of flat assembler.

Index > DOS > Ultimate Debugger 2.0


What instruction do you consider as most important ?
ud2
7%
 7%  [ 1 ]
nop
21%
 21%  [ 3 ]
hlt
7%
 7%  [ 1 ]
cpuid
7%
 7%  [ 1 ]
mov
28%
 28%  [ 4 ]
xor
14%
 14%  [ 2 ]
lea
0%
 0%  [ 0 ]
"private" (<- do NOT vote for this :-D)
14%
 14%  [ 2 ]
~~~ other
0%
 0%  [ 0 ]
Total Votes : 14

Author
Thread Post new topic Reply to topic
DOS386



Joined: 08 Dec 2006
Posts: 1904
DOS386 25 Dec 2006, 23:26
Code:
    push    cs
    pop     ds

    mov ax,1687h
    int 2Fh
    or  ax,ax           ; DPMI installed?
    jnz error
    test    bl,1            ; 32-bit programs supported?
    jz  error
    mov word [mode_switch],di
    mov word [mode_switch+2],es
    mov bx,si           ; allocate memory for DPMI data
    mov ah,48h
    int 21h
    jc  error
    mov es,ax
    mov ax,1
    call    far [mode_switch]   ; switch to PM, hoping it will keep long time Wink
    jc  error

    ud2           ; <- BOOM Shocked !!!
    mov cx,1
    xor ax,ax
    int 31h         ; allocate descriptor for code
    


OK, this is NOT the first thread discussing this issue:

http://board.flatassembler.net/topic.php?t=4069 Wink

Nevertheless, I think I found a great debugging instrument.

But can someone explain me all the debug info provided by HDPMI32 ?
One can probably extract much more info than I understand by now.

1. Obvious
2. Obvious
3. Looks interesting. CS<>DS - required by PM ? Were unified before. Confused
What are the numbers in brackets ? Linear address of segment start ?
What else ?
4. What's this ? Interesting for me ?
5. This ? What do the "****" mean ?
6. Interesting for me ? Or only for debugging HDPMI32 itself ?
7. Interesting for me ? Or only for debugging HDPMI32 itself ?
8. How to use those numbers ?
9. Large collection. How to use ?

Please log IN to see the shot Wink


Description: Crash screenshot
Filesize: 6.22 KB
Viewed: 4650 Time(s)

crash.png



_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 25 Dec 2006, 23:26
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7103
Location: Slovakia
vid 26 Dec 2006, 00:39
see intel manuals. You just NEED them to understand this kind of stuff.

also, surely not "mov". on CISC x86 it is not THAT important. you can do pretty lot without it.
Post 26 Dec 2006, 00:39
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Goplat



Joined: 15 Sep 2006
Posts: 181
Goplat 26 Dec 2006, 01:16
I voted for HLT as most important. UD2, NOP, MOV, XOR and LEA all just have effects that can all be emulated using other instructions, and CPUID is convenient but not necessary (hey, people did without it for over a decade). But HLT is irreplaceable. No other instruction will save you money on your electric bill.
Post 26 Dec 2006, 01:16
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 26 Dec 2006, 05:05

  • j[a-z]+ (jmp, jae, jb)
  • call/ret
  • push/pop
  • int3 (0xCC)
Post 26 Dec 2006, 05:05
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 08 Jan 2007, 21:24
I voted for CPUID, which is very important to retrieve infos about newer features which cannot(at least not in user-mode) be retrieved otherwise
Post 08 Jan 2007, 21:24
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.