📄 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 + -