| View previous topic :: View next topic |
| Author |
Message |
mad3d
Joined: 18 May 2006 Posts: 6
|
Posted: Thu Mar 22, 2007 11:50 am Post subject: How to set Kernel mode in asm ? |
|
|
| Is there any source out there that I could check? |
|
| Back to top |
|
 |
Saotome

Joined: 03 Apr 2004 Posts: 182
|
Posted: Thu Mar 22, 2007 5:34 pm Post subject: |
|
|
Does it have to be asm?
from ps2cam_rpc.c :
| Code: |
...
DI();
ee_kmode_enter();
iop_addr = (int *)(0xbc000000+ret[1]);
memcpy(&campacket[0],iop_addr, ret[0]);
ee_kmode_exit();
EI();
...
|
_________________ infj |
|
| Back to top |
|
 |
mad3d
Joined: 18 May 2006 Posts: 6
|
Posted: Fri Mar 23, 2007 9:31 am Post subject: |
|
|
thanks a lot
but Im looking for asm way. |
|
| Back to top |
|
 |
cloudhunter
Joined: 17 Aug 2006 Posts: 86
|
Posted: Fri Mar 23, 2007 9:41 am Post subject: |
|
|
| mad3d wrote: | thanks a lot
but Im looking for asm way. |
Forgive me if this isn't possible, but why not compile some code setting to kernel mode, and then disassemble it to see what it looks like in ASM?
Why does it specifically need to be in asm anyway? The PS2 SDK supports ASM embedded inside the C++ code.
Cloudy _________________ :) |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Fri Mar 23, 2007 4:31 pm Post subject: |
|
|
Go look at ee_kmode_enter, it's all inline asm anyway.
ps2sdk/ee/kernel/include/kernel.h |
|
| Back to top |
|
 |
|