Garret
10.02.2005, 13:54
Das steht immer am Ende der Beispielprogramme! Und ich weiß nicht wofür das eigentlich gut ist und deshalb wollte ich mal fragen ob mir das jemand erklären kann!
z.B. das hier SUBCMD=1:sys COMNAV:return was bedeutet das!
'---------- INIT---------------
gosub SUBSYS_PWR_ON
beep 368,10,0:pause 50
'---- SYSTEM OPERATION MODE (NO INTERRUPT) ----
gosub NO_ACS_INT:beep 368,10,0:SYS ACS_LO
'IIIIIIIIIII LED DRIVER IIIIIIIIIIIIIIIII
#LED1ON
LED1_F=on:goto EXTPORT_WRITE
#LED1OFF
LED1_F=off :goto EXTPORT_WRITE
#LED2ON
LED2_F=on:goto EXTPORT_WRITE
#LED2OFF
LED2_F=off:goto EXTPORT_WRITE
#LED3ON
LED3_F=on:goto EXTPORT_WRITE
#LED3OFF
LED3_F=off:goto EXTPORT_WRITE
#LED4ON
LED4_F=on:goto EXTPORT_WRITE
#LED4OFF
LED4_F=off:goto EXTPORT_WRITE
#LEDSOFF
EXTPORT=EXTPORT and &H0F:goto EXTPORT_WRITE
#EXTPORT_WRITE
SYS SYSTEM:pulse STROBE:RETURN
'IIIIII SYSTEMROUTINEN COMM/NAV SYSTEM IIIII
#GET_IRDATA
SUBCMD=1:sys COMNAV:return
#SEND_IRDATA
SUBCMD=0:sys COMNAV:return
#RC5
SUBCMD=4:sys COMNAV:LBYTE= HBYTE and &HFC
HBYTE=00:SUBCMD=2:sys COMNAV:return
#RC5_INT
SUBCMD=4:sys COMNAV:LBYTE= (HBYTE and &HFE)or 2
HBYTE=00:SUBCMD=2:sys COMNAV:return
#REC80
SUBCMD=4:sys COMNAV:LBYTE= (HBYTE or &H01)and&HFD
HBYTE=00:SUBCMD=2:sys COMNAV:return
#REC80_INT
SUBCMD=4:sys COMNAV:LBYTE= (HBYTE or &H03)
HBYTE=00:SUBCMD=2:sys COMNAV:return
'IIIIII SYSTEMROUTINEN SYSTEM IIIIIIIIIIII
#NO_ACS_INT
SUBCMD=4:sys COMNAV:LBYTE= HBYTE and &HFB
HBYTE=00:SUBCMD=2:sys COMNAV:return
#ACS_INT_200
SUBCMD=4:sys COMNAV:LBYTE= HBYTE or &H04
HBYTE=50:SUBCMD=2:sys COMNAV:return
#SUBSYS_PWR_ON
sdio=on:sclio=on:strobe=off:EXTPORT=(EXTPORT and &HFE)or 8
sys SYSTEM:return
#SUBSYS_PWR_OFF
EXTPORT=(EXTPORT and &HF7)or 1:sys SYSTEM
deact sdio:deact sclio:return
#CLR_DISTANCE
SUBCMD=3:sys COMNAV:return
#L_DISTANCE
SUBCMD=6:sys COMNAV:return
#R_DISTANCE
SUBCMD=7:sys COMNAV:return
z.B. das hier SUBCMD=1:sys COMNAV:return was bedeutet das!
'---------- INIT---------------
gosub SUBSYS_PWR_ON
beep 368,10,0:pause 50
'---- SYSTEM OPERATION MODE (NO INTERRUPT) ----
gosub NO_ACS_INT:beep 368,10,0:SYS ACS_LO
'IIIIIIIIIII LED DRIVER IIIIIIIIIIIIIIIII
#LED1ON
LED1_F=on:goto EXTPORT_WRITE
#LED1OFF
LED1_F=off :goto EXTPORT_WRITE
#LED2ON
LED2_F=on:goto EXTPORT_WRITE
#LED2OFF
LED2_F=off:goto EXTPORT_WRITE
#LED3ON
LED3_F=on:goto EXTPORT_WRITE
#LED3OFF
LED3_F=off:goto EXTPORT_WRITE
#LED4ON
LED4_F=on:goto EXTPORT_WRITE
#LED4OFF
LED4_F=off:goto EXTPORT_WRITE
#LEDSOFF
EXTPORT=EXTPORT and &H0F:goto EXTPORT_WRITE
#EXTPORT_WRITE
SYS SYSTEM:pulse STROBE:RETURN
'IIIIII SYSTEMROUTINEN COMM/NAV SYSTEM IIIII
#GET_IRDATA
SUBCMD=1:sys COMNAV:return
#SEND_IRDATA
SUBCMD=0:sys COMNAV:return
#RC5
SUBCMD=4:sys COMNAV:LBYTE= HBYTE and &HFC
HBYTE=00:SUBCMD=2:sys COMNAV:return
#RC5_INT
SUBCMD=4:sys COMNAV:LBYTE= (HBYTE and &HFE)or 2
HBYTE=00:SUBCMD=2:sys COMNAV:return
#REC80
SUBCMD=4:sys COMNAV:LBYTE= (HBYTE or &H01)and&HFD
HBYTE=00:SUBCMD=2:sys COMNAV:return
#REC80_INT
SUBCMD=4:sys COMNAV:LBYTE= (HBYTE or &H03)
HBYTE=00:SUBCMD=2:sys COMNAV:return
'IIIIII SYSTEMROUTINEN SYSTEM IIIIIIIIIIII
#NO_ACS_INT
SUBCMD=4:sys COMNAV:LBYTE= HBYTE and &HFB
HBYTE=00:SUBCMD=2:sys COMNAV:return
#ACS_INT_200
SUBCMD=4:sys COMNAV:LBYTE= HBYTE or &H04
HBYTE=50:SUBCMD=2:sys COMNAV:return
#SUBSYS_PWR_ON
sdio=on:sclio=on:strobe=off:EXTPORT=(EXTPORT and &HFE)or 8
sys SYSTEM:return
#SUBSYS_PWR_OFF
EXTPORT=(EXTPORT and &HF7)or 1:sys SYSTEM
deact sdio:deact sclio:return
#CLR_DISTANCE
SUBCMD=3:sys COMNAV:return
#L_DISTANCE
SUBCMD=6:sys COMNAV:return
#R_DISTANCE
SUBCMD=7:sys COMNAV:return