⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 89c51.bas

📁 82 sample programs written in BASCOM-8051 for 8051 developement
💻 BAS
字号:
'-------------------------------------------------------
'                    89C51.BAS
'   demonstration file for the Philips 89C51 RC and RD
'-------------------------------------------------------
'specify from code which chip we use:
$regfile = "89c51rd.dat"
'Reduce EMI by setting the AO bit in AUXR to 1
'This will disable ALE output except for external memory access
'There is no BASIC statement because it is easy to set the bit from ASM
Orl auxr,#1

'The 89C51RC has 256 bytes of ERAM and the 89C51RD has 768 bytes ERAM
'ERAM is the same as XRAM in BASCOM. The only difference is that
'you have no external RAM chip but that it is built into the chip
'By default the chip uses the internal ERAM when in BASCOM an XRAM variable is DIMmensioned.

'When you use only the internal ERAM you can specify how much
'is in the chip:
$ramstart = 0
$ramsize = 256
'When you also have an additional RAM chip you must specify the size
'of this chip instead

Dim S As Xram String * 10                                     'will use internal ERAM
S = "Hello world"
Print S
End

⌨️ 快捷键说明

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