Casio FX-603P



Russian version
Main calculators page



I do not guarantee that information written here is correct, and I am not liable for any consequences of use of this information.

General description

This is a keystroke programmable scientific calculator with 2-line (16 characters per line) display, 6144 bytes of program storage memory, 110 memory registers (880 bytes total) and communication port. Its programming language is fully compatible with its predecessor, FX-602P (except some new commands and new 2-line output). Unlike the FX-602P, memory cannot be freely distributed between porgrams and data. Physically, all memory is located in one 64kbit static memory module. There are two commands to directly change memory contents — "PEEK NNNN" and "POKE NNNN" (or "PEEK MRxx" and "POKE MRxx", which is shorter). This file describes some useful methods of memory direct reading and modification (last part describes PC-to-calculator link methods), and doesn't contain general programming technique. If you just want to know more about this model, please download its manual from www.silrun.info.

Memory addresses

Addresses from 0000 to 0879 are used by data registers — 8 bytes each, in following order: 00-09,F,10-19,1F,... Addresses from 880 to 2046 are used by system routines. Before you start editing memory contents with addresses more than 0879, please estimate the time you will need to recover lost data in case of RESET, and minimize it. Program memory is located between addresses 2047 and 8191 (it cannot be fragmented). Programs are sorted in memory by creation time. Addresses (pseudoaddresses) from 9980 to 9999 are system tests.

Memory registers

Numbers are stored in data memory in BCD (binary-coded decimal) form: each decimal digit is stored as hexadecimal digit. First byte of each register is unsigned exponent. If first byte's first digit is A, then the register contains number in fraction form (integer part, numerator and denominator). Second byte's second digit contains signs (exponent sign / mantissa sign: "+/+"-1, "−/+"-0, "+/−"-6, "−/−"-5), first digit contains 12th mantissa digit. Note about exponent: if first byte is 97h and second byte's second digit is 0 or 5, then exponent is "−3", not "−97". The order of mantissa digits is following: 1st — 8th byte's 2nd digit, 2nd — 7th byte 1st digit, etc. If one of the digits is hexadecimal B — it is fraction separator (between integer and numerator or between numerator and denominator). Below is an example program, which directly changes data memory contents with PEEK and POKE. It calculates the best fraction approximation for a given decimal ("a b/c" key works only for number input and cannot be used to divide two numbers stored in memory, so it cannot be used to check if their quotient could be shown in fraction form or not). Here it is (78-byte body, maximum execution time — 4.8 seconds; "advanced" version (in program archive) occupies 105 bytes and is a bit slower for small numerator and denominator values, but its max. execution time is 2.4 seconds): Min03 = 0 Min06 1 Min05 MR03 Min04 FIX0 M−03 LBL9 Min00 8 Min02 MR06 + MR05 Min06 × MR03 FRAC x=0 GOTO2 1/x Min03 INT = Min05 ABS Min01 × MR04 FIX0 = MinF PEEK MR02 Min07 + 2 = 10^X M+01 162 M+07 MR07 POKE MR02 6 M+02 PEEK MR02 + 176 = POKE MR02 MRF × MR01 = MinF FIX0 x=F GOTO9 LBL0 MR00

System memory area

