Mini Memory

From Ninerpedia
Revision as of 13:01, 24 September 2014 by Stephen Shaw (talk | contribs) (New article to start off Mini Memory coverage)
Jump to navigation Jump to search

Summary

Mini Memory module is a plug in module containing a battery and battery sustained ram. The memory can be used for a variety of purposes including program storage and permits the creation of assembly routines using the simple line-by-line assembler supplied on cassette with the module. Additional CALLs are added to BASIC including access to VDP RAM.

The mini memory module carries out a number of functions, but only one at a time:

You may use it for ONE of:

File Handling

The module itself can be used in a TI BASIC program as though it was a single disk file called "MINIMEM", and all the file handling commands available with disk drives will work with the module. It has a battery backup, and the information you store in the module will therefore remain after you switch your console off.

The module permits you to use the 32k Expansion Memory as a second 'solid state disk drive' called "EXPMEM2", which may store up to 24k of data. This data is lost when the 32k expansion is switched off.

Using either the module or the 32k expansion as data files, the information is retrieved even more quickly than with a disk drive. The computer does not have to waste time in moving a disk drive head over the disk.

It is possible to store data in the module or expansion memory with one program, and then to access the data with a second program, provided you do not reset the system by using QUIT or removing the module or power supply. This may help you to run a long adventure program for instance, by first placing the text into the memory and then loading your control program.

If you use the module as a data file, the contents can be saved to tape: thus you may store adventure text into the module with a BASIC program, and then copy the data onto tape easily using the 'S' option from the 'Easybug' selection from the main menu. Data is reloaded with the 'L' option.


Program storage

A small program (up to 4k) may be stored in the module using SAVE MINIMEM and recovered using OLD MINIMEM. The program is loaded almost instantly.


Assembly Language access

With the module a cassette is supplied with a 'line by line assembler' which provides a primitive and difficult to use method of writing your own machine code programs.

You will need to purchase the Editor/Assembler manual for information on the 99/4A Assembly language, and should be aware that the manual is not written for the novice.

The LBLA itself occupies the module, and the maximum machine code program you may write with it is therefore about 750 bytes. A few machine code games are now appearing on cassette which can be loaded into the module.

The mini memory provides a low cost entry into the field of machine code programming.

Machine code is a 'low level' language, which is not as easy to use as BASIC. Because the computer does not have to translate the commands, a machine code program may be as much as 1600 times faster than a TI Basic program.

EXTENSIONS TO TI BASIC

The mini memory adds some commands for use in your TI BASIC programs, allowing you to PEEK and POKE both CPU and VDP memory, and to obtain the hexadecimal string defining any character:

See also the article Using VDP with BASIC

CALL CHARPAT

is used to obtain the defining string for a character, which you may then manipulate with SEG$ and redefine with CALL CHAR.

 e.g.CALL HCHAR(1,1,94,760)
     CALL CHARPAT(94,A$)
     A$=SEG$(A$,1,14)&"FF"    

CALL LINK

permits a TI BASIC program to use a machine code utility or program stored in the Mini Memory with CALL LOAD.


PEEK and POKE

are used in many computers to look at and change the contents of one single memory location in the computer. The 99/4A console has 16k of user memory (RAM) known as VDP RAM, which is not directly addressable by the CPU (Central Processing Unit). The Mini Memory is the ONLY module available which allows you access to the VDP ram.

CALL PEEKV and CALL POKEV

are used, and samples may be seen in preceeding chapter on advanced programming. They may be used to look at your PROGRAM, or to manipulate the SCREEN DISPLAY.

CALL LOAD and CALL PEEK

are used to access the CPU RAM, which comprises of the 4k mini memory, the 32k expansion memory, and the 255 bytes of CPU ram in the console. CALL PEEK can also be used to examine the contents of CPU ROM (READ ONLY MEMORY).

CAUTION

The mini memory contains a battery with a stated life of two years, and will retain any data you load into it, even after the console is switched off and the module removed.

Data is destroyed if you:
Insert or remove the module when the console is switched on.
Use CALL INIT or the INITIALISE option. 
Use the module for something else. 

Data in the module is also subject to corruption by static electricity, and you should not rely on it as a sole copy of your program or data. Always keep a tape backup.