Difference between revisions of "Myarc Extended BASIC II"

From Ninerpedia
Jump to navigation Jump to search
(add extended technical information re memory addresses)
m (→‎Requirements: correct spelling error)
Line 13: Line 13:
  PAGE 4= Basic Interpreter
  PAGE 4= Basic Interpreter


n the 8k area >2000 to >4000. you have:
In the 8k area >2000 to >4000. you have:
  PAGE 1: For your machine code routines  
  PAGE 1: For your machine code routines  
  PAGE 2: Basic interpreter again. and a small area of what Myarc call RAM DISK.  
  PAGE 2: Basic interpreter again. and a small area of what Myarc call RAM DISK.  

Revision as of 17:26, 18 October 2014

MYARC XB has had a number of versions, the last and definitive version being Vn 2.12.

Requirements

This has the disadvantage of REQUIRING the Myarc 512k ram card, as the Ex Bas itself resides in RAM. This does allow for some increase in speed. Myarc XB is in the form of a module which contains a loader plus ram, a disk, and a chip for the ram card.

The MODULE contains ram (>6000 to >8000) into which the memory management routines go. These are needed as there is a lot of paging going on.

In 128k of your 512k ram card there are four pages of 32k each:

Looking at the 24k area >A000 to >FFE8 first:
PAGE 1= EX BAS PROGRAM 
PAGE 2= VARIABLES 
PAGE 3= STRINGS 
PAGE 4= Basic Interpreter

In the 8k area >2000 to >4000. you have:

PAGE 1: For your machine code routines 
PAGE 2: Basic interpreter again. and a small area of what Myarc call RAM DISK. 
PAGE 3: routines for VDP and Speech. and i/o buffers
PAGE 4: MORE basic interpreter and the value stack.

As the supplied system disk is referenced you, it can improve matters to copy it to a ramdisk in the 512k ram card for much greater speed. In VN 2.11. the file 128K OS instead of slavishly loading everything every time after a QUIT, checks memory to see what is there. In general, provided you have not switched the ram card off, the system will only need to reload two files from the system disk,. a great saving in time!

Added features

Graphics

The Myarc XB has good true bit map graphics, variable screen windowing with both 32 and 40 column text modes. CALL CHAR is available from 0 to 255 and you may have 32 sprites. There is a full range of bit map graphics commands- draw, drawto, circle, point, rectangle, fill, write, dcolor, and uniquely you can determine if a pixel is on or off.

The 32 and 40 column screens use identical commands, except for colour: in 40 column mode text colour is set by using two parameters with CALL SCREEN

You have available 256 definable characters in 32 character sets - and 32 sprites. CALL CHARSET restores characters 32 to 95 only, maintaining compatability. but CALL GRAPHICS(N) restores all predefined characters. as well as restoring default colours and clearing the screen ....

An undocumented feature you will like- remember TI's canard that you could not have sprite automotion in bit map mode? This is repeated in the Myarc XB manual I have - but in truth. you CAN switch Myarc XB to bit map mode. and then call sprites with auto-motion. Neat.

VIDEO RAM ACCESS

You now have PEEKV and POKEV available.

Integer Math

Added extras include integer and real variables- with integer variables processing a little faster than real ones. Myarc usage differs from everyone else- the integer is ROUNDED not stripped of the decimal if there is one.

If you want an array of integer numbers the way to do it is:

100 DEFINT DIM A(20)

Default Disk Drive

You may set a default disk drive and subsequently omit "DSK1" when using OLD and SAVE or RUN.

Running TI Basic programs

Because more VDP is available, Myarc XB can load AND run those very long TI Basic programs that will NOT load in TI XB. You may need to use CALL FILES(1) to load them from disk - but a clever bit of sidestepping allows the Myarc XB to load a longer TIB file than TI's XB can. Also the TI Basic extra character sets lacking in TI XB ARE available in Myarc XB.

Running TI Extended BASIC programs

Generally no problems apart from some commercial programs that have used the PROTECTED flag AND also test the memory location to ensure you haven't removed it. Myarc XB uses a different location so such checks will fail and the program assume you have hacked it.

