ZX NU - H4th - VDrive

ZX-Team Forum
Antworten
rune
User
Beiträge: 14
Registriert: 02.04.2016, 19:17

ZX NU - H4th - VDrive

Beitrag von rune » 28.02.2019, 20:03

Hi, I'm not sure if this has been done for H4th/VDrive as my German isnt good enough to search the forums sensibly.

I've written some new Forth words to extend the commands available for H4th & VDrive users on the ZX NU.

All work except the SEK command, which I havent tested yet. Here they are...

: SND SEND PRT CR ;
: DIR " DIR" SND ;
: CD " CD " + SND ;
: MKD " MKD " + SND ;
: DLD " DLD " + SND ;
: DLF " DLF " + SND ;
: CLF " CLF" SND ;
: IDD " FS" SND " IDD" SND ;
: FS " FS" SND ;
: DVL " DVL" SND ;
: DSN " DSN" SND ;
: REN " REN " + SND ;
: SEK " SEK" SND ;
: VSAVE CDUP " DLF " + SND
VSTORE ;

SND - SND sends the command to the VDRIVE, runs the promt command and then a carriage return. It isnt intended to be used directly.

DIR - DIR I know this is in the ROM, but this version returns to the prompt on the H4th console screen.

CD, MKD & DLD are all directory commands
CD - " <dir>" CD to move into a child directory and " .." CD to move back to the parent directory
MKD - " <dirname>" MKD to create a new directory
DLD - " <dirname>" DLD to delete an empty directory

DLF & CLF are file commands
DLF - " <filename>" DLF to delete a file
CLF - CLF to close the open file. This is useful to get everything working again when the VDRIVE is waiting for some action (light is blinking) and INIT, PRT, DIR etc dont work.

IDD - IDD displays information about the media. It calls FS so that the space remaining is displayed.
FS - FS calculates the free space left on the media

DVL - DVL displays the media device label - Not too useful
DSN - DSN displays the media device serial number- Not too useful

REN - " <filename> <newfilename>" REN renames a file
SEK - <number> SEK moves the next character pointer to <dword> in an open file

VSAVE - " <filename>" VSAVE will delete the file, and then store it again using the same name. This is needed because the new data is appened onto the end of an existing file. For VLOAD to work correctly, the file length needs to be 512 bytes long.

As things stand, there is no error handling and existing words can be improved and new ones written. Together with the VSTORE, VLOAD, DIR, INIT and PRT I think using H4th is a little easier.

Another word that I think would be useful is COPY

Dave

Antworten