ResetProcessor command

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

ResetProcessor command

Post by FFMan »

In a quick and dirty prototype fashion I put a call to ResetProcessor thinking this would perform a warm start and execute my program from the beginning again, but at first glance it didn't appear to do anything.

Have I misunderstood what this should be doing ?
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: ResetProcessor command

Post by dkinzer »

FFMan wrote:[...] a call to ResetProcessor thinking this would perform a warm start and execute my program from the beginning again
The ResetProcessor() call resets the device using the WatchDog reset. Other than that, it is essentially the same as a power-on reset or an external reset.
FFMan wrote:it didn't appear to do anything.
On which device?
- Don Kinzer
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Post by FFMan »

ZX24p
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

FFMan wrote:ZX24p
I just ran a quick test (see code below) on several devices including the ZX-24p. All executed as expected, restarting every two seconds.

Code: Select all

Sub Main()
  Debug.Print "Hello, world!"
  Call Sleep(2.0)
  Call ResetProcessor()
End Sub
- Don Kinzer
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Post by FFMan »

ok thanks - must be something amiss somewhere - i'll investigate
Post Reply