89c51.bas

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

BAS
27
字号
'-------------------------------------------------------
'                    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 + =
减小字号Ctrl + -
显示快捷键?