PDA

View Full Version : regs list



cigcode
03-15-2004, 08:23 PM
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

VirtualAce
03-16-2004, 01:07 AM
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

cigcode
03-16-2004, 03:42 AM
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

Fordy
03-16-2004, 04:15 AM
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

cigcode
03-16-2004, 04:42 AM
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

VirtualAce
03-17-2004, 12:59 AM
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.

cigcode
03-17-2004, 05:54 AM
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