PDA

View Full Version : serout



jonas2
- 4th February 2006, 10:37
Hello They is my first steps with the peak BASIC, I seek explanations On the instructions canary and serout, I takes as the example of Melanie: Thank you for your assistance
' Blink LED slowly to indicate Good Read
' --------------------------------------
Pause 500:Low GreenLED:Pause 500:High GreenLED
DEBUG REP $00\16,13,10
FOR COUNTERA=0 to 39
DEBUG HEX2 MAGDATA[COUNTERA]
NEXT COUNTERA
DEBUG 13,10
endif

SO con 0 ' Define serial output pin
N2400 con 4 ' Set serial mode
B0 var byte
B1 var byte

loop:
For B0 = 40 To 1 Step -1 '
For B1 = 0 To 40 Step B0 '
Serout SO,N2400,[#B1," "]
Next B1
Serout SO,N2400,[13,10] ' End of line
Pause 100 ' Delay
Next B0
Goto loop

jonas2
- 4th February 2006, 15:50
QUOTE=jonas2]Hello They is my first steps with the peak BASIC, I seek explanations On the instructions canary and serout, I takes as the example of Melanie: Thank you for your assistance
' Blink LED slowly to indicate Good Read
' --------------------------------------
Pause 500:Low GreenLED:Pause 500:High GreenLED
DEBUG REP $00\16,13,10
FOR COUNTERA=0 to 39
DEBUG HEX2 MAGDATA[COUNTERA]
NEXT COUNTERA
DEBUG 13,10
endif

SO con 0 ' Define serial output pin
N2400 con 4 ' Set serial mode
B0 var byte
B1 var byte

l
For B0 = 40 To 1 '
'
Serout SO,N2400,[#B0," "]

Serout SO,N2400,[13,10] ' End of line
Pause 100 ' Delay
Next B0
Goto loop[/QUOTE]