ATmega328P appears to be code looping SOLVED!!

" This was solved, the issue was my code not having any end point or main loop so it was rolling into the Int0service interrupt code and returning back to the first line of code .."

Hi Guys and Gals,

On a brand new Atmega328P in an Arduino Uno PCB the code seams to keep starting over and over again. Actually I have just bought two brand new Arduino Uno's to use as Dev boards for a wireless app.

I program the MCU using the ISP conneciton with an OLimex AVRISP MKII, the looping exists with or without it connected.

I have scoped all the pins to see if anything is changing, all pins except the TX of the USART are active as expected.

I have a load of the MCU's and all of them do it.

Tried this with loads of example Hex files from AVR-GCC, Bascom.

Fuses are 0xFD 0XDA 0XFF ( I use atmel studio to download the Hex to the MCU because I use more AVR-GCC or Bascom usually ) So I am using the Arduino as a kind of Dev Board for some radio applications created with Bascom for over 15 years.

Count is not incrementing and stays at one.

On hyper terminal I get the forever looping message

Hello 1 Hello 1 Hello 1

Really hope somebody out there can explain the issue, its driven me nuts for 3 weeks so far and I am close to throwing it all in the trash and taking up fishing instead.

The code is very simple, and just triggers an interrupt on a pin change & prints it too the terminal.

$regfile = "m328pdef.dat"
$crystal = 16000000
$baud = 57600
$hwstack = 32
$swstack = 32
$framesize = 40

Config Pind.2 = Input
Config Pind.3 = Input

Portd.2 = 1
Portd.3 = 1

On Int0 Int0service
On Int1 Int1service

Config Int0 = Falling
Config Int1 = Falling

Enable Int0
Enable Int1
Enable Interrupts

Dim Count As Byte

'------------------------------------------

Count = Count + 1
Print "Hello"
Print Count

'------------------------------------------

Int0service:
Print "Interrupt 0"
'Wait 1
Return

Int1service:
Print "Interrupt 1"
Wait 1
Return