Post Reply 
newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25]
11-02-2017, 02:44 AM
Post: #227
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25]
(11-01-2017 04:48 PM)Gilles59 Wrote:  Hi !

I get a bad crash with this kind of sequence :
v0.9 Alpha , Build 938
 << 2 DUP2 MOD NOT << KILL >> IFT >>

try 8 and the program for example.
EDIT : I try again and it works nows :/ But i'm sure there was a problem.

I could not reproduce a crash either on my calc (same build) or the simulator. I even debugged step by step with the simulator and couldn't find anything wrong. Doesn't mean it's bug free, but at least nothing obvious. When you say "bad crash": what was it? data abort?

(11-01-2017 04:48 PM)Gilles59 Wrote:  I noticed in a more complex example that with a HALT instead of KILL, the stacks seems inconsistant.


After the KILL the stack is not correct state (if im not wrong ?) . Same thing with HALT. But if you generate an error, like 0 INV instead of KILL or HALT the stak is fine.

There's a difference between newRPL and classic RPL in everything that has to do with halting and continuing code. KILL does not terminate the current program, but a previously halted one. This difference is because of the more advanced breakpoints in newRPL, and the possibility to use RPL handlers for hardware interrupts like timers. The interrupt handler should be able to kill the main program without killing the handler.
The inconsistencies you noticed is probably because you expected the code to stop after KILL, but it continued running and changed the stack.
But in reality, you are using KILL as EXIT. I just implemented an EXIT command that ends the innermost loop (works like break), or innermost program. Will come out in the next update for you to test.

(11-01-2017 04:48 PM)Gilles59 Wrote:  Note that with few modifications NewRPL return 999999937 as Prime in ~0.6s

Actually, your code could be much faster using NEXTPRIME to find the next divisor to test. Start from 2 and test the division with all the next prime factors until sqrt(N).

(11-01-2017 04:48 PM)Gilles59 Wrote:  I also notice another problem. I have difficulty to do a "Lshif CONT" sequence after a HALT. I dont think it is a physical keyboard problem but perhaps ? Did you also notice this ?

I just verified that CONT is not bound to LS-On (or any key). No wonder you had "difficulty" :-). I'll add it for the next update.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25] - Claudio L. - 11-02-2017 02:44 AM

User(s) browsing this thread: 1 Guest(s)