Here is a direct intersegment jump that is assembled:
EA 03000210 jmpi 1002h,3 ;jump to the Linux kernal
Where does it go?
Type: Posts; User: cheesehead
Here is a direct intersegment jump that is assembled:
EA 03000210 jmpi 1002h,3 ;jump to the Linux kernal
Where does it go?
Bubba:
Thanks for the reply. However, you blew past me. I'm not sure if I understand what you said.
Your example did not refernce the value 10000 or the array memory[Size]. Sorry for the...
Will the code below preload an array of 100 locations with the
value 10000?
size - 100
int memory[Size]
const int mem = 10000;
int *p, memory[Size];
for ( p = &memory[0]; p <...
This is a problem with calling a function.
I have declared the following:
enum height { high, low, equal }
void errormsg ( errors )
////////////////////
Sorry - maybe my question wasn't clear.
I did want to put 8 in every element. I realize that the computer will store this as an ascii number but my program will require number of + to - 10000. I...
Does this mean that if I wanted to load every element of the array with the number 8 it would be :
--------------------------------------------
/*fills an array with 8's*/
char array[SIZE], *p;...
I am trying to use pointers to preload an array. I know how to do it as an array but the pointer method has my head twisted around.
The Array is defined as Array[Size]
If I used a function ...
Can you point out my error? Am I missing something obvious???
The function should return a TRUE if the number falls between -9999 and +9999. False if out of range.
Using MSV C++ 6 Intro...
Point well taken but there are several restrictions on the problem.
It still doesn't make sense that the program would go to the if when the value was not exceeded.
Listed below is the complete set of code for a problem.
It is the classic turtle graphics problem. PenUp, PenDown, Turn Left, Turn Right, Move, print Array.
The problem occurs during the...
The cout << (char) a[i][j]; didn't work. I ended up with a series if if else statement. This worked but not pretty. I'm glad I only had two char.
BTW - cout << (char) a[i][j]; statement did not...
Thanks for the reply, here is some additional information.
1) The array was predefined and wasn't to be altered
declaration
int floor[BoardSize][BoardSize] = {{0,0}},
2) The call
case...
I have a 2 dim array a [20] [20} with the character * in some locations. It was loaded as Character = '*' into the location. When I cout a[x][y], I get the ASCII number. In this case 42 instead of...
Great hint - it took care of the left & right problem.
Now it only has 2 problems:
1) The Pen Up / Pen Down
2) Printing characters it now prints only the number 42 instead of the *
...
I tried that but the direction did not change. The declaration and the function were changed. Any other places?
int turnRight(int &);
int turnRight(int &d)
{
++d;
if (d=4)
d = 0;
Listed below is the classic turtle graphics problem. It takes a command 1 through 9. The problem is that it won't place the distance or the direction into the move function. It must have something to...
This program seems to work OK except for the "walking" ( function movePen ) part. It gets the commands and prints. The answer is probable right in front of me. Can you give me a clue?
Thanks...
A liitle work on my own solved the questions.
I changed all the cin >> to variable = cin.get();
I then added one line to the main() . Since the problem occured at initialization, I found...
What do you mean by overloaded version of get()? I would appreciate an example.
My book says that letter1 = cin.get() will only read the next character and puts that in letter1.
Can something be put in the () to limit the input to 1 character?
I know that you should quit when something works but you don't learn much that way. I substituted all the cin statements in the recursion with variable = cin.get()
The program then did the...
You are correct Zen. That line did it. However, the single character case ( half == 0 ) will only work if I add status = true; to that bit of code. Without it, it says that " is not a palindrome."...
Here is a copy of the code that hangs. Meaning it print the palindrome & stops.
I the half == 0 code is commented out, the program runs fine for characters 2 and up. ????#include <iostream>
...
Zen:
here is the entire program. The main() seems to work fine but the bottom does not recurse as intended.
It should: 1) get a letter 2) write a letter 3) recurse for half the number of...
Thanks - but how do I decrement half. If I decrement in the first if statement if(half-- >= 1 ) then the program jumps back to main but goes into a loop in main() with no exit.