Working with BOS
Subsequent to BV-Basic version 2.xx there have been some minor changes, the older archived version of this page is here. Note version 2 does not have xload and reload.
This application provides file and directory access as well as loading files. Not all standard DOS commands are available as these can be easily provided by the host PC. BV-Basic Version 2.xx will read and write FAT16 and FAT32 including the newer HC SD Cards.
| format
csd dir cd md del type |
| fdisk |
| fdisk |
This command should not really be needed, however if some experimenting has been going on with writing to sector 0 then it may. It will create a new partition on sector 0 of the SD Card. The size of the partition will occupy the whole Card. This size is obtained form the Cards, ID string by fdsik.
| format |
| format [a: b:]type
secPerClust format b 16 8 |
Format can be done on a PC but for convenience it is included here. Also if the filing system is in a poor state the PC may not recognize it, worse still the PC may format the card to FAT12. This format will format the card to either FAT16 or FAT32, depending on the size of the card.
The FAT system is determined by the number of clusters that are on the Card (disk) as follows:
Less than 4085
FAT12
Between 4085 and 65525 FAT16
Greater then 65525
FAT32
Sectors are always 512 bytes so the sectors per cluster must fall into the file system that you want. Take for example a 16MB Card to be formatted to FAT16 (Windows will do this to FAT12).
16000000 / 512 / 8 = 7,812 This is 7,812 clusters which is within the FAT16 range using 8 as the number of sectors per cluster. In practice it will be less than this as you never get 16MB form a 16MB card. The Format command may choose a different value from the one you have specified as it knows the exact size of the Card.
| csd |
| csd <a: or b:> csd b: |
Changes the current card to a: or b:. If a card does not exists an error will be reported. The current Card is used whenever a: or b: is NOT specified.
| dir |
| dir |
Lists the current directory or subdirectory on the default card. There are no options that can be followed with this such as *. or fr*.*
| cd |
| cd <location> cd b:sub1 cd sub2 cd |
Changes the current directory on the specified drive.
| md |
| md <new directory> md sub3 |
Creates (makes) a new directory on the specified drive.
| del |
| del <file name> del fred.bas del "file name.txt" |
Deletes a file form the specified drive and location.
| type |
| type <file name> type local.bas |
List a text file to the screen so that the contents can be seen, this is similar to the ‘cat’ command in Linux.