fBASIC

Information on being able to  run Floating Basic on SCAMPII Max board.

The basic idea is the same as on this website. NIBL program is in the 0000-1FFF area .. and fBasic in upper ram from D000-FFFF..

For this setup test  I placed the PIA only from C800-CFFF....

Here s the newer pld listing ...

Name            ScampII max board, nibl@1000H and Fbasic@1200 baud;

Partno          0001;

Revision        Ver 1;

Date            24/10/17;

Designer        mc;

Company         mcoz;

Location        oz;

Assembly        manual;

Device          g22v10;

/** Inputs **/

pin [1..5] = [a2..a6] ;

pin [7..11] = [a7..a11] ;

pin 13 = a12;

pin 14 = a13;

pin 15 = a14;

pin 16 = a15;

/*nrds ... read output **/

pin 20 = nrds;

/** Outputs **/

pin 22 = !piaCS;

/**pin 21 = !acaCS;**/

pin 23 = !memCS;

/** Declarations and Intermediate Variable Definitions **/

field ioaddr= [a15..2];

/** acaCS_eqn    = ioaddr:[E000..AFFF]; **/ 

piaCS_eqn   = ioaddr:[C800..CFFF];

memCS_eqn    = ((ioaddr:[0000..1FFF])& !nrds)#(ioaddr:[2000..C7FF])#((ioaddr:[D000..FFFF])& !nrds);

/** Logic Equations **/

piaCS = piaCS_eqn ;

/**acaCS  = acaCS_eqn; **/

memCS  = memCS_eqn;

Note that the NIBL runs with 7 bit data and... when you switch to fBASIC you need 8 bit data.

Here is updated RAM binary file - download.

On reset you run your terminal at 1200,7bits, no parity no handshake. Once you get the prompt you can switch to fBASIC by typing

LINK #DFC1

You will probably get some garbage on screen .. adjust terminal program to 8 bits. and pressing return should give you a ready message. You can test various commands. to get back to NIBL type in

BYE

Here is snapshot of some commands in fBASIC

It should be possible to adjust the values of the delays to increase the baud rate to 2400 ..

and yes tested if this will work ..

RESULT  .. the NIBL runs OK @2400 baud, 7bits, 1stop bit .. but when you switch to fBASIC

It still wants to communicate @1200, 8bits, 1 stip bit

Here is the combined file of NIBL and fBASIC  - 2400baudNIBL1200fBASIC

fBASIC COMMANDS

Constant

Variables

Expressions

Program entry

Decleration Statements

DEF FN must be followed by a character A-Z, so 26 user defined functions are possible. An expression between brackets can be added to transfer a parameter e.g.: DEF FNA (SQROOT) = SQR(SQROOT) INPUT A PRINT FNA(A): REM prints square root of A

DEF FNB = SIN(X)+1 INPUT X PRINT FNB

Program Flow Control

Numeric functions

Floating point numbers have to be between 10E-39 and 10E38. Maximal nesting of 5 brackets. Numbers larger than 8.388.607 have to be entered in exponantial form. Normal accuracy is 6 digits.

Logical Operators

Relational Operators

String Functions

String Concatination &

e.g. VAR = TOP: VAR1 = TOP + 72 VAR1$ = "123456": VAR$ = RIGHT$(VAR1$,2)&CHR$(65)&"LT"&MID$(VAR1$,2,3) PRINT VAR$

String Comparisment

Input/Output