Difference between revisions of "Caruh"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
(I.1. General information)
Line 1: Line 1:
Caruh - the Multitasking-Manager for FutureOS
+
Caruh - the Multitasking-Manager for [[FutureOS]]
  
 
= I. Overview =
 
= I. Overview =
Line 51: Line 51:
 
Pressing the 'ESCape' key must switch the task back to the background!
 
Pressing the 'ESCape' key must switch the task back to the background!
 
Caruh itself checks for ESC. But the task must / should do that too.
 
Caruh itself checks for ESC. But the task must / should do that too.
 +
 +
= II. Using the Tasker Caruh =
 +
 +
== II.1. Submenu File ==
 +
=== Load <T>ask - Hotkey: t or T - To load and start a Task ===
 +
This function is to load a Task of a maximum file size of 16 KB.
 +
The Task will be started right away.
 +
 +
=== Save Tas<k> - Hotkey: k or K - To save a Task ===
 +
This function provides a way to save a 16 KB sized memory dump of a Task to any
 +
kind of media. Saving works in cooperation with the Task, so the Task can get
 +
prepared to be saved.
 +
A saved Task can be used to continue it later or on another computer (also it
 +
can be used for debugging purposes).
 +
 +
=== Load '''a'''ll - Hotkey: a or A - Loads and starts all tagged files as Tasks ===
 +
This function can load a bunch of files as Tasks. Usually you would first mark
 +
all the Task-files in the FutureOS Turbo Destiop you would like to use.
 +
Then use this function to load and start them all.
 +
This way you can start up with a selection of your favorite Tasks at once.
 +
 +
=== '''S'''ave tabl - Hotkey: s or S - Saves 16 KB Task-Table (--> for debugging) ===
 +
This function actually saves 16 KB of the main RAM from &4000 to &7FFF.
 +
This area contains Task variables, the Task Table and the VRAM Table.
 +
Yes, this is for debugging purposes :-)
 +
 +
=== '''R'''ead DIRs - Hotkey: r or R - Reads the DIRs of all tagged drives ===
 +
Here you can select the drives / media / devices you want to use and load their
 +
DIRectories. This will make the devices accessible for Load and Save operations
 +
 +
=== '''C'''lose - Hotkey: c or C - End all Tasks. Quit this application ===
 +
This function will end and clear all Tasks, release the previously used E-RAM
 +
of the Tasks and end the Application Caruh.
 +
 +
=== '''V'''ersion - Hotkey: v or V - Shows version number of Caruh ===
 +
This one will display the name of the application Caruh, its current version
 +
number and the date of the last major change of code.
 +
 +
=== '''Q'''uit - Hotkey: q or Q - End all Tasks. Quit this application ===
 +
See ''''C'''lose' above
  
  

Revision as of 09:03, 1 November 2023

Caruh - the Multitasking-Manager for FutureOS

I. Overview

I.1. General information

The 'Caruh' application is part of the FutureOS operating system. Caruh is a tasker, that's a multitasking manager. Or rather, a program to run several applications (tasks) at the same time on the CPC. The individual 'Tasks' can behave cooperatively.

What properties does Caruh have or do the Tasks have?

  • The Caruh application is located in the lower RAM between &0000 and &37FF. The area from &4000 to &7FFF is used in addition (for buffers, tables)
  • Caruh works in screen MODE 2, in the 80 character x 25 line format
  • CBM is used as the user interface: So Caruh can be used like to operate most other FutureOS applications.
  • In addition to the pull-down menus at the top of the screen, there is another Task-Bar at the bottom of the screen. The names of four tasks are displayed there in the middle. With the arrows all the way left and right you can scroll horizontally through the names of the tasks
  • The surface of Caruh offers functions to load, save, terminate or change the priority of one or more tasks
  • The maximum number of different tasks is 255 (with a 4 MB RAM expansion)
  • A task can reach a maximum size of 15.75 KB
  • The tasks are managed dynamically. Task numbers can therefore change. For example, when a task is deleted, the higher task numbers are adjusted
  • Each task has its own 16 KB expansion RAM (E-RAM). These E-RAMs are banked in between &4000 and &7FFF. Accordingly a task is always assembled at the start address &4000.

I.2. Types of Tasks

There are foreground and background tasks. A background task can be switched to be a foreground task by the user - if the task allows this (is capable of).

Foreground Tasks

A foreground task is able to take over the entire screen and to write on it. In addition he can also scan the keyboard.

He has to respond to the 'ESCape' key. In case the key was pressed then the task must return control back to Caruh.

Every foreground task is always also a background task (as long as it has not taken over the output to the screen).

Only the user can switch a background task to the foreground! There can only be one foreground task at a time!

Background Tasks

A background task is only allowed to write on the common screen. There he can reserve screen areas.

Summary

1. A task can be a (pure) background task

  • He may reserve parts of the general screen and write on it
  • He is not allowed to take over the entire screen
  • It's identified by a cleared bit #0 at address &7FF8 (TCON8) in its E-RAM

2. A task can be switched to the 'foreground' by Caruh.

  • There is always only one foreground task
  • When starting Caruh, Caruh itself is the foreground task
  • If another task becomes the 'Foreground Task', it's allowed to use the entire screen area. And the keyboard and the joysticks.
  • However, he must also be able to give control back to Caruh at 'ESC'
  • It's identified by a set bit 0 at address &7FF8 (TCON8) in E-RAM

Attention: To be able to switch a task to the foreground, bit 1 at address &7FF8 (TCON8) must be set. This is done by the task itself.

Pressing the 'ESCape' key must switch the task back to the background! Caruh itself checks for ESC. But the task must / should do that too.

II. Using the Tasker Caruh

II.1. Submenu File

Load <T>ask - Hotkey: t or T - To load and start a Task

This function is to load a Task of a maximum file size of 16 KB. The Task will be started right away.

Save Tas<k> - Hotkey: k or K - To save a Task

This function provides a way to save a 16 KB sized memory dump of a Task to any kind of media. Saving works in cooperation with the Task, so the Task can get prepared to be saved. A saved Task can be used to continue it later or on another computer (also it can be used for debugging purposes).

Load all - Hotkey: a or A - Loads and starts all tagged files as Tasks

This function can load a bunch of files as Tasks. Usually you would first mark all the Task-files in the FutureOS Turbo Destiop you would like to use. Then use this function to load and start them all. This way you can start up with a selection of your favorite Tasks at once.

Save tabl - Hotkey: s or S - Saves 16 KB Task-Table (--> for debugging)

This function actually saves 16 KB of the main RAM from &4000 to &7FFF. This area contains Task variables, the Task Table and the VRAM Table. Yes, this is for debugging purposes :-)

Read DIRs - Hotkey: r or R - Reads the DIRs of all tagged drives

Here you can select the drives / media / devices you want to use and load their DIRectories. This will make the devices accessible for Load and Save operations

Close - Hotkey: c or C - End all Tasks. Quit this application

This function will end and clear all Tasks, release the previously used E-RAM of the Tasks and end the Application Caruh.

Version - Hotkey: v or V - Shows version number of Caruh

This one will display the name of the application Caruh, its current version number and the date of the last major change of code.

Quit - Hotkey: q or Q - End all Tasks. Quit this application

See 'Close' above