?? flashdisk.bas
字號:
$Regfile = "M103Def.dat"
$Crystal = 4000000
' 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
config pinb.6 = Output
config pinb.7 = Output
portb.6 = 0
portb.7 = 1
goto BehindIncludes
$Include "FlashCardDrive.bas"
$Include "Interpreter.bas"
BehindIncludes:
' Init Port and Card
Print #1 , "Setup Port and Reset Card ... ";
if DriveCheck() = 1 then
DriveInit
else
print #1 , "Card not inserted, check Card!"
end if
Print #1 , "OK"
print #1 , "Ready for Commands"
PrintPrompt
Dim gbInp as Byte ' holds user input
' Handling communication with user
do
gbInp = inkey(#1) ' get user input
if gbInp <> 0 then ' something typed in?
toggle portb.7
GetInput gbInp ' give input to interpreter
end if
loop ' do forever
End 'end program
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -