Search found 83 matches: casio

Searched query: casio

by Zezombye
Fri Nov 30, 2018 4:47 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 11715

Re: How do I make a port of MicroPython for Casio calculators?

Thanks; I must have missed that #define when I skimmed over the mpconfig.h. I also thought MPy used the allocated memory as stack memory, instead of using actual stack memory. However, for some reason defining MICROPY_STACK_CHECK makes me unable to import any script; the shell simply hangs as if it ...
by jickster
Fri Nov 30, 2018 3:55 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 11715

Re: How do I make a port of MicroPython for Casio calculators?

Also, if the error is caused by being out of memory, it seems weird because I allocated 32kio (as seen in the screenshot) but that would mean each call costs 32ko/64 = 512 bytes? Seems like a lot for such a small function. Even if it runs out of memory, why doesn't it throw an exception inside Pyth...
by jickster
Fri Nov 30, 2018 3:51 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 11715

Re: How do I make a port of MicroPython for Casio calculators?

I can't really do without recursion though (in algorithms class, recursive functions are almost always studied). Practicing algorithms on a constrained device is a terrible idea . . . as you've seen. If you want to do recursive algorithms in Python, do it on the PC. Sure, recursion eats memory, how...
by Zezombye
Fri Nov 30, 2018 3:44 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 11715

Re: How do I make a port of MicroPython for Casio calculators?

I can't really do without recursion though (in algorithms class, recursive functions are almost always studied). Sure, recursion eats memory, however MPy handles regular out-of-memory just fine: l = [] while True: l.append("12345678") https://i.imgur.com/EQ6DEc7.png Also, if the error is caused by b...
by jickster
Thu Nov 29, 2018 9:45 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 11715

Re: How do I make a port of MicroPython for Casio calculators?

Hi, Unfortunately I have 2 more problems with Micropython. The first one is that, for some reason, my app crashes when I call a recursive function with too much depth. For example, this simple recursive function: def r(n): if n == 0: return 0 else: return 1+r(n-1) Calling up to r(63) works fine, bu...
by Zezombye
Thu Nov 29, 2018 3:06 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 11715

Re: How do I make a port of MicroPython for Casio calculators?

Hi, Unfortunately I have 2 more problems with Micropython. The first one is that, for some reason, my app crashes when I call a recursive function with too much depth. For example, this simple recursive function: def r(n): if n == 0: return 0 else: return 1+r(n-1) Calling up to r(63) works fine, but...
by Zezombye
Sat Nov 24, 2018 9:44 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 11715

Re: How do I make a port of MicroPython for Casio calculators?

I would like to allow the user to get out of an infinite loop. At the moment this is impossible: as MPy is not waiting for a key, all keys are ignored, and the only way to interrupt the loop is by pressing the hardware reset button. I could put a timer that listens separately for the [EXIT] key and ...
by Zezombye
Sun Nov 18, 2018 5:25 pm
Forum: General Discussion and Questions
Topic: How does Micropython avoid double precision issues?
Replies: 3
Views: 1007

How does Micropython avoid double precision issues?

... old IEEE754 floats. - How does Micropython avoid these kinds of double precision issues? - Is there an operation where a BCD system (used by TI/casio calculators) would return a different answer from Micropython?
by Zezombye
Thu Nov 15, 2018 7:23 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 11715

Re: How do I make a port of MicroPython for Casio calculators?

Found the solution thanks to https://github.com/adafruit/circuitpython/issues/130

In the makefile, replace "none" with "mpz":

Code: Select all

	$(Q)$(TOP)/tools/mpy-tool.py -f -q $(BUILD)/genhdr/qstrdefs.preprocessed.h -mlongint-impl=none $< > $@
by Zezombye
Wed Nov 14, 2018 6:02 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 11715

Re: How do I make a port of MicroPython for Casio calculators?

It comes from build/_frozen_mpy.c:

Code: Select all

#if MICROPY_LONGINT_IMPL != 0
#error "incompatible MICROPY_LONGINT_IMPL"
#endif
Apparently MPy believes that any implementation of long int is incompatible. Why is that? I looked inside mpz.c and 32-bit seems to be supported.