Register

Syscall-based line-editor (C, fx-9860)

Learn how to program. Code snippets for creating sprites etc. Submit your own or use those of others.
Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Syscall-based line-editor (C, fx-9860)

Postby SimonLothar » Sat May 12, 2012 7:54 pm

syscall 0x08DB is a fairly comfortable line-editor.
documented here: http://www.casiopeia.net/forum/downloads.php?view=detail&df_id=72

Code: Select all
// instant syscalls (fx-9860)
// documented here:
// [url]http://www.casiopeia.net/forum/viewtopic.php?f=20&t=1376[/url]
#define SCA 0xD201D002
#define SCB 0x422B0009
#define SCE 0x80010070
typedef int(*sc_EE)(int, short, int, char*, char*, short, char*, int );
const unsigned int sc08DB[] = { SCA, SCB, SCE, 0x08DB };
#define EditExpression (*(sc_EE)sc08DB)
// instant syscalls

#define MAXEDITBUFFER 21
//
void G1A_main( void ){
int key;
char vBCD[24];
unsigned char sBCD[ MAXEDITBUFFER ];

   memset( vBCD, 0, sizeof( vBCD ) );
   memset( sBCD, 0, sizeof( sBCD ) );
   key = EditExpression( 0, KEY_CTRL_RIGHT, 1, vBCD, (char*)sBCD, MAXEDITBUFFER - 1, ":", 0x04 );
   
   locate( 1, 4 );
   PrintLine( sBCD, 21 );
   
   GetKey( &key );
}


BTW: vBCD contains the BCD-value of the string entered, if applicable. But this will be subject of future posts concerning CASIO BASIC-AddIn-interaction.
I'll be back!

Member
User avatar
Posts: 33
Joined: Sat Apr 07, 2012 10:08 am
Location: France

Postby Purobaz » Wed May 16, 2012 5:48 pm

Is there a way to edit an expression as in Math mode ?

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Postby SimonLothar » Wed May 16, 2012 6:18 pm

Purobaz wrote:Is there a way to edit an expression as in Math mode ?
I think it is possible to control the syscall's behaviour by changing certain system settings. I am still analyzing, which system settings are supported. If you are interested to experiment, see legacy syscall 0x4DC in http://www.casiopeia.net/forum/downloads.php?view=detail&df_id=72.
I'll be back!

Member
User avatar
Posts: 33
Joined: Sat Apr 07, 2012 10:08 am
Location: France

Postby Purobaz » Wed May 16, 2012 9:51 pm

Unfortunately, I did not find any way to display an expression in Math mode.

Return to Tutorials & Code Snippets

Who is online

Users browsing this forum: No registered users and 16 guests