Useful debug scripts
Results 1 to 6 of 6

Thread: Useful debug scripts

  1. #1
    Banned
    Join Date
    Dec 2001
    Posts
    400

    Useful debug scripts

    Here is one to determine your video card (useful on systems with no documentation):The following debug routine will list the type of video card within your computer. This is an excellent way of determining the chipset on the card or the card within your computer without opening the computer.

    At the C:\> type debug

    -d c000:0040

    After typing the above command you should receive several lines of text similar to:

    C000:0040 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
    C000:0050 E9 63 7B 00 B4 10 49 27 - E9 FE 2B E9 F7 2B 50 4D .c{...I'..+..+PM
    C000:0060 49 44 58 00 5B 00 00 00 - 00 A0 00 B0 00 B8 00 C0 IDX.[...........
    C000:0070 00 5B 53 54 42 20 6E 56 - 49 44 49 41 20 54 4E 54 .[STB nVIDIA TNT
    C000:0080 20 76 65 72 2E 20 31 2E - 31 30 20 0D 0A 00 1B 43 ver. 1.10 ....C
    C000:0090 6F 70 79 72 69 67 68 74 - 28 43 29 31 39 39 38 20 opyright(C)1998
    C000:00A0 53 54 42 20 53 79 73 74 - 65 6D 73 20 49 6E 63 0D STB Systems Inc.
    C000:00B0 0A 00 22 6C 2C 0A 01 00 - C3 50 24 7F E8 60 36 58 .."1,....P$..'6X

    As you can pick out in the above dump this gives you enough information to determine the make and the year made on the video card. On line 4 you can see the make of this video card which in this case is a N VIDIA TNT which would be the Riva TNT chipset. The next line you notice the version of the card and finally the line thereafter is the copyright or the year manufactured generally.

    If you are unable to capture any information which sounds like the video card you can also type

    -d c000:0090
    ********************************************************************************************************
    I use this one all the time to determine if a printer has a problem:

    If you are encountering issues with your printer using the following debug command can help you discover what type of issues you are encountering:

    1. Type debug at the MS-DOS prompt
    2. At the - type in i379:

    Anything less then eight for the second digit means printer error, first letter should be D other wise you will have some sort of error with the printer.

    1 - 0001 9 - 1001
    2 - 0010 A - 1010
    3 - 0011 B - 1011
    4 - 0100 C - 1100
    5 - 0101 D - 1101
    6 - 0110 E - 1110
    7 - 0111 F - 1111
    Example:

    d = 1101 = (1)Selected (1)No paper error (0)Printer Acknowledged (1)Not busy

    *******************************************************************************************************


    The following debug routine will check the ports of the computer to allow you to know if ports are being detected or not.

    Type debug to get to the "-"

    Type D40:0

    You should get several lines however the first line is the only important line which should read the following:

    0040:0000 F8 03 F8 02 E8 03 E8 02 - 78 03 78 02 BC 03

    F8 03 F8 02 E8 03 E8 02 78 03 78 02 BC 03
    COM1 COM2 COM3 COM4 LPT1 LPT2 LPT3

    The above graph shows you what the feed back means as far as port so if you se F8 03 this would be an indication that COM1 is being detected if you see 00 00 this is an indication that it is not being detect which could mean that hardware is bad or that it is disabled in cmos.

  2. #2
    Banned
    Join Date
    Dec 2001
    Posts
    400
    Here is a sleep file script.

    N SLEEP.COM
    A 100
    MOV SI,0082
    MOV AX,[SI]
    XCHG AH,AL
    XOR AX,3030
    MOV BL,AL
    MOV AL,0A
    MUL AH
    ADD AX,BX
    MOV SI,AX
    MOV AH,2C
    INT 21
    MOV BL,DH
    MOV AX,SI
    AAM
    OR AX,3030
    XCHG AH,AL
    MOV [0160],AX
    MOV AH,09
    MOV DX,0160
    INT 21
    MOV AH,06
    MOV DL,FF
    INT 21
    JZ 014C
    OR AL,AL
    JNZ 013F
    MOV AH,08
    INT 21
    MOV AL,FF
    MOV DX,016C
    PUSH AX
    MOV AH,09
    INT 21
    POP AX
    MOV AH,4C
    INT 21
    MOV AH,2C
    INT 21
    CMP BL,DH
    JZ 012D
    MOV BL,DH
    DEC SI
    JNZ 011A
    SUB AL,AL
    MOV DX,016C
    JMP 0142
    DB "XX SECONDS", D, 24
    DB " ", D, A, 24

    RCX
    79
    W
    Q

  3. #3
    Banned
    Join Date
    Dec 2001
    Posts
    400
    Here is yet another little assembly script:


    .MODEL SMALL; memory model
    .STACK; memory space for program instructions in the stack
    .CODE; the following lines are program instructions
    mov ah,1h; moves the value 1h to register ah
    mov cx,07h;moves the value 07h to register cx
    int 10h;10h interruption
    mov ah,4ch;moves the value 4 ch to register ah
    int 21h;21h interruption
    END; finishes the program code

    This assembler program changes the size of the computer cursor. Its good practice to break down the code and understand what each line does.

  4. #4
    PHP/PostgreSQL guy
    Join Date
    Dec 2001
    Posts
    1,164
    antihaxor, you just made me go blind ...good job though, assembly's good to know if you're wanting to get 'intimate' with hardware/etc.
    We the willing, led by the unknowing, have been doing the impossible for the ungrateful. We have done so much with so little for so long that we are now qualified to do just about anything with almost nothing.

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Posts
    257
    Many video cards will display the information in a much more user friendly format before the POST.
    -Shkuey
    Living life one line of error free code at a time.

  6. #6
    Banned
    Join Date
    Dec 2001
    Posts
    400
    Originally posted by shkuey
    Many video cards will display the information in a much more user friendly format before the POST.
    Yes that is true but you can do this without a reboot. Just go to a dos prompt. The whole purpose of the scripts is to grow familar with debug and assembly. Some of these really do nothing useful. Although the printer test and the port test are good to know

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •