Stack based task switching
Posted: Mon May 12, 2003 12:56 pm
Oooooyy, imagine, today, I've managed to get stack task switching running. that's but a cool and smooth thingy, lads. I just had to get some things straight and soon after that, I've coded even a small system call interface (for driver tasks to call BLOCK at the moment)
Nevertheless, One question troubled me with heavy headache, for I want to have the isr-stubs work directly with the structure of the actual process. (it is a pointer called prozess_t *p) In the type prozess_t, there is at the very beginning one field called prozess_esp, in which I store the actual position of esp. But this didn't work as I intended for this thing is a pointer.
Given this, I got the adress of the pointer by saying:,
instead of the value of the first 4 bytes stored in this procedure, as I expected. so this question arouse:
How do I access members of a structure by a pointer - in assembler. BTW I use nasm.
thanks for your help, lads. Would be nice if you could bring light uon this miracle.
stay safe
Nevertheless, One question troubled me with heavy headache, for I want to have the isr-stubs work directly with the structure of the actual process. (it is a pointer called prozess_t *p) In the type prozess_t, there is at the very beginning one field called prozess_esp, in which I store the actual position of esp. But this didn't work as I intended for this thing is a pointer.
Given this, I got the adress of the pointer by saying:
Code: Select all
mov eax,[p]
instead of the value of the first 4 bytes stored in this procedure, as I expected. so this question arouse:
How do I access members of a structure by a pointer - in assembler. BTW I use nasm.
thanks for your help, lads. Would be nice if you could bring light uon this miracle.
stay safe