DSKO$
This page was last modified 10:43, 27 January 2018 by NYYRIKKI. Based on work by Mars2000you and Gdx.

Contents

Effect

This instruction writes a sector (512 bytes) of the disk inserted in the specified drive with the data coming from a temporary buffer pointed by addresses &HF351 and &HF352.

Note: Despite the misleading "$" in name DSKO$ is an instruction and therefore does not take any brackets like DSKI$()-function does.

Syntax

DSKO$ <drive number>,<sector number>

Parameters

<drive number> is a value between 0 and 8, according the following tabel:

Number Drive
0 Default drive
1 Drive A
2 Drive B
3 Drive C
4 Drive D
5 Drive E
6 Drive F
7 Drive G
8 Drive H


<sector number> can vary between 0 and a maximum that depends from the used drive to format the disk. The highest possible maximum on MSX for floppy disks is 719 for single sided disks and 1439 for double sided disks.

Example

10 SCREEN 0 : WIDTH 38 : COLOR 15,4,4 : DEFINT I
20 PRINT "COPY SECTOR BY SECTOR"
30 PRINT : PRINT
40 PRINT "Insert source disk in drive A:"
45 PRINT "then press a key"
50 A$=INPUT$(1)
60 PRINT : PRINT
70 PRINT "Insert empty disk in drive B:"
75 PRINT "then press a key"
80 A$=INPUT$(1)
90 PRINT : PRINT
100 PRINT "TRACK:"
110 PRINT
120 PRINT "SECTOR:"
130 FOR I=0 TO 719
140 A$=DSKI$(1,I)
150 LOCATE 8,11: PRINT INT(I/9)
160 LOCATE 8,13: PRINT IMOD9
170 DSKO$ 2,I
180 NEXT I

Related to

DSKI$()

Compatibility

Disk BASIC 1.0 or higher