?? drivertest.bas
字號:
$regfile = "M103Def.dat"
$crystal = 4000000
'$crystal = 1000000
Dim Testval As Word
Dim Ercode As Byte
' Use Serial 0 for communication with PC-Terminal
$baud = 9600
Config Serialin = Buffered , Size = 20
Open "Com1:" For Binary As #1
' If you use a software-UART, define it with #1
Enable Interrupts
Goto Behindincludes
$Include "FAT16Driver.bas"
Behindincludes:
' Init Port and Card
Print "V1.0 Setup Port and Reset Card ... ";
If Drivecheck() = 1 Then
Driveinit
Else
Print #1 , "Card not inserted, check Card!"
End
End If
Print "OK"
'debug info
Print "DriverTest Starting."
'read the mbr
Call Init()
'create a file on the root directory
Call Createorappendtofile( "NEWFILE.TXT")
'write some data to the file
Ercode = Writedata( "The quick brow fox jumped over the lazy dog!" , 1)
'list the file contents
Call Listfile( "NEWFILE.TXT")
'more debug info
Print "Finished DriverTest."
'Quit
Goto Quit
Quit:
End
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -