HomeMagiCSpecial error-messages in MagiCIconification in MagiC

11.9 The background-DMA of MagiC

As of MagiC 3, the whole of the DOS, inclusive of access to DOS file systems, is reentrant and runs in the background. Thus it is possible to edit files on Drive A: without perceptibly slowing down the computer at floppy disk accesses. A prerequisite for this, however, are floppy and hard drive routines that work in the background.

So that the hard disk driver does not need to make these functions available, the BIOS of MagiC contains all the required functions. Via the MagX cookie (component hddrv_functions) one obtains access to the following structure, which contains pointers to the important routines of the background-DMA:

typedef struct
    LONG dma_begin ( VOID);
    LONG dma_end   ( VOID );
    LONG dma_wait  ( d0 = LONG ticks_200hz );
    LONG ncr_begin ( VOID );
    LONG ncr_end   ( VOID );
    LONG ncr_wait  ( d0 = LONG ticks_200hz );

Note: Directly before the structure (2 bytes before) lies a WORD that gives the length of the table in LONGs (in this case 6). All of the 6 pointers lie in the system variables region and may be changed in case of need. The internal functions for the floppy drive also jump via the 6 pointers. Important: The hddrv_functions pointer in MagX cookie may not be altered!

At boot-time the preemptive multitasking is switched off (actually the multitasking itself is switched off) but the routines also work before installation of the AES, whereby the wait routines then do a 'busy waiting' (as they do when switching off the preemptive multitasking), and the semaphore routines simply do nothing (apart from setting and clearing flock).

This hypertext contains extracts from MagiC's BIOS that should demonstrate how the whole thing works. A few words about this:

See also: About the BIOS   About the GEMDOS   MagiC's XFS-concept

HomeMagiCSpecial error-messages in MagiCIconification in MagiC