DSK sector management

In order to manage floppy disks in sector mode, Rasm offers a set of functions.

Some functions run immediately, such as creating, loading and updating an EDSK.

All other functions are deferred, so that Rasm has completed its assembly when these functions are called.

Immediate execution functions

EDSK   CREATE,'filename.dsk',DATA|VENDOR|UNFORMATED,nbtracks[,INTERLACED]
EDSK READSECT,'filename.dsk','location',<exactsize>
EDSK  UPGRADE,'filename.dsk','outputfilename.dsk'

Deferred execution functions

EDSK WRITESECT,'filename.dsk',<start_addr>,<length>,'location'
EDSK    GAPFIX,'filename.dsk',TRACK|ALLTRACKS,<track>
EDSK       MAP,'filename.dsk'
EDSK      DROP,'filename.dsk','location'
EDSK       ADD,'filename.dsk','location',<size>,...
EDSK    RESIZE,'filename.dsk','location',<size>,...
EDSK     MERGE,'filename.dsk:side','filename.dsk:side','outputfilename.dsk'

How to use 'filename.dsk:side'?

You can fill in this field with just the file name; if the floppy disk image contains 2 sides, then the first will be used by default. If you wish to use the side of an image file, the possibilities are :A, :B, :0 and :1.

How to use location ?

The location defines a track as well as sectors if required. Values can be declared in any base (decimal, hexa, …) and you can define multiple locations by using the "space" character as a separator. With the "minus" character, you can also define intervals. Some examples below

'5'            => track 5
'5:#C2'        => sector #C2 track 5
'0-5'          => tracks 0 to 5
'0-5:$C2-0xC9' => sectors #C2 to #C9 on track 0 to 5
'0:#C1 0:#C3'  => sectors #C1 and #C3 on track 0

EDSK CREATE,'filename.dsk',DATA|VENDOR|UNFORMATED,nbtracks[,INTERLACED]

Creation of a floppy disk in DATA or VENDOR format or with empty tracks (used in conjunction with ADD), the number of tracks is the number per side. The INTERLACED keyword can be specified as an option for DATA or VENDOR diskettes.

EDSK READSECT,'filename.dsk','location',<exactsize>

Read sectors from memory. The amount of data to be read is mandatory. If there are not enough sectors to reach the data quantity, Rasm will trigger an error.

EDSK UPGRADE,'filename.dsk','outputfilename.dsk

This function has a dual purpose. It can be used to convert an old DSK file into an EDSK file or, more simply, to copy one DSK file into another.

EDSK WRITESECT,'filename.dsk',<start_addr>,<length>,'location'

Save the assembled data on a floppy disk. The data will be read from the bank where the WRITESECT is located. If the track/sector list provided is insufficient to record the total data, an error will be triggered.

EDSK GAPFIX,'filename.dsk',TRACK|ALLTRACKS,<track>

Automatically recalculates GAP length so that track lap is less than or equal to 6250 bytes.

EDSK MAP,'filename.dsk'

Displays a map of the diskette sectors and track information

EDSK DROP,'filename.dsk','location'

Deletes one or more sectors from the floppy disk.

EDSK ADD,'filename.dsk','location',<size>,…

Add one or more sectors to the floppy disk, of size <size> corresponding to the FDC size i.e.:

0 : 128
1 : 256
2 : 512
3 : 1024
4 : 2048
5 : 4096
6 : 6250 ; truncated size

Larger sizes are not worth managing.

EDSK RESIZE,'filename.dsk','location',<size>,…

Used to resize one or more sectors, the size corresponds to the FDC size (see table above).

EDSK MERGE,'filename.dsk:side','filename.dsk:side','outputfilename.dsk'

Merge two single- or double-sided images into one double-sided file

Sauf mention contraire, le contenu de cette page est protégé par la licence Creative Commons Attribution-ShareAlike 3.0 License