▼ |
Labę! |
▼ |
’--------------------------- MCS Electronics---------------
' BASMON.BAS
'regli ile must match the chip you use in your target system $regfile = "m8def.dat"
'crystal must match too $crystal = 8000000
'baudrate must match the baudrate of the terminal emulator $baud = 19200
1[variables]
Di» Krk As Byte
Di* Address As ¥ord
Di* Adrl As Byte , Adrh As Byte
Di* VI As Byte
'[main program]
Do
Krk = ¥aitkey()
I£ Krk = "T" Then Print Chr(13);
Elseif Krk = "W" Then Address = ¥aitkey()
VI = ¥aitkey()
Out Address , VI Print Chr(13);
Elseif Krk = "R" Then Address = ¥aitkey()
VI = Inp(address)
Print Chr(vl);
Elseif Krk = "0" Then Adrl = ¥aitkey()
Adrh = ¥aitkey()
VI = ¥aitkey()
Address = Adrh * 256 Address = Address + Adrl Out Address , VI Print Chr(13);
Elseif Krk = "?" Then Print
End If Loop
'command 1address 1 for new 1 va.lue
OUT comma
'check if it is 1 i t is working
id
attęiched
1wait for address 'wa.it for va.lue 'write value 'conf irm
'wait for address 'get value 'write back value
'wait for ISB of 'wait for MSB 'wait for data
ad
iress
'just echo for test
'for ever
U
A