This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What's wrong with this code

Well my program is a car security system which detects intrusion ,fire,gas using 4 sensors and sends an sms via GSM modem. Given below is my code which is in BASCOM software which when compiled given numerous errors. CAn you tell me what could be the problem???
Also im using 89S52 microcontroller

$crystal = 11059200

Sw1 Alias P0.0
Sw2 Alias P0.1
Sw3 Alias P0.2
Sw4 Alias P0.3
Sw5 Alias P0.4

Led0 Alias P1.0
Led1 Alias P1.1
Led2 Alias P1.2
Led3 Alias P1.3
Led4 Alias P1.4

Bz Alias P3.6
Relay Alias P3.7

Main:

Led0 = 1
Bz = 0
Relay = 0

Led1 = 0
Led2 = 0
Led3 = 0
Led4 = 0

Read:

X =(q0)p0
X =(q1)p0
X =(q2)p0
X =(q3)p0

Select Case X(value)

Case 1:

Sms1:

Led0 = 0

Led1 = 1 Led2 = 0 Led3 = 0 Led4 = 0

Bz = 1 Relay = 1

Print "AT+CMGS=1,";

Waitms 100

Print "9967863284"; Wait 3

Print Chr(34)

Led0 = 1

Led1 = 0 Led2 = 0 Led3 = 0 Led4 = 0

Bz = 0 Relay = 0 Goto Read

Case 2:

Sms2:

Led0 = 0 Led1 = 0 Led2 = 1 Led3 = 0 Led4 = 0

Bz = 1 Relay = 1

Print "AT+CMGS=2,";

Waitms 100

Print "9967863284"; Wait 3

Print Chr(34)

Led0 = 1

Led1 = 0 Led2 = 0 Led3 = 0 Led4 = 0

Bz = 0 Relay = 0 Goto Read

Case 4:

Sms3:

Led0 = 0 Led1 = 0 Led2 = 0 Led3 = 1 Led4 = 0

Bz = 1 Relay = 1

Print "AT+CMGS=3,";

Waitms 100

Print "9967863284"; Wait 3

Print Chr(34)

Led0 = 1

Led1 = 0 Led2 = 0 Led3 = 0 Led4 = 0

Bz = 0 Relay = 0 Goto Read

Case 8:

Sms4:

Led0 = 0 Led1 = 0 Led2 = 0 Led3 = 0 Led4 = 1

Bz = 1 Relay = 1

Print "AT+CMGS=4,";

Waitms 100

Print "9967863284"; Wait 3

Print Chr(34)

Led0 = 1

Led1 = 0 Led2 = 0 Led3 = 0 Led4 = 0

Bz = 0 Relay = 0 Goto Read

End Select

Goto Main

End

0