Variable Names

Myarc XB2 will permit you to use variable names with lower case characters and treat them as different variables to upper case usage. eg A=4 :: a=5. TI XB will accept this but if you edit the line in TI XB the lower case number will be changed to upper case.

Pre Scan Bug

The prescan check of for-next loops does not function correctly- and this can make debugging very interesting! If a NEXT is missing, the error message:

FOR-NEXT NESTING IN NNNN is given.

Unfortunately the number NNNN has little resemblance to any line number in your program!. Remember to check that every FOR has its NEXT yourself if you have problems! For existing debugged TI XB programs this change to pre-scan makes no difference.

ACCEPT AT / DISPLAY AT

Some differences to TI XB which potentially may cause problems with programs written for TI XB but I haven't actually found any. You may find the change useful.

ACCEPT AT(11,12)SIZE(32):A$ 

does what? In TI XB it blanks from line 12, column 11 to the end of line 12 and accepts A$ from column 11 to column 28.

In Myarc XB however, it blanks from line 12, column 11, to column 11 of line 13, and the ACCEPT cursor appears on LINE 13. eg the SIZE has rolled over to the next line.

DISPLAY AT(11,12),SIZE(32):A$ makes the same deletion, spreading over two lines, but at least the display starts in the right place.

ACCEPT AT(24,12)SIZE(32):A$ will place the cursor on ROW 1

ACCEPT AT(12,2)SIZE(-255):A$. Nothing is blanked. but the input field for A$ measures 255 chars from (12,2), including any positions outside current margins (eg edge characters). You can therefore type in quite a lot of text. and have it accepted with one key push into one string.

FILE HANDLING

Alas a bug. The APPEND option is NOT supported. The file will open but you can't write to it BUT you will receive no error message to tell you the write has failed.

Error Trapping

Some of the error messages have been changed and in once instance an error will crash the system. Try this one:

100 DEF T(N)=T(N)-1 
110 PRINT T(N)

Not it isn't right, and TI XB will tell you UDF REFS ITSELF whereas Myarc XB crashes.

TI XB error SYNTAX ERROR SYNTAX ERROR : RECURSIVE SUBPROGRAM CALL will appear in Myarc XB as just SYNTAX ERROR.

You will sometimes receive SYNTAX ERROR instead of BAD VALUE.

If your bad programming has produced:

100 GOTO 120 
110 SUB TRAP 
120 PRINT "ERROR MESSAGE=" 
130 SUBEND

then TI XB will give you INVALID ERROR NUMBER IN NNNN but Myarc XB 2.12 will throw out the multi line error message:

WARNING 
NUMERIC OVERFLOW IN 130 
WARNING 
NUMERIC OVERFLOW IN 130 
WARNING 
NUMERIC OVERFLOW IN 515 
WARNING 
NUMERIC OVERFLOW IN 515 

at which point your only option is to QUIT as the keyboard is unresponsive. No there isn't a line 515 in the code.

Running Program format machine code

You may RUN many program format machine code programs directly.

Running DF80 Machine Code

DF8O files written for TI XB may require you to use a utility program to reset VDP registers, or may not function at all.

RUNning a program from a program

When your program loads another program you can use a variable name

RUN A$

and if you are loading part two of a game say, you can load part two AND RETAIN the values of the variables in part one by using:

RUN "DSK1.PART2",CONTINUE

Other

Myarc XB allows you to run many memory image files which otherwise would require a SuperCart (EdAs with 8k ram) as the Myarc module contains ram in the correct location.

Strangely Unix-like COMMAND MODE commands include CHD and PWD to change and print the default device name, so you can old a file on say DSK1 with just OLD "FILENAME". The device name is inserted when you use RUN, SAVE And OLD.

Also in COMMAND MODE you can omit quotation marks when using OLD, SAVE and RUN, so OLD DSK1.FILENAME is OK. However you must still use quotation marks when using PRINT or DELETE from the command line.