| | |
What is the purpose of registers
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2006
Posts: 15
Reputation:
Solved Threads: 0
09)What is the purposes of register used in c++.in c++ help they are used more examples and they are used memory addresses……How can we find the specific functions of memory addresses used in programming?Ex int() and int86() functions…..
#include<stdio.h>
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#define VIDEO 0x10
void movetoxy(int x, int y)
{
union REGS regs;
regs.h.ah=2;
regs.h.dh=y;
regs.h.dl=x;
regs.h.bh=0;
int86(VIDEO,®s,®s);
}
void main ( )
{
clrscr();
movetoxy(35,10);
cout<<”Hello”;
getch();
}
at the start defined a constant with 0x10 I ask what is the purpose of that 0x10 what is the purpose of the address?
Is that a memory address? how we get to know about a task of a given memory address as a programmer? is there documentations? Is there where to find these things…?
#include<stdio.h>
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#define VIDEO 0x10
void movetoxy(int x, int y)
{
union REGS regs;
regs.h.ah=2;
regs.h.dh=y;
regs.h.dl=x;
regs.h.bh=0;
int86(VIDEO,®s,®s);
}
void main ( )
{
clrscr();
movetoxy(35,10);
cout<<”Hello”;
getch();
}
at the start defined a constant with 0x10 I ask what is the purpose of that 0x10 what is the purpose of the address?
Is that a memory address? how we get to know about a task of a given memory address as a programmer? is there documentations? Is there where to find these things…?
0x10 is an interrupt vector, which is a hard-coded memory address where an interrupt handler begins. This can only be used in old 16-bit MS-DOS programs.
Here are assembly language tutorials. If you want to learn interrupts then you will need to know basic assembly language.
Here is information about int 21 functions
If you google for "dos interrupts" you will find info on other interrupts.
Here are assembly language tutorials. If you want to learn interrupts then you will need to know basic assembly language.
Here is information about int 21 functions
If you google for "dos interrupts" you will find info on other interrupts.
Last edited by Ancient Dragon; Dec 28th, 2006 at 10:33 am.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
•
•
0x10 is an interrupt vector, which is a hard-coded memory address where an interrupt handler begins. This can only be used in old 16-bit MS-DOS programs.
•
•
•
•
Here are assembly language tutorials. If you want to learn interrupts then you will need to know basic assembly language.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
•
•
•
•
An older C/C++ compiler can build these programs even on Windows XP machines
Well, tell me how anyone can now how to populate the REGS structure if he knows absolutely nothing about assembly language??? True he doesn't need to know about many assembler instructions, but he does need to know a lot about the interrupts he is attempting to access.
Last edited by Ancient Dragon; Dec 29th, 2006 at 11:12 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- Confused x86_64 or i386? (Getting Started and Choosing a Distro)
- x86 Questions (Assembly)
- First Timer and trying to learn the basics (Please help me ASAP) (Assembly)
- help needed (Java)
- Please help with the assembly code (Assembly)
- GDI (C)
Other Threads in the C++ Forum
- Previous Thread: twenty one game
- Next Thread: turbo c processor fault
Views: 1700 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linux loop looping loops map math matrix memory microsoft newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






