regs list

This is a discussion on regs list within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Anyone knows where i can find a list of dos/bios REG so i know what they mean.. like. regs.x.ax = ...

  1. #1
    Registered User
    Join Date
    Feb 2004
    Posts
    28

    regs list

    Anyone knows where i can find a list of dos/bios REG so i know what they mean.. like.

    regs.x.ax = 1500;

    etc, etc,

    I want a list so i know what x or ax and 1500 etc means.. i would add a search but.. im not sure of what to search for.. if its regs list or etc.. causei tried regs list and found nothing that talks about what i want

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    www.intel.com


    This has all you need about registers. Registers have nothing to do with DOS. They are part of the x86 architecture.


    http://webster.cs.ucr.edu/

    For many many links to sites that will help you understand the correct use of registers. However, Intel's reference manuals will tell you what each register is/does and is used for.

    Explicit return registers

    32 bit:
    EAX EBX ECX EDX

    16 bit:
    AX BX CX DX

    8 bit:
    AL AH BL BH CL CH DL DH

    Segment registers

    CS DS ES FS GS

    CS - Code segment
    DS - Date segment
    ES - Extra segment
    FS - Just another segment...rarely used
    GS - see FS

    Index registers

    32 bit:
    EDI ESI

    16 bit:
    DI SI

    DI - destination index
    SI - source index

    Stack registers/pointers

    32 bit:
    EBP ESP

    16 bit:
    BP SP

    BP - base pointer
    SP - stack pointer

    Current instruction pointer

    32 bit:
    EIP

    16 bit:
    IP

    IP - instruction pointer

    Intel FPU registers - 80 bits wide

    ST0
    ST1
    ST2
    ST3
    ST4
    ST5
    ST6
    ST7

    Intel MMX registers - 64 bits; aliased to FPU registers

    MM0
    MM1
    MM2
    MM3
    MM4
    MM5
    MM6
    MM7

    Intel x86 flags - EFLAGS

    * ID - identification flag
    * VIP - virtual interrupt pending flag
    * VIF - virtual interrupt flag
    * AC - alignment check
    * VM - virtual 8086 mode
    * RF - resume flag
    * NT - nested task
    * IOPL - I/O privilege level
    + OF - overflow flag
    & DF - direction flag
    * IF - interrupt enable flag
    * TF - trap flag
    + SF - sign flag
    + ZF - zero flag
    + AF - auxiliary carry flag
    + PF - parity flag
    + CF - carry flag

    * - system flags
    + - status flags
    & - control flags

    Intel x86 Exceptions and Interrupts

    INTERRUPT
    0 - Divide error
    1 - Debugger call
    2 - NMI Interrupt (non maskable)
    3 - Breakpoint
    4 - INTO -> detected overflow
    5 - BOUND range exceeded
    6 - Invalid opcode
    7 - Device not available
    8 - Double fault (triple fault reboots CPU)
    9 - Reserved
    10 - Invalid task state segment or TSS (used for task switching)
    11 - Segment not present
    12 - Stack exception
    13 - General protection fault
    14 - Page fault
    15 - Reserved
    16 - Floating point error
    17 - Alignment check
    18-31 reserved
    32-255 - maskable interrupts (software interrupts)


    Intel x86 registers/flags

    (E)AX (E)BX (E)CX (E)DX
    CS DS ES FS GS
    (E)DI (E)SI (E)BP (E)SP (E)IP
    ST0 ST1 ST2 ST3 ST4 ST5 ST6 ST7
    MM0 MM1 MM2 MM3 MM4 MM5 MM6 MM7
    ID VIP VIF AC VM RF NT IOPL
    OF DF IF TF SF ZF AF PF CF

  3. #3
    Registered User
    Join Date
    Feb 2004
    Posts
    28
    thank you.. im tring to learn cause i want to code a cdrom player.. but first i need to learn how to open it by calling an interupt command.. hehe. thank's again

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Originally posted by cigcode
    thank you.. im tring to learn cause i want to code a cdrom player.. but first i need to learn how to open it by calling an interupt command.. hehe. thank's again
    If your using windows dont bother.

    There's examples of Winapi code to open a CD tray available on the windows board somewhere, and the DirectX APIs would be far better for coding a multimedia app

  5. #5
    Registered User
    Join Date
    Feb 2004
    Posts
    28
    no im using turbo c to do this, as i already know that using a windows compilar.. anyways thank you i will check out the windows forum as well

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Well for that you will need to check out interrupt 2Fh and use DOS interrupt 21h and open the device - device is simply like a file. DOS will treat the CD ROM as another I/O device.

    But you must check for MSCDEX as well and some other stuff. All of this will severely tick Windows off. Pure DOS is your best bet for coding it, then test it inside of a DOS session.

    But DirectX and DirectSound would be more suited towards a Windows version and would be easier to code....not that being the easiest is the most important part of coding or implies being a better way, but it would be easier.

  7. #7
    Registered User
    Join Date
    Feb 2004
    Posts
    28
    hey bubba would it be ok if you showed me an example using the dos interupts.. i dont know why.. im truely interested in this dos programming heh.. yet i cant seem to think of how to code such thing

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 11:43 AM
  2. instantiated from here: errors...
    By advocation in forum C++ Programming
    Replies: 5
    Last Post: 03-27-2005, 09:01 AM
  3. How can I traverse a huffman tree
    By carrja99 in forum C++ Programming
    Replies: 3
    Last Post: 04-28-2003, 06:46 PM
  4. List class
    By SilasP in forum C++ Programming
    Replies: 0
    Last Post: 02-10-2002, 05:20 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 11:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21