Information about LOS 96 for CBM 8096/8296
LOS 96, that stands for Loadable Operating System for 96K machine, is a replacement for the original Basic 4.0-Rom and has the ability to use the 96 KByte Ram of the computers CBM 8096 and CBM 8296 with an improved Basic (although the CBM 8296 has 128KByte Ram, LOS96 uses only 96K). LOS 96, that was supplied with every CBM 8096/8296, was developed by the german software company SM (Softwareverbund Mikrocomputer) and therefore has the option to load the programming tool "SM-Kit/B" that exist for other CBM computers by Eprom. Interesting for CBM 8032 users is the fact that a 8032 can also be expanded to a 8096 (and use LOS 96) by installing an extra board with 64KByte Ram (see picture below) and putting the CPU on this board.
But how works LOS 96 ? It must first be mentioned that, as LOS 96 replaces the original operating system, it must be located in Ram what means that from the 96 KByte Ram about 24 KByte Ram are reserved for LOS 96. The program code of LOS 96 V1.6 is located in memory from address $0401 - $5f30, the addresses $5f31 - $7fff are free and can be used for e.g. SM-Kit. The area $8000 - $ffef exists three times and can be changed by manipulating the address $fff0 (Bankswitching). The first bank is the same as in a normal 8032 : it contains the (in LOS 96 unused) Basic 4.0-Rom, the screen generator, I/O-ports and so on. The second bank contains 32 KByte Ram for program code and basic stack, and the third bank contains 32 KByte Ram for variables. Although it sounds very difficult that at the same time there can only be one bank in memory, the basic programmer hasnīt to care for it as LOS 96 does all bankswitching automatically.
How to load Basic4-programs into LOS 96
Basic4-programs run under LOS 96 if they they are pure Basic4-programs (no poke, peek, sys). As Basic-programs begin at address $0401 and LOS-programs at address $8001 in bank 1 (logical address dec. 65537), they MUST be loaded with the command LOAD,"xxx" . If a Basic4-program is loaded without the comma, the system will crash as it overwrites itself.
Differences between Basic4 and LOS 96
In this chapter I only give an overview of things that have changed in comparison to Basic4. If you want to know details, send me a mail.
1) Unlimited Basic-Stack for programs : As the Basic stack is located at the end of bank 1 and has no memory limits, the program can use many FOR and GOSUB - commands without getting a stack overflow error. Note that the stack is located in the same bank as the program code and grows downwards so that after a program is loaded there should always be about 200 bytes free (PRINT FRE(0)).
2) As the variables are stored in bank 2 and the program code in bank 1, the program can be changed WITHOUT deleting the variables.
3) New functions like inserting or deleting lines are available via the ESC-key.
4) Every basic line can have a maximum of 200 bytes length. If a basic line is finished with return, LOS 96 automatically prints a new (higher) number on the screen. With the command DELETE an area of basic lines can be deleted, e.g. DELETE 100 - 200 deletes all basic lines between 100 and 200.
5) If an error occures, the program can continue without exiting into direct mode if it contains the command ON ERROR GOTO. There are also reserved variables that contain error line (EL), error code (EC) and error message (EO).
6) There are no tape routines implemented in LOS 96. Therefore the default device for LOAD / SAVE / VERIFY is the device 8. With the command CATALOG$ the directory of a floppy disc can be automatically stored in a string. The INPUT command can now read up to 255 bytes at once.
7) The command PRINT FRE(1) gives information about the free space in bank 2 (variables) and the command PRINT FRE(0) about the free space in bank 1 (program code). POKE and PEEK commands can use logical addresses (range 0 - 131071, bank 0 starts at address 32768, bank 1 at address 65536 and bank 2 at address 98304).
8) With the command .s in direct mode the programming tool "SM-Kit/B" can be loaded. It needs about 3 KByte Ram and is located in memory after the LOS-system (at address $5f31). The most important commands (all in direct mode) are RENUMBER (.n), FIND (.f), DUMP (.v), TRACE (.r or .g) and MERGE (.m). The command .x quits SM-Kit. If SM-Kit is not loaded, the addresses $5f31 - $7fff can be used to expand bank 1 or bank 2 (more details see in the last chapter).
Useful addresses under LOS 96
The following addresses are useful for LOS programmers (LO-/HIGH-Byte):
$04e4 / $04e5 : Point at the end of the LOS 96 system in memory (Default v1.6 : $5f30).
$0028 / $0029 : Point at the beginning of the basic code in bank 1 (Default : $8001).
$00f8 / $00f9 : Point at the end of the basic code in bank 1.
$00ef / $00f0 : Point at the beginning of the basic stack in bank1 (Default: $ffef, grows downwards).
$00f1 / $00f2 : Point at the end of the basic stack in bank 1.
Note that, if the SM-Kit is not loaded, bank 1 can be expanded by manipulating the addresses $0028 and $0029. The following program increases or decreases the memory for bank 1 (basic code and stack):
100 a = 28672 : REM New start address for bank 1, for example $7000 (+ 4096 bytes for bank 1)
200 high = int ( a / 256 ) : POKE 40, a - high * 256 : POKE 41, high : REM Set Lo-/Highbyte
300 IF a-1 < 32768 THEN of = 0 ELSE of = 32768 : REM Set offset; POKE uses logical addresses !
400 POKE a-1+of, 0 : NEW : REM Initialize new basic start
Back to my homepage