Author Topic: Prizm: C Addin & CASIO Basic programs works together  (Read 16423 times)

0 Members and 1 Guest are viewing this topic.

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Prizm: C Addin & CASIO Basic programs works together
« Reply #15 on: June 14, 2011, 07:13:07 am »
Do you use 0x04DF and 0x04E0 to get and set the BASIC-variable, which you use to communicate (on 9860G)?
Do you know the corresponding syscall numbers on the fxCG?
I don't - I didn't try this on cg. But bsl knows:
const int SysCallWrapper[] = {0xD201422B,0x60F20000,0x80020070};
int (*iSysCallFuncPtr)( int R4, int R5, int R6, int R7, int FNo ) = (  int (*)(int,int,int,int,int))&SysCallWrapper;
#define PutKey(key) (void)(*iSysCallFuncPtr)( key,key<256, 0, 0, 0x0EA9)
#define Alpha_GetData(VarName,Dest) (void)(*iSysCallFuncPtr)( VarName,(int)Dest, 0, 0, 0x0034)
#define Alpha_ClearAll() (void)(*iSysCallFuncPtr)( 0,0, 0, 0, 0x0036)
#define App_PRGM() (void)(*iSysCallFuncPtr)( 0,0, 0, 0, 0x1945)
#define Timer_Start(ID) (int)(*iSysCallFuncPtr)( ID,0, 0, 0, 0x08DB)
#define Timer_Stop(ID) (int)(*iSysCallFuncPtr)( ID,0, 0, 0, 0x08DC)
#define Timer_Install(ID, handler, elapse) (int)(*iSysCallFuncPtr)( ID, (int)handler, elapse, 0, 0x08D9)
#define Timer_Deinstall(ID) (int)(*iSysCallFuncPtr)( ID,0, 0, 0, 0x08DA)

Offline bsl

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 157
  • Rating: +14/-0
    • View Profile
Re: Prizm: C Addin & CASIO Basic programs works together
« Reply #16 on: June 14, 2011, 09:57:23 am »
Here is another, not in the demo, but necessary to complete communication between Basic and C:
#define Alpha_SetData(VarName,Src) (char)(*iSysCallFuncPtr)( VarName,(int)Src, 0, 0, 0x0035)

Some other untested syscalls, I have found:
Setup_GetEntry 0x0489
Setup_SetEntry 0x048B
Alpha_ClearAllAndAns 0x0A8C
« Last Edit: June 15, 2011, 09:48:46 pm by bsl »

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Prizm: C Addin & CASIO Basic programs works together
« Reply #17 on: June 14, 2011, 12:28:31 pm »
Here is another, not in the demo, but necessary to complete communication between Basic and C:
#define Alpha_SetData(VarName,Src) (void)(*iSysCallFuncPtr)( VarName,(int)Src, 0, 0, 0x0035)

Some other untested syscalls, I have found:
Setup_GetEntry 0x0489
Setup_SetEntry 0x048B
Alpha_ClearAllAndAns 0x0A8C
I added your "Alpha_" findings to my CHM-file (with a proper reference, of course). THX.

But 0x0489 and 0x048B are some BCD-routines, which check a BCD-number's error state.
Setup_GetEntry is 0x0031 and Setup_SetEntry is 0x0032. In the first place I used different names, which was misleading. Sorry.
I changed them to the old naming convention at once.
« Last Edit: June 14, 2011, 12:29:40 pm by SimonLothar »
I'll be back.