-
-
Neuer Benutzer
Öfters hier
so hat gestern geklappt nach austausch der vorgeschsalteten dioden als Spannungsversorgung durch einem festspannungsregler..
Habe im Forum noch das umgeschreibene AVR - DOS gefunden .. Läuft gut.. Nur wird bei mir zwar die angegebene Datei erstellt jedoch steht nichts darin .. ist das normal ?
mfg
$regfile = "m32def.dat"
$crystal = 16000000
' Adjust HW Stack, Soft-Stack and Frame size to 128 minimum each!!!
$baud = 9600
'Open "Com1:" As Binary As #1 ' use #1 for fs_interpreter
Config Clock = Soft
Enable Interrupts
Config Date = Mdy , Separator = .
Dim Btemp1 As Byte
Print "Wait for Drive"
$include "Config_MMC6.bas"
' Include here you driver for Compactflash/HardDisk or other
'$include "Config_CompactFlash_M128.bas" ' Does drive init too
'$Include "Config_HardDisk_M128.bas"
If Gbdriveerror = 0 Then
' Include AVR-DOS Configuration and library
$include "Config_AVR-DOS.BAS"
Print "Init File System ... ";
Btemp1 = Initfilesystem(1) ' Partition 1
' use 0 for drive without Master boot record
If Btemp1 <> 0 Then
Print "Error: " ; Btemp1 ; " at Init file system"
Else
Print " OK"
Print "Filesystem: " ; Gbfilesystem
Print "FAT Start Sector: " ; Glfatfirstsector
Print "Root Start Sector: " ; Glrootfirstsector
Print "Data First Sector: " ; Gldatafirstsector
Print "Max. Cluster Nummber: " ; Glmaxclusternumber
Print "Sectors per Cluster: " ; Gbsectorspercluster
Print "Root Entries: " ; Gwrootentries
Print "Sectors per FAT: " ; Glsectorsperfat
Print "Number of FATs: " ; Gbnumberoffats
Print "Disksize : " ; Disksize() ' show disk size in bytes
'Print "Disk free: " ; Diskfree()
Print "File Len: " ; Filelen( "TEST2.TXT") ' show free space too
End If
Else
Print "Error during Drive Init: " ; Gbdriveerror
End If
'File erstellen und etwas reinschreiben
'dim some test variables
Dim S As String * 60 , Fl As String * 12 , Ff As Byte
Dim X As Byte
Dim I As Word
Dim Sdatetime As String * 18
Fl = "test.txt"
S = "test this"
'Now we are getting to it
'We can specify a file handle with #1 or #2 etc. or we can ask for a free
' file handle with the FreeFile function. It will return a free handle if there is one.
Ff = Freefile() ' get a file handle
'With this file handle we refer to a file
Open Fl For Output As #ff ' open fikle for output
' we need to open a file before we can use the file commands
' we open it for OUTPUT, INPUT , APPEND or BINARY
' In this case we open it for OUTPUT because we want to write to the file.
' If the file existed, the file would be overwritten.
Print #ff , S ' print some data
Print #ff , S
Print #ff , S
Print #ff , "A constant" ; S
'Testsb Ff
Close #ff
Print "fertig"
End
' If you want to test with File-System Interpreter uncomment next line
'$include "FS_Interpreter.bas"
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
-
Foren-Regeln
Lesezeichen