_________ SWAT MAGAZINE ISSUE EIGHTEEN: JUNE 1999 __________ / \___________________________________________/ \ / .Hacking calculators. \ / By -=The Firestarter=- and Unknown Guest \ ----------------------------------------------------------------------- Yeah i know what your all thinking, "hacking calulators? what the fuck is this guy on?" or something similar. Well this one was a request, since i knew about calculator virii and such like i knew that the guy how asked for this wasn't taking the piss. So anyway, i searched the net for information, not much luck. So i asked Unknown Guest to carry out the research, he found a site that had a lot of good information on it, so i got him to download the whole site and send it to me via ICQ. Well, i went over the site and here is basically what i can find out on calculator hacking, and that's a fucking lot! Well for a start it's a new type of hacking that i had to learn about, no your not going to be able to break into the CIA's or MI6's computer networks with your 'leet calculator hacking skills, but i suppose that you can have some fun with it. What you can do is to run simple programs on the calculator, maybe some games (not Half life or Quake, but connect 4 and battleships), load up some pictures, hell you can even play music! I bet that you never knew your Casio calc could do all that! Well here's some info on it (most of it ripped from the site that unknown guest downloaded for me): Programs needed: ~~~~~~~~~~~~~~~~ For a start you need a program that can send information to the Casio 9850, the program recommened it called CaS, and will appear in the files library on www.swateam.org ASAP under the hacking section. CTF: ~~~~ CTF (or calculator text format) is described as a new open text format for calculator data. It is designed to be able to store any type of data sent from the calculator, but especially programs. There are three documents on CTF (that where found), i will paste them in here for you to all read: CTF Technical Specifications Release pre-1 (Revision A) 97/02/25 By Tom Wheeley ----------------------------------------------------------------------------- Table of contents. 0 Rationale 0.1 Other formats 0.1.1 Arbitrary text standards 0.1.2 Screenshots 0.1.3 Link-Up format 0.1.4 .CAS format 0.1.5 .CAT format 0.2 Extensibility 0.3 Portability 0.4 Terminology 0.4.1 Calculator names 0.4.2 Tokens 1 Block structure 1.1 Currently supported blocktypes 1.1.1 @@Prog header 2 Data formats 2.1 Programs and Editor files 2.1.1 Program header (OldProg) 2.1.2 Program header (Editor) 2.1.3 Data format (OldProg and Editor) 2.1.3.1 Syntax 2.1.3.2 Token choices 2.1.3.3 Modifications for increased usability 2.1.3.4 Token separation 2.1.3.5 ctoken specification 2.1.3.6 Comments 2.1.3.7 Preprocessor 2.2 Text 2.3 Raw data 3 Other Issues 3.1 Implementation 3.2 More information 3.3 Credits ----------------------------------------------------------------------------- 0 Rationale ===================== One of the main problems with Casio calculator programs is that they are hard to represent on a normal computer. Although some of the special symbols available on the calculator can be represented on some systems (for example the squared symbol is in DOS), these are not compatible with all systems. Hence, a standard for writing programs should stick to the basic printable ASCII character set. 0.1 Other formats ~~~~~~~~~~~~~~~~~~~~~~~~~ Many other standards have been used to represent calculator programs, but many of these are arbitrary or proprietary. Others are well specified, but are not as well suited for typing in by humans. 0.1.1 Arbitrary text standards These proliferate on the internet, where people have tried to represent the programs they have written in a text form for easy downloading and entering into the calculator. They are unsuitable for several reasons: * They cannot be accurately parsed by a computer program * They must be fully documented either in the program file or with an accompanying web page or document. * The standards used vary from site to site, and thus users have to get used to a large number of variations. 0.1.2 Screenshots Some people have decided to present their programs as a series of catenated screenshots. Whilst these are easy for people to read, they are unsuitable for programs and cannot be viewed by people without graphical terminals. The image size is generally larger than the corresponding text file would be, leading to slower download times, and wasted disk space. Screenshot representations are also harder to produce from the calculator program than text files, and can only be realistaclly achieved using a cable. 0.1.3 Link-Up format The link up format (where all tokens > length 1 are enclosed using $ signs, whilst easy to parse by a machine, is relatively unreadable by people, and even more difficult to type. 0.1.4 .CAS format The format used by Casio's CASIOLNK software for the 7700, 8700 and 9700 is a binary format based on the calculators internal representation of the data. This works well for programs to read and understand, but it is unreadable by humans without special software. The newer style CAS format used by the 9850 programs is even better as it allows for storage of multiple types of data, but the formaer caveat still applies. 0.1.5 .CAT format This is the format used by the LINK software released by Casio for the 9750, 9850 and 9950 range of calculators. It is similar to CTF, in that it uses a set of plain text tokens, but it requires the usage of a `\' before all tokens. This makes the text files very hard to read and difficult to type, although as with the link-up format, it does make the text easier to parse. 0.2 Extensibility ~~~~~~~~~~~~~~~~~~~~~~~~~ A vital feature of CTF is extensibility, so that it may be added to in order to support new models of calculator, or new data formats which have been deciphered. To support this, CTF is a block structured format which compartmentalises the individual data items into separate blocks. Any blocks which are not understood by the software reading them can be ignored, and any readable data after them can still be read. CTF has already been extended to cope with the new 9850 data formats and new tokens, and it should theoretically be possible to add support for the Texas Instruments range of programmable graphical calculators also, should the need arise. 0.3 Portability ~~~~~~~~~~~~~~~~~~~~~~~ CTF must be as portable as possible. In that respect, *all* data within CTF must stick to the printable ASCII character set: chars 10,13,32-126. Programs which read CTF should be able to cope with DOS (CRLF), Unix (LF) and Apple Macintosh (CR) style newlines without complaining. 0.4 Terminology ~~~~~~~~~~~~~~~~~~~~~~~ 0.4.1 Calculator names Currently, there are two main families of calculator marketed by Casio. I am only mentioning the models available in the UK, but similarly numbered calculators are equivalent in other countries. The first family is the fx7700, fx9700 and CFX-9800 calculators. I will refer to this family as being the 9700-style calculators. Secondly, there is the new range of calculators, the fx9750, fx9850 and fx9950. These are characterised by the new structured additions to the programming language, and are referred to as 9850-style calculators. 0.4.2 Tokens Tokens are any single letter or function name present on the calculator. for example, `X', `log ', ` ' and `Graph Y=' are all tokens. Every token on the calculator is referred to by a code called a `ctoken'. This is similar to the encoding used inside the calculator, but uses a simpler coding scheme. 1 Block structure =========================== The most important information regarding CTF for programmers is the correct handling of the block structure. Strictly speaking, a program which simply handles the blocks and nothing else is CTF-compliant. Blocks are specified as follows: @@Blocktype Name (Parameters) Typical commonly used examples are: @@Program "MYPROG" ; specifies a 9700 editor file / 9850 program @@Program A (sd ssto) ; specifies a 9700 program, with the ; `standard deviation' and `store stats' bits set The string `@@' must be in the left 2 columns of the screen to represent the beginning of a new block. Blocks must *not* contain the string @@ at the beginning of any line. If a block is unsupported, then the program should either ignore the block until it reaches another `@@', or read it in as plain text. Matching of blocktype names is case insensitive, so @@OldProg, @@oldprog and @@oLDPRoG should all work. 1.1 Currently supported blocktypes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@OldProg ; Programs A-Z,r,theta and single programs on the 9700. @@Editor ; 9700 Editor files / 9850 programs. There are two other types designed to deal with unknown data: @@Text ; plain text -- can be used to enter instructions for use ; of the programs / data @@Raw ; designed to hold raw binary data read from .CAS files. Future types may include: @@SSMono ; monochrome screenshot @@SSCol ; colour screenshot @@Vars ; variable memories @@Matrix ; matrix @@List ; list 1.1.1 @@Prog header Due to possible confusions over the OldProg and Editor types, these are encapsulated within the umbrella @@Prog type. The actual type of an @@Prog header can be ascertained from the Name as follows: @@Prog ; OldProg @@Prog A ; OldProg @@Prog "EDITOR" ; Editor Programs which write CTF should use @@Prog. People writing CTF should be strongly encouraged to use @@Prog. A synonym for @@Prog is @@Program. The two may be interchanged freely without changing the syntax of the CTF file. 2 Data formats ======================== 2.1 Programs and Editor files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2.1.1 Program header (OldProg) The 9700 series of calculator support two types of program transmission. The first, called `Single Program' does not specify a slot in the data type, but the program can be positioned in the A-Z,r,theta range manually by the user. The second is `Multiple Program' and the entire set of programs is sent at once. For multiple programs, a slot must be set in the header, thus: @@Prog Z Note that the program letter must be in upper case, so as to distinguish between Prog R and Prog r. The other set of information conatined about a program is the mode for which the program runs. This is organised as a bitfield, for which certain bits can be set. These bits can be set by entering keywords into the parameter field. The keywords are case-insensitive and are: BASE-N Program runs in base-n mode SD Standard Deviation mode LR Linear Regression mode MATRIX Matrix mode SSTO Store statisitics data SDRAW Draw statistics graph These can be combined using a space as a delimiter, eg: @@Prog r (LR sSto sDraw) 2.1.2 Program header (Editor) The header for an Editor file is simpler, as there is much less information stored. The syntax is: @@Prog "FILENAME" (PASSWORD) The maximum length for the filename / password is 12 characters for the 9700 family, and 8 characters for the 9850 family. Longer filenames / passwords will need to be truncated. Note that the data and the password are both unencrypted in a CTF text file. Of important note is that the filename and passwords must be parsed as a line of tokens, not as a line of ascii text, as they are of course made up as a set of tokens within the calculator. Only a very limited range of tokens are allowed in filenames and passwords, the uncomfirmed list for the 9700 (and probably rthe 9850 too) is: A-Z 0-9 "'[ ]+-*/~ r and theta. Note that +-*/ mean the arithmetical operators, _not_ the ascii symbols used here as a representation. (There is a difference) 2.1.3 Data format (OldProg and Editor) Perhaps the most difficult and important section of the CTF specification is the specification of program data. In the calculator, the program is stored as a series of byte codes, from which the ctoken numbering system is devised (the actual encoding of tokens is beyond the scope of this document, see the .CAS file specifications for more information). What is important to CTF is the translation of textual tokens to and from ctoken numbers. 2.1.3.1 Syntax CTF programs are made up of a series of tokens, separated by any amount of whitespace, except within "strings" where space (ascii 32) is an actual token in its own right. Note that tokens may also be separated by *no* whitespace whatsoever: is equivalent to TAB Tokens may contain any character permitted by the general outline of the CTF format, ie printable ASCII. Also of note is that newlines can and are parts of tokens and should be handled as such, not hardcoded as special cases in the CTF accessing program, as any token can include a newline in it. (A prime example of this is the disp triangle token) Unlike most of the CTF format, program tokens are case sensitive. This is to enable differentiation between upper and lower case letters and to enable accurate matches for tokens within strings. This strict handling of whitespace means that care must be exercised both when defining the set of tokens used for programs, and when reading CTF program data. To standardise the output of algorithms used to match the data, at any point whilst reading data, the token matched should be the longest token possible starting from that point. Thus: `RePlot' will match to be `ReP'`l'`o'`t' rather than `R'`e'`Plot'. Lines of program data *should* be less than 80 characters wide. Implementors should try to use algorithms which can cope with infinite line length, but a reasonable minimum maximum is 255 characters. 2.1.3.2 Token choices This section is not intended as a list of tokens, but merely to outline the guidelines which were followed in creating the token table. 1) All text-only tokens (eg `cos') are typed exactly as on the calculator 2) Various symbols were chosen for commonly used operators; eg +-*/ for the basic arithmetical operators, (-) for unary negate, % for fraction delimiting and _ for the disp triangle token. 3) Symbols which exist on the calculator but are used in rule 2) are permitted, but preceeded with a backslash. This is used for symbols such as `/' which are not commonly used on the calculator. 4) All other tokens which are not easily represented using the ASCII character set are given a descriptive name and preceeded with a backslash. Note this includes tokens such as \asin for arcsin. An important feature of tokens in CTF is that they include the implicit space as well as the text which makes up the token. For example, the token `Abs' is in fact `Abs ', whereas the token `Rnd' is still `Rnd' as that has no trailing space on the calculator. 2.1.3.3 Modifications for increased usability Although all CTF programs should output the standard tokens mentioned above, keeping to exact capitalisation and spacing is too much to ask for the user, so when reading CTF program data two exceptions can be made: 1) The token may be typed entirely in lower-case (except for variable names A-Z, and variable names in tokens, such as `graph Y='). 2) The trailing space may be omitted. 3) For the more commonly used tokens such as \asin and \sqrt, the preceeding backslash may be omitted. The above rules are *not* followed if the token is within a string in the program, as there the text "logical" would be read as "log ical" as the `log' at the beginning would be matched. However, if the user had the text "Linear", then the `Line' would be matched, and would result in no discernable difference to the program other than smaller size, so this matching is encouraged. 2.1.3.4 Token separation Although very unlikely (I have never encountered a case), the CTF program data specification allows for tokens to be manually separated to ensure correct parsing. For example the semantically incorrect token pair: `-'`>' would be interpreted as meaning `->' (assignment arrow). In a program this can be separated by a space (and cause an error in the program), but this option is not possible in a string (where the combination is legal) where a space would be undesirable. Hence in this situation the token separator `|' would be used: "-|>" which will match to `-'`>' rather than `->'. 2.1.3.5 ctoken specification If for some reason a specific ctoken number is wanted in the code when sent to the calculator, this number can be sepcified in the CTF data using the syntax: @bnnn where b is the base and nnn is a three digit number (must be padded with zeros if smaller than 100 in the base b). Legal bases are: d decimal h or x hexadecimal o octal and the number must be in the range 1 <= n <= 767. For example, to obtain a `|' character on the calculator screen the ctoken number must be expressly declared, as the `|' character is already used as a control character in CTF. The ctoken code for `|' is 124, so the token: @d124 evaluates to a `|' character. 2.1.3.6 Comments In addition to the calculator's own comments, CTF supports two types of comment which should be ignored by any software reading a CTF file. The exact definition of the comments may vary between data types, so comments will be defined for each data type, rather than globally. In general, the comment characters are # and ; Stylistically, # should be used for block comments with the # at the beginning of each line. ; should be used for single line comments on the end of lines with data on. In Program Data, both ; and # are legal tokens, so they are only deemed to start a comment if they are preceeded by a space, tab or newline. This definition works well for program sections as # is only used in the token `Ran#' and `;' is generally used straight after the number it is referring to (used to denote frequency in statistics modes). However, it breaks down in strings as the `#' is often used for visual impact, and can easily be used with a space before it. Thus comments cannot start on lines which have an unclosed string. eg: # example of comment problems "text1" ; this is a legal comment "text2 ; this is part of the text! more text2" ; this is a legal comment 2.1.3.7 Preprocessor Although not defined yet, various pieces of syntax for a preprocessor are built into the CTF format. Modelled basically on the C preprocessor, it will include such commands as: $define variable value $ifdef variable $else $endif $ifndef variable $warning text $error text as well as perhaps: $define variable z $if ${variable} == y $error z==y $endif Defines can be accessed in code similarly to Makefiles and shell variables: Range 1,${_scrwidth},0,1,63,0 is an example which would allow portability between 7700 and 9700 graphical programs. (with other code, obviously). The $ifdef will allow things like $ifdef _9850+ 0->A~Z $else Mcl $endif Various predefines (with leading underscore) should also be included in the software used, eg: Models _7700 _7700+ _9700 _9700+ _9800 _9800+ _9850 _9850+ _9950 _9950+ Capabilities (derived from model info by CTF software) _colour _color _matrix _complex _scrwidth _scrheight _array _list This is the section of CTF I am most uncertain about as I have not implemented it in software myself, so I haven't run into any problems in the standard which might require changing. The main aim behind the preprocessor segment of CTF is to encourage portable programs which will instantly transfer to the widest range of calculators. The problem with the preprocessor is that it may confuse users entering programs by hand, especially if there is a lot of trickery. 2.2 Text ~~~~~~~~~~~~ Text is a very simple format and can be regarded as providing a way of including large `comments' in a program. The Text blocktype is intended for CTF programs to use as a default type for blocks it doesn't understand, but it should be useful for users to be able to use the type directly. A CTF reading program should simply read in the lines of text as they are and either discard them or store them depending on what the action of the program is. As for all blocks, a Text block ends on a line beginning with @@. Care should be taken that no line of text starts with this either. Comments are meaningless in text blocks. 2.3 Raw data ~~~~~~~~~~~~~~~~ Raw is a datatype invented to cope with receiving unknown data from a calculator, yet still allowing CTF to cope with all data possible. In order to stay within the condition that all of CTF must be printable, the raw binary data is translated into a hex dump. This allows not only easy reading and writing, but also allows calculator hackers to edit the binary data and send it back to the calculator. The exact format of Raw data is undetermined at this point. A useful raw datatype would be one which generates checksums on the fly rather than including them in the data. Headers and data blocks from the calculator transmission should also be in separate blocks. Generally the data should be arranged in lines of 16 bytes: 34 f5 38 fd ... (16 hex pairs) Any text after the 16 hex pairs representing each byte is ignored, so CTF outputting programs would be perfectly at liberty to add a 16 character wide text conversion of the data, as used in the DOS program `debug' for example. 3 Other Issues ======================== 3.1 Implementation ~~~~~~~~~~~~~~~~~~~~~~~~~~ * Model The token<->ctoken translation differs for different calculator models, even within the same series, so CTF reading programs will need to know the model for which they are working for. 3.2 More information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ More information on Casio Calculator Hacking, and the Calculator Text Format can be found on the Word Wide Web at: http://www.york.ac.uk/~tw104/casio/ 3.3 Credits ~~~~~~~~~~~~~~~~~~~ Tom Lynn For making life difficult Roy Maclean For ideas Magnus Werner For ideas and the Casio Calculator Mailing LIst Casio corporation For making life difficult CTF Specifications and User Guide INTRODUCTION Rationale One of the main problems with Casio calculator programs is that they are hard to represent on a normal computer. Although some of the special symbols available on the calculator can be represented on some systems (for example the squared symbol is in DOS), these are not compatible with all systems. Hence, a standard for writing programs should stick to the basic printable ASCII character set. Other formats Other standards used to represent programs are often not designed for reading by machines, as most programs were expected to be laboriously typed in by hand. Some formats are similar to the CTF format but with ambiguous symbols (for example 'e' meaning 'lower case e' as well as 'exponential'). Other people have released programs as pictures of the code, often created as a series of screenshots from the calculator. This method is especially unsuitable as it is very difficult for a computer to understand the picture, and cannot be viewed on text-only terminals. The format used by Casio's original CASIOLINK software is the .CAS format which is effectively a dump of the serial transmission. This is easy for machines to read, but is unreadable for humans without special software. History Casio Text Format is the format I developed to use with my software CaS, (which converts between various formats, and communicates with the calculator) and has changed with improved versions of CaS. The standard has since been improved through discussion on the mailing list set up by Roy Maclean and now maintained by Magnus Werner. PROGRAM TEXT SPECIFICATION AND USE Casio Text Format files should have the extension .ctf Word tokens Generally, Casio Text Format files should be written exactly as they would appear on the calculator. This is true for all symbols (hereafter referred to as tokens) such as 'Plot','Line','Cls' and so on. In the Casio calculator, all the 'functions' such as Plot and Line etc are not spelled out as 'P', 'l', 'o', 't'; but instead are referred to by a single number (henceforth called a ctoken). Thus the text 'P', 'l','o', 't' is interpreted to mean 'Plot'. Symbolic tokens For many common tokens, there is no direct ASCII equivalent, e.g. the sign for assigning a value to a variable. In these cases, the Casio Text Format uses a token which either appears similar to the calculator symbol or which denotes the meaning of the symbol. For example, the arrow used to assign a value to a variable is represented by `->'. Common symbolic representations are: -> assignment => 'then' in comparison statements _ - Disp - triangle thing (at end of line) >= greater than or equal to <= less than or equal to <> not equal to * multiplication / division % fraction delimiter (a%b%c=a+b/c) ^ power (x^y) Descriptive tokens Where a symbolic representation of a symbol is not possible without confusion of meanings, it is represented by a token which defines its action, rather than its appearance. These are usually preceded by a backslash `\' character. Common representations of tokens in this way include: \sqrt square root \cbrt cube root \nrt nth root (xth root on calc) \^-1 reciprocal \sqr or \^2 squared \f1 function memory 1 \A to \F hexadecimal digits A to F \r variable `r' (meaning radius) \th variable `theta' (meaning angle) Examples: Pythagorus's theorem: \sqrt (A\sqr + B\^2) -> C Odd or Even : A/2 = Int(A/2) => "Even" Note that variables (except r and theta) must be in upper case, but you can use lower case letters in text strings. Text strings containing lower case can only be used in program mode when sent to the calculator from the computer via a cable, as lower case characters can only be entered manually to calculators in editor mode. However, even when using a fx7700 which does not allow user-entered lower case at all, it is possible to use lower case when using a cable. Separating tokens It is always possible that a combination of tokens will be meaningful as a third token, and interpreted as such when the two separate tokens are what is desired. In these cases, tokens may be separated using a pipe character | . eg asin is the arcsin function, but 'a|sin' is 'a','sin'. Comments As well as standard Casio ' comments, it is possible to enter comments into Casio Text Format files. Unlike Casio comments, these are not parsed and sent to the calculator, and can therefore be longer without using valuable memory. Comments are delimited using either the hash '#' or semi-colon `;' after a space, newline or tab, and may be placed in most places. Note that as both are valid tokens in their own right, there are a couple of nuances: Lines beginning with either are comments Lines with `;' or `#' following whitespace are treated as comments Comments within strings are treated as text! Note also that all whitespace at the end of a line is stripped, including that in text. If you need in text, use the '\n' token to denote where the spaces end. (CTF allows both '' and '\n' to mean a single newline). Spaces, cases and strings Parsing of Casio Text Format files changes in many ways depending on the basic context of the text. This is to allow plenty of leeway for programs, whilst enabling exact formatting in text strings. Spaces Spaces in program sections of programs are generally ignored, only serving to clarify the code (see the style guide) and also to split tokens. Verbatim tokens When in strings and calculator comments, word tokens only match if the exact text as shown on the calculator is presented. Generally, this means that some of the abbreviations in CTF will not work, and that capitalisation and trailing spaces are important. For example, the token `Lbl ' (program label) has a capitalised L and also a trailing space. Thus in a string, only that text will match the token. (presenting no discernable visual difference to the sequence of letters, but saving memory) In a program context, 'Lbl', 'lbl' and 'lbl ' will all also work. The advantage of this technique is that exact token matches will be used in strings, saving memory, whilst programmers' style is left uncramped. Bypassing tokens Sometimes, power Casio users may need to specify the exact code for a token, rather than the token itself. This is posible using ctokens special codes used to refer to every possible token. Casio calculators support up to 767 such ctokens, depending on version (7700, 9700 and 9800 only support up to 511), and these can be specified in decimal, hexadecimal or octal using the @ sign. eg: @d208 would insert a pi symbol (π) into the program (as 208 is the ctoken number for \pi) To use either octal or hexadecimal in the number, replace the 'd' with 'o' or 'x' respectively. The actual number must consist of 3 digits, so it should be padded with leading zeros where necessary. This feature is needed for the '@' and '|' tokens (@d064 and @d124), both of which have special meanings in CTF. This will not confound people entering programs by hand, as neither '@' nor '|' can be entered into the calculator! SETTING THE FILE TYPE The Casio calculator supports many different modes of data to be sent via the serial cable, and all of these can be stored in Casio Text Format files. Program modes The default file type in a Casio Text Format file is a standard COMP Single Program file. (NB. This type is not compatible with the fx9850 or fx9950 calculators) To specify the program type, a program header is placed before the program: @@ Prog (sd ssto) The words in the parentheses specify the program type: Base-N Base-n program (mode 2) SD Single variable statistics (mode 3) LR Bivariate statistics (mode 4) Matrix Matrix mode (mode 5) SSto Store statistics data (option) SDraw Draw statistics graph (option) Capitalisation is not important. Multiple program files To specify a multiple program file, precede each program with a program header, specifying a name: @@ Prog A () "Hello" Prog B @@ Prog B (Base-n) "World" If you specify the same program twice in a file, the result is implementation dependant. Editor files and 9850 programs For even a single 9700/9800 Editor file or a 9850/9950 program, a filename and an optional password are specified: @@Prog "filename" (password) The filename is parsed as a set of tokens, as some of the characters used in filenames (eg '+', '-' and theta) are either not their ASCII equivalents or are more than one character long (eg '\th') in CTF. More than one editor file can be placed in a single text file, by simply putting a new editor file header in front of each 'file'. You can mix any type of data in a CTF file, be be warned that not all combinations can be transmitted to the calculator, depending on the software used. The next version of CaS will certainly be far more flexible in this matter than 1.0.x. currently is. Preprocessor Although not defined yet, various pieces syntax for a preprocessor are built into the CTF format. Modelled basically on the C and Turbo Pascal preprocessors, it will include such commands as: $include "filename.ctf" $define variable value $ifdef variable $endif Defines can be accessed in code similarly to Makefiles and shell variables: Range 1,${scrwidth},0,1,63,0 is an example which would allow portability between 7700 and 9700 graphical programs. (with other drawing code, obviously). The $ifdef will allow things like $ifdef _9750+ 0->A~Z $else Mcl $endif Various predefines (with leading underscore) should also be included in the software used, eg: Models _7700 _7700+ _9700 _9700+ _9800 _9800+ _9750 _9750+ _9850 _9850+ _9950 _9950+ Capabilities (derived from model info by CTF software) _colour _color _matrix _complex _scrwidth _scrheight This is the section of CTF I am most uncertain about as I have not implemented it in software myself, so I haven't run into any problems in the standard which might require changing. The main aim behind the preprocessor segment of CTF is to encourage portable programs which will instantly transfer to the widest range of calculators. STYLE GUIDE Virtually every function can be specified using its name in lowercase; except (eg) 'graph Y=' as the Y represents a variable, which are always referred to in uppercase. Every token should also be enterable with the same capitalisation as on the calculator. Remember that most whitespace is ignored, so you should use this to create more legible files as well as allowing the indenting of code. Remember that statements must still be separated by ':', '_' or a newline! Use Comments wisely! Code level comments should be on the same line as the code they comment, preferably using a semicolon ';'. Comments which divide a program into blocks should be on a line of their own, marked with a hash symbol '#' at the beginning of each line. The wide range of tokens is a privelige, not a right; and so should not be abused towards the obfuscation of your code! :-) Programs should try to stick to the core CTF tokens, and preferably those symbols which can be entered directly into the calculator, without requiring a cable. EPILOGUE Tokens The canonical list of Casio Text Format tokens is in the file 'ctf_tkns.txt'. A complete list of tokens supported by CaS is in the file 'ascii.tok' Notes for implementors CTF is a free standard, and anyone is welcome to write a program which uses it for any purpose. I will field any detailed questions regarding the format, and programmers are welcome to use the files token.c and ftxt.c from the CaS distribution if they comply with the CaS license (GPL). It is essential when machine-reading CTF to specify the target calculator, as the codes used to send the data to the calculator are sometimes reused or renamed between models. People interested in developing the CTF standard should join the CTF arm of the casio calculators mailing list. See http://www.abc.se/~m9935/casio/ for more information. Updates There are bound to be flaws in the specification of CTF or in the choosing and flagging of token names. If you find anything let me know by email at . Follow these pages for information and updates to the Casio Text Format, CaS and Castle. Credits Tom Lynn for help with picking tokens. Magnus Werner, Hidetake Jo, Roy Maclean for passively giving me ideas for the format Roy Maclean for running the casio calculator mailing list. CTF Token List By Tom Wheeley Portions Tom Lynn Karl Skontorp Magnus Werner Roy Maclean Last updated: 97/1/23 Note ==== This is a very rough list at the moment, taken mainly from the ASCII.TOK file which is part of CaS. The newest version of ascii.tok can be found at: http://www.york.ac.uk/~tw104/download/download.html or directly at ...download/ascii.tok I still have not even *seen* a 9850, let alone played on one, so the 9850 section is not as complete as I would want it to be, especially w.r.t. details such as spaces and capitalisation. Many thanks to Karl Skontorp anyway for providing me with the info I do have. List of preferred tokens ======================== Where the preferred token is inadmissable in a string, an alternative that is is given in "quotes". 9700 and below tokens ~~~~~~~~~~~~~~~~~~~~~ I have not distinguished between 7700 and 9700 tokens, but this should be done. It's only things like the MATRIX and complex operations, iirc. standard tokens description Symbols A to Z upper case letters and variables A-Z a to z lower case letters \r \th r and theta + - * / plus minus multiply divide operators (-) Unary - _ (newline) disp triangle thingy (newline) or \n newline -> assignment arrow => `then' arrow used in conditionals <= <> >= < = > inequality operators \f1 to \f6 function memories f1 - f6 \A to \F hexadecimal numbers 0xA to 0xF # $ \% & \* \/ \_ ` { } @ punctuation. \/ is / Care should be taken with # and $ as these are also used by the CTF format. ' " ( ) , . ; : ? [ ] ~ various calculator operators. note that a ; with a space before it is a comment delimiter! Ans Answer memory % fraction delimiter \exp Exponent ^ x^y \dms \. degrees minutes seconds separator \pi Pi Mcl Rnd Scl Defm Control \yen Yen symbol Scientific functions sin cos tan sin cos tan trig functions arcsin arccos arctan inverse trig sinh cosh tanh hyberbolic functions arsinh arcosh artanh inverse hyperbolics ln log base e log log base 10 e^ e to the power of (10^) "\10^" 10 to the power of \sqrt square root \sqr \^2 square \cbrt cube root \rcp \^-1 reciprocol \nrt nth root Pol( Rec( Polar/rectangular representation \sum( sigma $dx( \Integrate( Integrate d/dx( differentiation Abs Int Frac Intg numerical functions Probability ! factorial nPr "\perm" nCr "\comb" Permutations and Combinations Ran# random number generator Display Cls Norm Eng Sci Fix various functions Deg Rad Gra (deg) (rad) (grad) (gra) Deg Rad Grad unit specifier Graphics Plot Line Factor Graph Y= Graph function Graph Y> Y< Y>= Y<= r= X= various graphs Graph (X,Y)= parametric graph Graph $ Integral graph Programming Dsz Isz Lbl Goto Prog Engineering symbols \femto femto *10^-15 \pico pico *10^-12 \nano nano *10^-9 \micro micro *10^-6 \milli milli *10^-3 \kilo kilo *10^3 \Mega Mega *10^6 \Giga Giga *10^9 \Tera Tera *10^12 \Peta Peta *10^15 \Exa Exa *10^18 Complex numbers \i \j imaginary number \sqrt(-1) Det Arg Conjg ReP ImP complex no's functions Matrices Mat Trn *Row *Row+ Row+ Swap Matrix ops Table \a(n) \a(n+1) \a(n+2) \(n) \a(0) \a(1) Table things (useless in Programs?) Base n \A to \F hexadecimal numbers Dec Hex Bin Oct base output specifiers \h \o \d \b base specifier and or xor xnor Neg bitwise manipulation Stats \num data count \sumx \sumy \sumxy statistical sums \sumsqrx \sumsqry statistical sums of squares \xbar \ybar x and y means \xsd \ysd \xsdpop \ysdpop standard deviations \xo(n) \xo(n-1) \yo(n) \yo(n-1) replacement for above? \regA \yint regression Y intercept \regB \slope regression gradient \cor \correlation correlation co-efficient r \xhat \yhat expected values of x and y \CL \DT statistics data entry DTx DTy DTf stored stats data accesses \P( \Q( \R( \t( Normal distribution functions VAR menu Xmin Xmax Xscl Ymin Ymax Yscl X, Y scales Tmin "\tmin" t/theta min Tmax "\tmax" t/theta max Sim Coef Simultaneous coefficients Ply Coef Polynomial coefficients Sim X (and Y, Z, T, U, V) \simx Simultaneous answers Ply X1 Ply X2 Ply X3 \plyx1 Polynomial ansers F Result \fresult VAR F stuff F Start \fstart F End \fend F pitch \fpitch R Result \rresult VAR R stuff R Start \rstart R End \rend R pitch \rpitch \gY \gr \Xt \Yt Items on the VAR GRPH menu 9800 Orange Blue Green Colour specifiers (9800+) List X \listx List stuff (9800+) List Y \listy renaming ~~~~~~~~ Range ViewWindow ViewWindow is 9850 Range Tptch "\tptch" Tscl "\tscl" Tscl is 9850 version of tptch Min Med Max 9700 MinX MinY MaxX MaxY Min becomes MinX on 9850 Not means both boolean and bitwise Not on the 9850, whereas the 9700 did not have boolean. Thus bitwise Not is referred to as `not' instead, and `Not' is boolean. On 9700, `Not' will be accepted for bitwise not, and is the only token which will match "Not " in a string. There are also many clashes with `not normally enterable' tokens which exist in the 9700's internal font, but cannot be entered into a program without using a cable. I have not documented these here, as the NNE's are a bit dodgy to have in the standard. Maybe they shold be documented in a separate secrtion, with suitable warnings about being unuseable for people without cables. To see what tokens can be produced, read ASCII.TOK 9850 specific ~~~~~~~~~~~~~ These are only available on the 9850 and above standard tokens description Unsorted Getkey inkey$ ! D Start \dstart D stuff (9850) D End \dend D pitch \dpitch \a(2) \b(n) \b(n+1) \b(n+2) \b(0) possibly unavailable table funcs \b(1) \b(2) \a(nStart) \b(nStart) Sum Prod Percent List Cuml d2/dx2( d 2 by dx squared (double diff.) Solve( solves everything? Dim Fill List->Mat( Mat->List( RightXmin \rxmin (max and scl too) RightYmax \rymax (min and scl too) RightTscl "\rtscl" (min and max too) Fmin( Fmax( Seq( Min( Mean( Median( P/L-Orange \plorange (Green and Blue) colour of P/L Identity( Augment( Sim Result \simresult Ply Result \plyresult If Then Else IfEnd (CaS also allows EndIf) For To Step Next For loop While WhileEnd Do LpWhile (CaS also allows EndWhile) Return Break Stop stuff And Or Not boolean stuff Locate Send( Receive( real time comms thing ClrText \ctext ClrGraph \cgraph ClrList \clist S-WindAuto \swauto various 9850 S-WindMan \swman G-Connect \gcon G-Plot \gplot BG-None \bgnone BG-Pict \bgpict VarRange \vrange StoPict RclPict StoV-Win RclV-Win Tangent Normal Inverse Vertical Horizontal Text Circle F-Line PlotOn PlotOff PlotChg PxlOn PxlOff PxlChg PxlTest VarList1 .. VarList6 varlists File1 .. File 6 files GridOff \goff GridOn \gon various flags FuncOn \fon FuncOff \foff SimulOn \son SimulOff \soff AxesOn \aon AxesOff \aoff CoordOn \con CoordOff \coff LabelOn \labon LabelOff \laboff DerivOn \don DerivOff \doff LocusOn \locon LocusOff \locoff EdispOn \eon EdispOff \eoff Calculator to PC linking There are three possible routes to follow to connect your calculator up to your computer: 1.Buy the official casio calculator 2.Make your own cable 3.Buy a cable from someone who made it Now, buying the official cable is very expensive, as Casio don't expect to sell many thus the costs are high. Buying the cable from someone else is also reasonably expensive, but Denis Rouleau will make you one for $40 Canadian (roughly $30 US or £20). He has a web page and accepts orders over the internet. If you have any aptitude with a soldering iron, then your best bet is to build your own. Using the simple circuit detailed below, a working interface cable can be built WARNING: Do not be tempted to directly connect your calculator to a serial port. You will most likely fry your calculator! You must use an interface circuit. Casio Calculator interface circuit This is the simplest (apart from one) circuit that I have seen. I use it myself, with a small modification to make it light up LEDs when data is transferred. Here is the diagram in my ascii art: Calculator to RS232 interface +++++++++++++++++++++++++++++ Converter section 10 R |\. ______ 3| `\. 4 TX ------|______|----|IC1a >O--------------------------- RD (3) | ,/' |/' IC1 = 74HC14 10 R ,/| 33K ______ 2 ,/' |1 ______ RX ------|______|----O< IC1b|------+------|______|------ TD (2) `\. | | `\| | ___ GND --------+ /_\ d1 +--------- GND (7) | | | GND GND GND Power section _____________ o pin 14 of IC1 | | | | IC2 | d2 ,. +---------------+----| |----+----|< |---- DTR (20) | | 74L05 | | `' --- + |_____________| --- + 1uF --- | --- 10uF | | | +-----------+-----------+ | GND Pins 5,7,9,11 and 13 of IC1 should be connected to ground. RS232 pins 4 and 5 should be connected to each other. pins 6 and 8 should be connected to pin 20. Component list Resistors: cheap, standard resistors. (R == Ohms) Capacitors: Electrolytic types should be fine. Remember the polarity! Diodes: 1N4148 or similar signal diode IC1: 74HC14 Hex schmitt inverter IC2: 78L05 +5V regulator Connection to calculator is via 2.5mm stereo jack. RS232 connection is via standard 25 pin D socket (female). The interface is powered draining current from the DTR pin of RS232 that needs to be set high. CaS) does this automatically; you may find you need a program such as DTR.COM to set this high for use with a terminal or somesuch If you really insist in using the original programs (bleah!), you also have to short, on the interface, the RS232 pin 4 with pin 5 and pins 6 and 8 to pin 20: R 4 -, S 5 -' 2 6 --, 3 8 --| 2 20 --' Edited by MaX Flebus. This is FREEWARE. NO WARRANTY! Note that, according to the cfx9800 manual, you will not be complying with FCC regulations if you use your own interface cable. Do you care? Casio 7700GB hacking Warning: back up your data before attempting any of these techniques. For experienced Casio Hackers only! Information supplied by Martin Poupe 1. This calculator can draw graphs of recursion Graph Y=sin Y[1024] there Y[1024] is the same as Y, but there is no Syn ERROR and the value of Y is the value , that was computed in previous step Example: Range -4.7,4.7,0,-10,10,0 Graph Y=X+Y[1024] this graph is similar to graph of function X^2+C where C is some number. 2. You can read the values stored as a SD or REG data. If no Z[1] was defined (Defm 0), then on the address Z[1] is the first value of X of SD data, on the address Z[2] is the first value of f of SD data ,etc. 3. If you assign the value 3.25 to the variable A[1023] (is the same as A[-1]) then the hidden internal function "Lx 387 Transmission" begins to run. Here you can send or receive almost all the memory data (8 kB - 64 B) The transmit speed is fixed to 9600 bps and parity is NONE. 4. If you ADD the value 0.83E+50 to the variable A[-1] then the other hidden internal function "Lx 387 Test" begins to run. Here you can check the errors of display, keys, RAM, ROM , port and reset the calculator. (The sum of ROM is in hex 0112C62E) But this all you can do ONLY if you before it install the "EXTENDED MEMORY SYSTEM (c) Martin Poupe 1996", that allow you to access random part of memory (8 kB => 1024 variables) How to install EMS (7700 GB ONLY !!!) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1.RESET the calculator 2.Store "ln 0_" to the function memory f6, where '_' is the small triangle (- disp -) 3.Execute command Graph Y=3Df6 4.Press 'G<->T' 5.Press 'MODE' 6.Press '2' 7.Press ONCE down key 8.Press 'EXE' 9.Now you are editting some place of memory... You must write 26 characters, for example: "12345678901234567890123456" 10.Press 'Shift-MDisp' You can see something as: Program : 0 F-Memory : 29 Memory : 2 <-- THIS IS VERY, VERY IMPORTANT !!!!! (not 28, but 2) Stat(SD) : 0 Stat(REG): 0 Matrix : 8 4135 Bytes Free 11.Press 'MODE' 12.Press '1' Now EMS is installed ! :-D But there is something wrong with F-MEM :-( You can correct it :-) 1.Store "1234567" to the Prog 0 and to all F-MEM, too. 2.Store "123" to the Prog 1 3.Execute command: A[559]->A[549]~A[553] Now are F-Memories OK :-D Note: If you install EMS, NEVER use command 'Defm ' with parameter !!!!! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you use it, you uninstall the EMS and 26*8B of RAM will be lost. (To the nearest RESET) Hidden functions ^^^^^^^^^^^^^^^^ Magic variable i i->A[1023] 3.25 Lx 387 Transmission -1.35 New text font -6.23 Lx 387 Test Lx 387 Transmission (3.25->A[-1]) 1. Send 2. Receive [AC] Exit You can send or receive all RAM WITHOUT 64B (8192-64=3D8128 B) You CANNOT send (Or RECEIVE (how to do it ??)) ROM !!! Lx 387 Test 1. LCD 4.ROM 2. KEY 5.TRS 3. RAM 0.rst '1' LCD 1.empty display [EXE] 2.Filled with: X X X X X X X X [EXE] 3.The same as 2. , but INVERSE [EXE] 4.Solid fill [EXE] 5.Rectangle [EXE] 6.Return to main menu '2' KEY You must press the key, which name is on the display '3' RAM "..." is displayed, after few seconds is "< RAM OK >" displayed this routine fills all the RAM with char 0 => all programs are lost '4' ROM "..." is displayed, after few seconds is "0112C62E" displayed. '5' TSR 1.COM CHECK 2.RANDOM DATA OUT '1' 1.TRANS 2.RECEIVE '1' CASIO send something and then wait to [AC] '2' DATA RECEIVE TO STOP PRESS AC KEY '2' SET BPS 9600 =3D 1 4800 =3D 2 2400 =3D 3 1200 =3D 4 PRESS 1~4 KEY You must press [1] or [2] or [3] or [4] SET PARITY EVEN =3D 1 ODD =3D 2 NONE =3D 3 PRESS 1~3 KEY You must press [1] or [2] or [3] DATA OUTPUTING TO STOP PRESS AC KEY If you press [AC], you return to the main menu. '0' rst (=3DRESET) This is the same as a normal reset (without request, then you return to main menu) Example for using EMS @@Prog 0 ####### # # ####### # ####### # # #### # # # # # #### ####### # # # # # # ####### # #### # #### # # # #### # # #### # # # ####### ####### # ## ####### # # # ####### ####### # # # #### # # Note: # Do NOT write the CR (Enter) # In this program are ONLY the "Short minuses" and spaces !!!! @@Prog 1 3->I Lbl 0 A[Z-I-Q->A[P-2I] Dsz I Goto 0 @@Prog 2 r:Int Cr->r:3(Ans-Br->Q:992->P:Prog 1 r:Int Cr->r:3(Ans-Br->Q:984->P:Prog 1 r:Int Cr->r:3(Ans-Br->Q:993->P:Prog 1 3r->Q:985->P:Prog 1:"" @@Prog 3 10->B:1/B->C:560->Z:0->A Lbl 0 A->r Prog 2 Isz A Goto 0 If you run Prog 3, you can see 4 BIG numbers It` s counter from 0000 to 9999 Example: XXXXXXXXXX X X X # ###X X ## #X X # #X X # ###X X # # X X # # X X ### ###X X X X ### # #X X # # #X X # # #X X ### ###X X # #X X # #X X ### #X XXXXXXXXXX > The only problem is persuading the calculator to execute something in RAM. > The other information, such as ROM calls, and the assembly are relatively > simple, although still hard work. I think, that there is the way to execute something in RAM... (If I execute 3.5->A[-1], calculators was doing sometimes something, and sometimes something other, it`s possible, that it read the instructions from RAM (??)) If you find some instruction(s), please, tell me about it !!!!! > BTW, Ben Green has written to Casio to enquire what processor they use. > He and I both suspect a Z80 as it is a very popular chip for that kind of > operation and is also extremely cheap. I know a few about this CPU. My friend (he has read ROM from 7700 GB) said me, that CASIO uses CPU Hitachi 62??? , I was seeking something about this CPU, but I found NOTHING. * number storage I have written a help macro: 'ABCDEFG12345678 :A[974->A[ or backward (A[->A[974]) where at the place "12345678" is the variable A[974] so you can modify this how you want. But there is a few possibilities to replace the "1" I found: space, 1, A,0... but you can replace the "8" with every character Place your 7700 GB near to the radio (the best is FM 87.5 - 108 MHz) (I have got special radio, where I can continuous tune from 60 MHz to 110 MHz, so radio stations do not fight with casio) execute: Lbl 0:Goto 0 Tune the best signal. And now you can make music executing some commands (the best is inverse of matrix 9x9) I found some instructions with which I can play some song, but it is NOT musical. \|||/ (o o) -------------------------------ooO-(_)-Ooo-------------------------------------- Map of memory +----------------------------------------------------------------+ | i | A[i] | |-----+----------------------------------------------------------| |1023 | "Magic variable" | |-----+----------------------------------------------------------| |1022 | ? | |-----+----------------------------------------------------------| |1021 | ? | |-----+----------------------------------------------------------| |1020 | ? | |-----+----------------------------------------------------------| |1019 | ? | |-----+----------------------------------------------------------| |1018 | ? | |-----+----------------------------------------------------------| |1017 | ? | |-----+----------------------------------------------------------| |1016 | ? | |-----+----------------------------------------------------------| |1015 | theta | |-----+----------------------------------------------------------| |1014 | ? | |-----+----------------------------------------------------------| |1013 | ? | |-----+----------------------------------------------------------| |1012 | ? | |-----+----------------------------------------------------------| |1011 | ? | |-----+----------------------------------------------------------| |1010 | Last Y in REG CALC | |-----+----------------------------------------------------------| |1009 | Last X in SD or REG CALC | |-----+----------------------------------------------------------| |1008 | T,theta Pitch (Range) | |-----+----------------------------------------------------------| |1007 | T,theta Max (Range) | |-----+----------------------------------------------------------| |1006 | T,theta Min (Range) | |-----+----------------------------------------------------------| |1005 | Y Max (Range) | |-----+----------------------------------------------------------| |1004 | X Max (Range) | |-----+----------------------------------------------------------| |1003 | Y Scale (Range) | |-----+----------------------------------------------------------| |1002 | DY (=3D(Y Max - Y Min)/63) | |-----+----------------------------------------------------------| |1001 | Y Min (Range) | |-----+----------------------------------------------------------| |1000 | X Scale (Range) | |-----+----------------------------------------------------------| |999 | DX (=3D(X Max - X Min)/95) | |-----+----------------------------------------------------------| |998 | X Min (Range) | |-----+----------------------------------------------------------| |997 | Ans | |-----+----------------------------------------------------------| |996 | r | |-----+----------------------------------------------------------| |995 | ? | |-----+----------------------------------------------------------| |994 | ? | |-----+----------------------------------------------------------| |993 | ? | |-----+----------------------------------------------------------| |992 | ? | |-----+----------------------------------------------------------| |991 | VIDEO (8 bytes from left corner, the first row ) | |-----+----------------------------------------------------------| ... ... |-----+----------------------------------------------------------| |978 | VIDEO (8 bytes from right corner, the seventh row | |-----+----------------------------------------------------------| |977 | VIDEO (left part of status line (botom)) | |-----+----------------------------------------------------------| |976 | VIDEO (right part of status line (botom)) | |-----+----------------------------------------------------------| |975 | Buffer for edited commands (the first 8 bytes) | |-----+----------------------------------------------------------| ... ... |-----+----------------------------------------------------------| |960 | Buffer for edited commands (the last 8 bytes) | |-----+----------------------------------------------------------| |959 | Buffer for "Range" and "?->..." editing (the first 8 B) | |-----+----------------------------------------------------------| ... ... |-----+----------------------------------------------------------| |944 | Buffer for "Range" and "?->..." editing (the last 8 B) | |-----+----------------------------------------------------------| |943 | Graphics screen data (64 pixels from right, | | | the bottom of display) | |-----+----------------------------------------------------------| ... ... |-----+----------------------------------------------------------| |848 | Graphics screen data (64 pixels from left, | | | the top of display) | |-----+----------------------------------------------------------| |847 | ? (Something for function keys menu) | |-----+----------------------------------------------------------| |846 | ? | |-----+----------------------------------------------------------| |845 | ? | |-----+----------------------------------------------------------| |844 | ? | |-----+----------------------------------------------------------| |843 | ? | |-----+----------------------------------------------------------| |842 | ? | |-----+----------------------------------------------------------| |841 | Stack for numbers | |-----+----------------------------------------------------------| ... ... |-----+----------------------------------------------------------| |832 | Stack for numbers | |-----+----------------------------------------------------------| |831 | ? | |-----+----------------------------------------------------------| |830 | ? (?? Pointers to Prog areas,F-mem, | |.. | ? sizes of:memory, matrix, SD, REG data) | |.. | ? | |803 | ? | |-----+----------------------------------------------------------| |802 | Y Factor (Mantisa)+ ?? | |-----+----------------------------------------------------------| |801 | X Factor (Mantisa)+ Y Factor (Exponent) | |-----+----------------------------------------------------------| |800 | X Factor (Exponent)+ ?? | |-----+----------------------------------------------------------| |799 | ? Unknown | |.. | (In A[791] are stored the transmit parameters) | |789 | ? | |-----+----------------------------------------------------------| |788 | Stack for program call | |-----+----------------------------------------------------------| ... ... |-----+----------------------------------------------------------| |784 | Stack for program call | |-----+----------------------------------------------------------| |783 | Graphics screen buffer (for Graph Y<..) | |-----+----------------------------------------------------------| ... ... |-----+----------------------------------------------------------| |688 | Graphics screen buffer (for Graph Y<..) | |-----+----------------------------------------------------------| |687 | ? | |... | ? Unknown | |678 | ? | |-----+----------------------------------------------------------| |677 | Sum of x*y (REG) | |-----+----------------------------------------------------------| |676 | Sum of y^2 (REG) | |-----+----------------------------------------------------------| |675 | Sum of y (REG) | |-----+----------------------------------------------------------| |674 | n (SD, REG) | |-----+----------------------------------------------------------| |673 | Sum of x^2 (SD, REG) | |-----+----------------------------------------------------------| |672 | Sum of x (SD, REG) | |-----+----------------------------------------------------------| |671 | Buffer for last executed command(s) (the first 8 B) | |-----+----------------------------------------------------------| ... ... |-----+----------------------------------------------------------| |656 | Buffer for last executed command(s) (the last 8 B) | |-----+----------------------------------------------------------| |655 | Buffer for graphics operations (View SD,REG data, matrix)| |-----+----------------------------------------------------------| ... ... |-----+----------------------------------------------------------| |560 | Buffer for graphics operations (View SD,REG data, matrix)| |-----+----------------------------------------------------------| |559 | User memory area | |-----+----------------------------------------------------------| ... ... |-----+----------------------------------------------------------| | 0 | User memory area | +----------------------------------------------------------------+ User memory area: Prog 0, char 255 Prog 1, char 255 ... Prog r, char 255 Prog theta, char 255 f1 (Function memory), char 255 ... f6 ,char 255 free memory (filled with char 255) Matrix C Matrix B Matrix A REG data SD data variables created with "Defm " variable Z ... variable A ----------------------------------------------------------- Something new about 9850, 9800, 9700 .... (but not about 7700 GB)!!! Store this: 1->X:Dsz X to Prog n (n is 0..9, A..Z,r). And store this: Goto 0:"CASIO IS NOT GOOD":Lbl 0 to Prog n+1. Note: for programs from editor: create new file as Prog n and just after then create new file as Prog n+1 (names are uninportant) And now execute Prog n+1 ..it displays some number (Ans - value) BUT !!!!! Now execute Prog n... ;->>> ...What do you think about it ??? ...It can tell you, how are the programs stored in memory... 9850: ??? ..there is something The first file char 255 The second file char 255 ... ... The last file char 255 The first memory for graphs (Y1,X1,r1.... ) char 255 The second memory for graphs ... ... The 20-th memory for graphs char 255 The formula for A-recursion char 255 The formula for B-recursion char 255 The last executed command from MENU-1 (comp) ???..there is something Well that abouts wraps up the entire web site, yes i pasted all of the information on hacking the calculators and compiled it into this text file. I didn't write any of it (well the calc hacking stuff anyway). Well i hope that it has been a pretty compleat guide to calculator hacking for all of you! Incase you are wondering where this is all ripped from, take a look at: http://www.tsys.freeserve.co.uk have phun!