Syscall-based line-editor (C, fx-9860)
4 posts
• Page 1 of 1
- SimonLothar
- Senior Member
-
- 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)
syscall 0x08DB is a fairly comfortable line-editor.
documented here: http://www.casiopeia.net/forum/downloads.php?view=detail&df_id=72
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.
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!
- SimonLothar
- Senior Member
-
- 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
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.Purobaz wrote:Is there a way to edit an expression as in Math mode ?
I'll be back!
4 posts
• Page 1 of 1
Return to Tutorials & Code Snippets
Who is online
Users browsing this forum: No registered users and 3 guests