Download MCS Electronics , 1995-2008 - Departamento de Automatización y

Transcript
BASCOM Language Reference
277
register R24.
With the redirection of the LCD statement, you can use your own routines.
See also
$LCDPUTDATA
277
Example
$regfile = "m48def.dat"
$crystal = 4000000
$baud = 19200
Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 ,
Databits = 8 , Clockpol = 0
'dimension used variables
Dim S As String* 10
Dim W As Long
'inform the compiler which routine must be called to get serial
'characters
$lcdputdata= Myoutput
$lcdputctrl= Myoutputctrl
'make a never ending loop
Do
Lcd "test"
Loop
End
'custom character handling routine
'instead of saving and restoring only the used registers
'and write full ASM code, we use Pushall and PopAll to save and 'restore
'all registers so we can use all BASIC statements
'$LCDPUTDATA requires that the character is passed in R24
Myoutput:
Pushall
registers
'your code here
Popall
registers
Return
MyoutputCtrl:
Pushall
registers
'your code here
Popall
registers
Return
6.21
$LCDPUTDATA
Action
Specifies that LCD data output must be redirected.
© 2008 MCS Electronics
'save all
'restore
'save all
'restore