fjpompeo
Advanced Member level 1
Unknown programming language
Can someone help me how to compile or generate HEX file of the language below? Unknown programming language, I have no idea what it is and have never seen it before.
Can someone help me how to compile or generate HEX file of the language below? Unknown programming language, I have no idea what it is and have never seen it before.
Code:
Begin:
'PIC 16F628 WISSEL DMX RX/TX 8 KANALEN
@ DEVICE PIC16F628,XT_OSC
@ DEVICE PIC16F628,MCLR_OFF
@ DEVICE PIC16F628,BOD_OFF
@ DEVICE PIC16F628,LVP_OFF
@ DEVICE PIC16F628,CPD_OFF
@ DEVICE PIC16F628,PROTECT_ON
DEFINE OSC 4
DEFINE HSER_TXSTA 24H
DEFINE HSER_RCSTA 90H
DEFINE HSER_SPBRG 4
DEFINE HSER_CLROERR 1
CMCON = 7
TRISA = %00111111
TRISB = %00000011
ADRSA0 VAR PORTA.0
ADRSA1 VAR PORTA.1
ADRSA2 VAR PORTA.2
ADRSA3 VAR PORTA.3
ADRSA4 VAR PORTA.4
RX_TX VAR PORTB.0
PININ VAR PORTB.1
PINOUT VAR PORTB.2
SELEKT VAR PORTB.3
SEL0 VAR PORTB.4
WDAT VAR PORTB.5
WCLK VAR PORTB.6
GEGEVENS VAR BYTE[8]
DUMMY1 VAR BYTE
DUMMY2 VAR BYTE
DUMMY3 VAR BYTE
DUMMY4 VAR BYTE
DUMMY5 VAR BYTE
B1 VAR BYTE
I VAR BYTE
DMXADRS VAR BYTE
SCHAK VAR BYTE
X VAR BYTE
Y VAR BYTE
Clear
'CHECK IF IT'S AN INPUT OR AN OUTPUT CARD
ERX: IF RX_TX = 0 Then GoTo T_X
'WAITING DATA FROM MASTER GET STARTED:
SELEKT = 0
HSerin 1,BEGIN,[WAIT("$"),B1]
IF B1 = 0 Then GoTo VERDER
GoTo BEGIN
'ADDRESS CORRESPONDES AND RECORD DATA
VERDER: For I = 0 TO 7
HSerin [B1]
GEGEVENS(I) = B1
Next
'MAKE ROOM FOR DATA HERE
DMXADRS = PORTA &%00111111
X = DMXADRS / 8
Y = DMXADRS // 8
IF Y = 0 Then
DUMMY1 = GEGEVENS(X)
GoTo ERUIT
EndIF
For I = 1 TO Y
DUMMY1 = GEGEVENS(X) >> 1
DUMMY2 = GEGEVENS(X+1)
DUMMY1.7 = DUMMY2.0
GEGEVENS(X) = DUMMY1
DUMMY2 = GEGEVENS(X+1) >> 1
GEGEVENS(X+1) = DUMMY2
Next
ERUIT:
GoSub DIGOUT_8
GoTo BEGIN
DIGOUT_8: 'HEF4094
SEL0 = 0
WCLK = 0
PauseUs 10
ShiftOut WDAT,WCLK,1,[DUMMY1 \ 8]
PauseUs 10
SEL0 = 1
PauseUs 10
SEL0 = 0
WCLK = 0
PauseUs 10
Return
T_X:
TRISB.6 = 1
DMXADRS = PORTA &%00011111
IF DMXADRS = 0 Then DMXADRS = 64
'HEF 4014
SEL0 = 1
PauseUs 5
WDAT = 1
PauseUs 5
WDAT = 0
PauseUs 5
SEL0 = 0
PauseUs 10
ShiftIn WCLK,WDAT,0,[SCHAK \8]
PauseUs 10
GEGEVENS(0) = SCHAK
SELEKT = 0
HSerin 1,T_X,[WAIT("$"),B1]
IF B1 = DMXADRS Then GoTo VDR
GoTo T_X
VDR:
PauseUs 300
SELEKT = 1
B1 = "$"
GoSub DURUIT
B1 = DMXADRS
GoSub DURUIT
B1 = GEGEVENS(0)
GoSub DURUIT
GoTo T_X
DURUIT:
HSerout[B1]
Return
End:
Last edited by a moderator: