In this task, the job is to create a new empty file called "output.txt" of size 0 bytes
and an empty directory called "docs". This should be done twice: once "here", i.e. in the current working directory and once in the filesystem root.

PROC Dir(CHAR ARRAY filter)
  CHAR ARRAY line(255)
  BYTE dev=[1]
 
  Close(dev)
  Open(dev,filter,6)
  DO
    InputSD(dev,line)
    PrintE(line)
    IF line(0)=0 THEN
      EXIT
    FI
  OD
  Close(dev)
RETURN
 
PROC CreateFile(CHAR ARRAY fname)
  BYTE dev=[1]
 
  Close(dev)
  Open(dev,fname,8)
  Close(dev)
RETURN
 
PROC Main()
  CHAR ARRAY filter="D:*.*", fname="D:OUTPUT.TXT"
 
  PrintF("Dir ""%S""%E",filter)
  Dir(filter)
 
  PrintF("Create file ""%S""%E%E",fname)
  CreateFile(fname)
 
  PrintF("Dir ""%S""%E",filter)
  Dir(filter)
RETURN