eeprom.bas

来自「82 sample programs written in BASCOM-805」· BAS 代码 · 共 22 行

BAS
22
字号
'-----------------------------------------------------
'                  (c) 1998-2000 MCS Electronics
'    EEPROM.BAS demonstrates WRITEEEPROM & READEEPROM
'    of the AT89S8252 chip
'    Make sure to select the 89s8252.DAT file!
'-----------------------------------------------------
$regfile = "89s8252.dat"

Dim S As String * 15 , S2 As String * 10'reserve space for internal strings
S = "Hello" : S2 = "test"

Dim L As Long
L = 12345678
Writeeeprom S
Writeeeprom S2                          'write strings
Writeeeprom L                           'write long

S = "" : S2 = "" : L = 0                'clear variables
Readeeprom L : Print L                  'read back from eeprom
Readeeprom S : Print S
Readeeprom S2 : Print S2
End

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?