# Casio FX-700P

## [![Casio FX-700P.jpg](https://wiki.hexadust.net/uploads/images/gallery/2025-05/scaled-1680-/wx4Uy4frUob7CIkx-casio-fx-700p.jpg)](https://wiki.hexadust.net/uploads/images/gallery/2025-05/wx4Uy4frUob7CIkx-casio-fx-700p.jpg)

## Resources

- Manual: [CASIO FX-700P.pdf](https://wiki.hexadust.net/attachments/87)
- Games: [Cassio - Collection og games.pdf](https://wiki.hexadust.net/attachments/88)

## Usage

### Writing programs

1. Enter write mode: `MODE`, `1`
2. Select program `S`, `0` to `9`
3. Enter program lines: `<line no> <command> <args>`, `EXEC`
4. `LIST` to list the program (follow by line number to start from that line) 
    1. Each listed line can be edited
    2. `AC` to cancel any changes made to a line
    3. `EXEC` save changes
5. Changing `<line no>` of a line makes a copy of it under that name (if already exist it overwrites existing one)
6. Putting just `<line no>` with no `<command>` removes that line

### Running programs

1. Enter run mode with `MODE`, `0`
2. `S`, `<program number>` to run it
3. Alternatively type `RUN` to run currently selected program (last edited or run)

### Typing

- Lower case letters: `MODE`, `.` (dot; `EXT` mode)

## BASIC

<table border="1" id="bkmrk-input-input-input-%3Cs" style="border-collapse: collapse; width: 100.02%; height: 1871.5px;"><colgroup><col style="width: 20.8921%;"></col><col style="width: 40.4029%;"></col><col style="width: 38.6763%;"></col></colgroup><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">Input</td><td style="height: 29.6px;">`INPUT <string var>`</td><td style="height: 29.6px;">Enter data from keyboard.</td></tr><tr style="height: 173.433px;"><td style="height: 173.433px;">  
</td><td style="height: 173.433px;">`<char var>=KEY`

```vbscript
FOR I=0 TO 20
K$=KEY
NEXT I:
PRINT K$
```

</td><td style="height: 173.433px;">Read a character and assign it to a variable. Program is not stopped. Empty string is read if no key is pressed.</td></tr><tr style="height: 214.65px;"><td style="height: 214.65px;">Output</td><td style="height: 214.65px;">`PRINT [string | var | command] [: | ,] [string | var] ([: | ,] ...)`

```vbscript
PRINT CSR 3;
PRINT "HI"
F=2
PRINT "FOO=";F
```

</td><td style="height: 214.65px;">If no arguments are given clears screen. If string or variable is given it is printed out. `;` separates arguments to print without clearing screen. `,` waits for any key and clears the screen. If terminated by `;` screen is not cleared, otherwise waits for any key and clears the screen.

`PRINT CSR [var | num]` sets position of cursor (0 to 11).

</td></tr><tr style="height: 46.3167px;"><td style="height: 46.3167px;">Branching</td><td style="height: 46.3167px;">`GOTO [line | var]`</td><td style="height: 46.3167px;">Execution jumps to specified line number.</td></tr><tr style="height: 80px;"><td style="height: 80px;">  
</td><td style="height: 80px;">`IF <comparison> [THEN <line> | ; <command>...]`</td><td style="height: 80px;">Jump to line or execute commands following `;` if comparison is true. Otherwise continue from next line.</td></tr><tr style="height: 46.3167px;"><td style="height: 46.3167px;">  
</td><td style="height: 46.3167px;">`GOSUB [line | var]`</td><td style="height: 46.3167px;">Jump to line or line stored in a variable.</td></tr><tr style="height: 46.4px;"><td style="height: 46.4px;">  
</td><td style="height: 46.4px;">`RETURN`</td><td style="height: 46.4px;">Returns from last `GOSUB` call to command next after it.</td></tr><tr style="height: 164.333px;"><td style="height: 164.333px;">Loops</td><td style="height: 164.333px;">`FOR <var>=<val> TO <val> [STEP <val>]`</td><td style="height: 164.333px;">Starts loop counting from initial value to given value with step.

Calling `NEXT <var>` will repeat loop incrementing `<var>` by 1 or `STEP <val>` value.

Once `<val> >= TO <val>`, `NEXT <var>` will not jump and following command will be executed ending the loop.

</td></tr><tr style="height: 63.2833px;"><td style="height: 63.2833px;">  
</td><td style="height: 63.2833px;">`NEXT <var>`</td><td style="height: 63.2833px;">Repeat `FOR` loop for given `<var>` or continue from next command if loop is done.</td></tr><tr style="height: 63.2px;"><td style="height: 63.2px;">Execution</td><td style="height: 63.2px;">`STOP`</td><td style="height: 63.2px;">Stop the execution of a program temporarily and wait for `EXEC` key.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">  
</td><td style="height: 29.6px;">`END`</td><td style="height: 29.6px;">End of program.</td></tr><tr style="height: 46.3167px;"><td style="height: 46.3167px;">  
</td><td style="height: 46.3167px;">`RUN [line]`</td><td style="height: 46.3167px;">Start program from given line number or form beginning.</td></tr><tr style="height: 46.3167px;"><td style="height: 46.3167px;">Data</td><td style="height: 46.3167px;">`VAC`</td><td style="height: 46.3167px;">Clear all variable data for a program.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">  
</td><td style="height: 29.6px;">`CLEAR`</td><td style="height: 29.6px;">Remove program.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">  
</td><td style="height: 29.6px;">`CLEAR A`</td><td style="height: 29.6px;">Remove all programs (!).</td></tr><tr style="height: 46.3167px;"><td style="height: 46.3167px;">Listing</td><td style="height: 46.3167px;">`LIST [line>]`</td><td style="height: 46.3167px;">Display program listing from beginning or given line.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">  
</td><td style="height: 29.6px;">`LIST A`</td><td style="height: 29.6px;">List all programs and data.</td></tr><tr style="height: 104.467px;"><td style="height: 104.467px;">Angular unit</td><td style="height: 104.467px;">`MODE [4 | 5 | 6]`</td><td style="height: 104.467px;">Sets trigonometric angular units:

- `4` - degree
- `5` - radian
- `6` - gradient

</td></tr><tr style="height: 79.9167px;"><td style="height: 79.9167px;">Format</td><td style="height: 79.9167px;">`SET [E <val>, F <val>, N]`</td><td style="height: 79.9167px;">Set number of effective positions or decimal positions for displayed numerical value (0 to 9).</td></tr><tr style="height: 46.3167px;"><td style="height: 46.3167px;">Character functions</td><td style="height: 46.3167px;">`LEN <char var>`</td><td style="height: 46.3167px;">Length of a string.</td></tr><tr style="height: 46.4833px;"><td style="height: 46.4833px;">  
</td><td style="height: 46.4833px;">`<char var>=MID (<n>[, <m>])`</td><td style="height: 46.4833px;">Extract `n` characters from the `m`th character in `$`.</td></tr><tr style="height: 46.3167px;"><td style="height: 46.3167px;">  
</td><td style="height: 46.3167px;">`VAL <char var>`</td><td style="height: 46.3167px;">Convert number in a string to number.</td></tr><tr style="height: 46.3167px;"><td style="height: 46.3167px;">Numeric</td><td style="height: 46.3167px;">`INT <val>`</td><td style="height: 46.3167px;">Integer part of a number.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">  
</td><td style="height: 29.6px;">`FRAC <val>`</td><td style="height: 29.6px;">Fractional part of a number.</td></tr><tr style="height: 46.4833px;"><td style="height: 46.4833px;">  
</td><td style="height: 46.4833px;">`SIN <val>, COS <val>, TAN <val>`</td><td style="height: 46.4833px;">Trigonometric functions.</td></tr><tr style="height: 46.4833px;"><td style="height: 46.4833px;">  
</td><td style="height: 46.4833px;">`ASN <val>, ACS <val>, ATAN <val>`</td><td style="height: 46.4833px;">Inverse trigonometric functions.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">  
</td><td style="height: 29.6px;">`SQR <val>`</td><td style="height: 29.6px;">Square root of `<val>`.</td></tr><tr style="height: 46.4px;"><td style="height: 46.4px;">  
</td><td style="height: 46.4px;">`EXP 1`</td><td style="height: 46.4px;">Call out the numerical value of exponential table (`e`).</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">  
</td><td style="height: 29.6px;">`LN <val>`</td><td style="height: 29.6px;">Natural logarithm.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">  
</td><td style="height: 29.6px;">`LOG <val>`</td><td style="height: 29.6px;">Base 10 logarithm.</td></tr><tr style="height: 29.5167px;"><td style="height: 29.5167px;">  
</td><td style="height: 29.5167px;">`ABS <val>`</td><td style="height: 29.5167px;">Absolute value.</td></tr><tr style="height: 29.5167px;"><td style="height: 29.5167px;">  
</td><td style="height: 29.5167px;">`SGN <val>`</td><td style="height: 29.5167px;">Sign of a number:

- `1` - `<val> > 0`
- `0` - `<val> = 0`
- `-1` - `<val> < 0`

</td></tr><tr><td>  
</td><td>`RND (<x>,<y>)`

```vbscript
RND (123.456,-3) -> 123.46
RND (123.456,-2) -> 123.5
RND (123.456,-1) -> 123
RND (123.456,0) -> 120
RND (123.456,1) -> 100
RND (123.456,2) -> 0
```

</td><td>Round number `<x>` to `<y>` significant digit place.

</td></tr><tr><td>  
</td><td>`RAN#`</td><td>Random number between 0 and 1.

</td></tr></tbody></table>

## BASIC games

### Spot and Stop

```vbscript
5 L=0
10 PRINT "Spot and Stop"
20 PRINT "HIGHEST=";H
30 PRINT "BY ";$
40 FOR G=1 TO 20
50 A=INT (RAN#*10)
60 GOSUB 300
70 INPUT C
80 IF A=C;L=L+20:PRINT "GOOD":GOTO 100
90 L=L/2:PRINT "MISSED"
100 NEXT G
110 L=INT L:PRINT :PRINT "SCORE=";L
120 IF L>H;H=L:PRINT "NEW HIGH":INPUT "NAME",$
130 END
300 PRINT "::::::::::";
310 PRINT CSR A;";";:FOR W=1 TO 40:NEXT W
315 PRINT
320 PRINT "0123456789";
330 RETURN
```

### Gopher Trap

```vbscript
10 PRINT "HIGHEST:";H:G=0:$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
20 FOR C=0 TO 4
30 PRINT CSR 0;"            ";
40 A=INT (RAN#*26+1):B=INT (RAN#*12)
50 D$=MID(A,1)
60 FOR E=0 TO 25:PRINT CSR B;D$;:F$=KEY:IF F$="";NEXT E
70 IF D$≠F$;PRINT :PRINT "MISSED:0";:GOSUB 200:NEXT C:GOTO 100
80 PRINT :PRINT CSR 0;"TIME :";E;:GOSUB 200
90 S=(27-E)*10:PRINT CSR 0;"SCORE:";S;:G=G+S:GOSUB 200:NEXT C
100 IF H<G;H=G
110 PRINT :PRINT CSR 0;"FINAL:";G;" "
120 END
200 FOR W=1 TO 200:NEXT W:RETURN
```