Here are some system memory addresses I found useful: 1) addresses 1241 and 1242 — an address of last byte used by programs, increased by two, is stored here (in HEX, correct decimal result is "PEEK 1241 + PEEK 1242 × 256 ="); 2) 1244 — number of currently executed program or subprogram (in BCD: 16 means program number is 10), addresses 1245 and 1246 — address of the first byte of current program's body (in HEX), 1251 — number of items in subroutine stack (BCD); 3) addresses 1252 and more — subroutine stack data: one item uses 7 bytes, with maximum of 19 items; item's first byte is program number (BCD), second and third — entrance address (address of the first byte of GSB-to-next-program-in-stack command), fifth and sixth — this program's body first byte address; 4) addresses from 1392 to 1407 — upper line of the screen, writing at these addresses changes its contents; address 1543 is upper line on/off indicator (I don't know how to use it to switch upper line on, but an easier way exists — ";"). Below is the codetable table used in FX-603P (these are display-shown symbols, their codes don't allways match codes of ALPHA MODE symbols used in programs, and have nothing common with program command codes).

FX-603P codepage

Examples of system memory usage:
   1) Self-modifying program ("+" and "−" are alternated internally in the program): AC 15 MinF 1244 Min00 PEEK MR00 ISZ x≥F x=F GOTO16 = LBL1 "My n-r" HLT PEEK MR00 + ISZ PEEK MR00 × 256 + 67 = Min01 77 Min02 76 LBL0 X↔M02 POKE MR01 PEEK MR01 "Change +" PAUSE GOTO0
   2) Program, which prints on screen all symbols with codes more than number you entered: HLT Min01 " " 1407 MinF LBL1 1933 Min00 LBL2 PEEK MR00 DSZ POKE MR00 2 M+00 MR00 x≥F x=F GOTO2 1 M+01 MR01 POKE MRF PAUSE GOTO1
   3) Demonstration of jumping without GOTO (subprogram /P1/ shifts an entrance address, which causes a jump within higher level program): /P0/ 3 GSBP1 1 HLT GOTO0 2 HLT LBL0 /P1/ Min01 1251 Min00 + 7 × PEEK MR005 = Min00 255 MinF PEEK MR00 + MR01 = x≥0 x≥F x=F GOTO1 Min01 ÷ 256.5 = FIX0 ISZ + PEEK MR00 = POKE MR00 DSZ MR01 HEX AND MRF = COMP LBL1 POKE MR00 AC
   4) Demonstration of the way to ignore labels before GOTO (program changes the address of its beginning to the number greater than maximum existing address in memory, which causes the interpreter to cancel search for label before GOTO because current address is less than the address of the program's beginning): GOTO0 LBL1 "Label 1" HLT LBL0 33 POKE 1246 GOTO1 LBL1 "Label 2" HLT

Program area

Each program's first byte contains number from 0 to 9 (program number), or 234 (it means that program number is more than ten; in this case program number's last digit is the following byte). Next byte may contain 236, which means that program is protected by password (next 4 bytes). The password (if exists) is followed by program body (note: if the program has a password, then addresses 1245 and 1246 contain the address of the byte with 236 in it, so the example of self-modifying program will not work correctly if it is password-protected, because it doesn't coun't this address change). The last byte of the last program is followed by the byte with 255. Password-related information is taken from http://www.rainbow.ne.jp/~hosomici/FX-603P.htm. Below is the table with password symbols' codes (they match the codes of ALPHA MODE symbols). This information is intended to be used for revealing forgotten passwords of YOUR OWN programs. Please do not use it to break copyright-protected programs.

Codes of password tokens in FX-603P

PC-to-calculator link

There are three ways to connect this calculator and PC-compatible computer. The first, the easiest and the most inconvenient, uses tape SAVE and LOAD functions. In this case tape recorder is substituded with "line in" and "line out" PC ports. Drawbacks are: inability to edit programs on the PC, large (comparatively large :) file size and big number of operations needed to get final archive. You will need a cable (3.5mm jack-jack) and two pins (their diamater matches the diameter of holes in connector and they're quite stiff). You should insert both pins in contacts (when you save to PC — in 5th and 30th; when you read from PC — in 22th and 30th; order is left-to-right and up-to-down, first contact is the top left one, below is the 16th, and to the right of the 1st is the 2nd), then insert one jack into sound card "in" or "out", another jack — between pins (pin in 30th contact is the base of the jack). Write settings I used are: 22050 Hz, Mono, 8 bit. After you record a file, increase the volume by 20-30%, cut initial "beeeeeeeeeep" to 1.5-2 seconds, and archive it (I found Slim the best — archive size was 20 times the size of the program in calculator's memory). Second and third method use RSSAVE and RSLOAD functions, but with different cables and software. Second: you should build (or ask someone to build) a cable for COM-port and work with standard Windows program Hyper Terminal. Cable descriptions (they are slightly different) can be found in many places, here is one of them. On some motherboards this cable refuses to work without external power supply, so be prepared to solder contacts for 9v bettery into it. The third one I found the best. It uses very simple cable everyone can solder using standard LPT-to-printer cable. I again used pins as contacts on calculator side, and plastic card (approx. 1mm thickness) as board. The only inconvenience of this method is the necessity to work in plain DOS to transfer data (because the program was written in 1996 and available only in Spanish, but all menus are standard, so the language is not a problem). Archive which contains program (casio.exe) and brief instructions in English (manual_e.txt) is here.

Programs

Programs from this page (plus some other) in "ready-to-send" form are here.



Main page (in Russian)
Guestbook


Hosted by uCoz