Thanks that worked.
Ted.
Type: Posts; User: afflictedd2
Thanks that worked.
Ted.
Hi everyone,
I am reading a binary file completely, but I would like to restart reading the file, by moving to the beginning of the file again. I have tried using file.seekg(0, ios::beg); but it...
Hi everyone,
I am reading a binary file completely, but I would like to restart reading the file, by moving to the beginning of the file again. I have tried using file.seekg(0, ios::beg); but it...
I am trying to declare a vector pointer, and an ifstream pointer in a class that I plan to use to read binary files. I have heard from someone that using #include in header is often not best (not...
How could I tell that the buffer is completely full or more like when it isn't completely full as there were no 1000 numbers, how can I prevent myself from accessing garbage locations?
Ted.
Hi everyone,
I would like to read a binary file as quickly as possible. Right now I am reading integer by integer, but that could end up being slow.. I imagine, it is probably best to put it all...
hmm you mean something like this:
int buf[BUF_SIZE];
if(file.is_open())
{
while (file.read(reinterpret_cast<char*>(&buf[0]), BUF_SIZE))
{
for...
Hi everyone,
I am trying to make a simple program that will read
a file like a matrix of ints.
The idea is that there is a binary file with ints:
1 2 3 4 5 6 7 8 9
and I want to read them in...
Hi everyone,
What does this attribute do?
void __attribute__ ((interrupt)) context_switch (void)
{
...
}
Hi everyone,
What does this attribute do?
void __attribute__ ((interrupt)) context_switch (void)
{
...
}
stackPointer is:
unsigned char* stackPointer;
Yep, I'm dropping at the assembly level.
I need to load the stack once I return from interrupt, and that's why I need to put the address of the...
That's not what I'm looking for though. I don't want a pointer to a function. I need to store the address of that function in the bytes (stackpointer) and (stackpointer -1).
Ted
I'm not sure what command I need to execute to get that information for you?
I'm using the m6811-elf-gcc compiler. I was told it is really primitive and the sizeof an int is like 16 bits.
Ted.
Yes, but how? the address has a size of two bytes. If I assign it to one byte, it will only store part of the address?
I'd have to write paragraphs to explain what I'm trying to do, and I...
Hmm that didn't work
StackPointer = (&Myfunc & 0x0000FFFF);
StackPointer - 1 = (&MyFunc & 0xFFFF0000) >> 16;
I'm probably not using it correctly, I forgot to say.. the adress is only 16...
Hi everyone I need to assign the address of my function to the
first two bytes of my stackPointer.
How do I do this?
void function foo()
{
}
Hi everyone,
I have a flag defined like this:
#define TMSK1 *(volatile char*)0x1022
I would like to print its value but I'm not sure how to do this in GDB
every time I try it, I get an...
Thank you so much, that shed some light into the problem.. so if that's a function pointer.. then that is the interrupt handler hmmmmm.
Hi everyone,
I am not sure what this line is doing...
#define VECTOR_BASE 0xBFC0
#define SWIV (*(volatile int *)(VECTOR_BASE + 0x36)) /* SWI */
This is what I'm guessing it does....
Hi everyone,
I must implement my own semaphores for an operating systems project we're doing. I was wondering if someone here knows where I can find the algorithms or C code for semaphore...
Hi everyone,
I'm trying to compile this program on my mac and I get this error:
Naix:examples Naix$ g++ -o prodcon prodcon.c
prodcon.c:129:32: error: empty character constant
prodcon.c: In...
I can't post the code for the app though. Where I am working they don't want any code exposed, I'm not sure how much is too much but I don't like to risk it. Most of the time I do if it's an example...
Oh.. I am using new to create the object and then push them in an array. However I do this in a sepparate function, could that be a problem.
like this:
Employee employee = NULL;
for...
Hi everyone,
I'm trying to erase an array of pointers, but I get a segmentation fault.. any ideas what is happening :\
vector<employee*> arrayEmployees; // PostfixArray of functors that...
Hi everyone,
How do I split a string like this
"500 57 - 33 + 17 * 22 -"
into an array of strings
"500" "57" "-" "33" ..
What function can do that for me?