Register

Search found 606 matches

Return to advanced search

SimonLothar
Fri May 11, 2012 1:27 pm
 
Forum: Casio fx-9860 SDK
Topic: Casio Basic to SDK
Replies: 65
Views: 150645

If you want to clear the screen, use Bdisp_AllClr_VRAM() int AddIn_main(int isAppli, unsigned short OptionNum) { unsigned char buffer[ BUFFERSIZE ]; Bdisp_AllClr_VRAM(); // clear the screen while(1) { // infinite loop locate( 1, 1 ); . . . to support the DEL-key you have to enter some code, which pe...
SimonLothar
Fri May 11, 2012 7:37 am
 
Forum: Casio fx-9860 SDK
Topic: Casio Basic to SDK
Replies: 65
Views: 150645

Now we will encapsulate the input as function (I still cannot test the code. I hope it works.) int myinput( unsigned char*buffer, int maxsize ){ unsigned char c; int key; int index=0; int lcontinue = 1; while( lcontinue ){ GetKey(&key ); switch (key){ case KEY_CHAR_0 : case KEY_CHAR_1 : case KEY_CHA...
SimonLothar
Fri May 11, 2012 5:57 am
 
Forum: Casio fx-9860 SDK
Topic: Casio Basic to SDK
Replies: 65
Views: 150645

Ya its working fine. Next tutorial? Now we could try basic input/output (I have no SDK here, so I couldn't test the code) unsigned char c; int key; while( 1 ){ // start an indefinite loop GetKey( &key ); // wait for some key to be hit if ( ( key < KEY_CHAR_0 ) || ( key > KEY_CHAR_9 ) ) break; // qu...
SimonLothar
Thu May 10, 2012 2:22 pm
 
Forum: Casio fx-9860 SDK
Topic: Casio Basic to SDK
Replies: 65
Views: 150645

nagarajan wrote:Its with the Print("Hello World"); statement.

Try
Print( (unsigned char*)"Hello World" );
SimonLothar
Thu May 10, 2012 6:02 am
 
Forum: Casio fx-9860 SDK
Topic: Casio Basic to SDK
Replies: 65
Views: 150645

Let's start with

Locate 5,4,"Hello world."

with CASIO SDK it would be

Code: Select all
unsigned int key;
  locate( 5, 4 );
  Print( "Hello world." );

  Getkey( &key );   // wait for any key


you can insert the code into the body of addin_main and see if it works.
SimonLothar
Wed May 09, 2012 8:35 am
 
Forum: Casio fx-9860 SDK
Topic: Casio Basic to SDK
Replies: 65
Views: 150645

Which SDK do you use?
Are you familiar with syscalls already?

BTW: I moved your post. When we have first results, we will start a thread in "Tutorials and Code Snippets".
SimonLothar
Tue May 08, 2012 5:46 pm
 
Forum: Tutorials & Code Snippets
Topic: Fx-9860 battery indicator (C)
Replies: 21
Views: 71859

The following code fetches the pointer to the function GetMainBatteryVoltage (iGBS in the code of the previous post) OS-independently (fx-9860-OSes; verified with versions 1.03, 1.04, 1.05, 1.10, 1.11, 2.00, 2.01 and 2.02): // int GetMainBatteryVoltagePointer(){ unsigned int ea; unsigned int...
SimonLothar
Tue May 08, 2012 4:57 pm
 
Forum: Casio fx-9860 SDK
Topic: Addin Restart routine
Replies: 16
Views: 45983

APP_EnableRestart()

An OS-independent implementation for the legacy OSes up to 2.01 would be: short*APP_EnableRestart(){ unsigned int ea; unsigned int j; short*pEnableRestartFlag; if ( OSVersionAsInt() < 0x02020000 ){ ea = *(unsigned int*)0x8001007C; ea += 0x0490*4; ea = *(unsigned int*)( ea ); j = *(unsigned char*)( e...
SimonLothar
Tue May 08, 2012 7:37 am
 
Forum: Casio fx-9860 SDK
Topic: Casio Basic to SDK
Replies: 65
Views: 150645

An interesting approach.
Generally a G1A is able to do everything, a BASIC-program can do.
Though, a project like "CASIO-BASIC-program-to-some-C-source-converter" could flood the banks.
And it will take some time.
Perhaps you should post your program, please.
SimonLothar
Tue May 08, 2012 6:14 am
 
Forum: Casio fx-9860 SDK
Topic: Addin Restart routine
Replies: 16
Views: 45983

OSVersionAsInt

// int OSVersionAsInt( void ){ unsigned char mainversion; unsigned char minorversion; unsigned short release; unsigned short build; GlibGetOSVersionInfo( &mainversion, &minorversion, &release, &build ); return ( ( mainversion << 24 ) & 0xFF000000 ) | ( ( minorversion << 16 ) &am...
PreviousNext

Return to advanced search