MicroPython on Casio fx-CG50 Questions?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
User avatar
fos
Posts: 44
Joined: Sat Feb 18, 2017 3:05 pm
Location: Texas
Contact:

Re: MicroPython on Casio fx-CG50 Questions?

Post by fos » Mon Oct 14, 2019 11:23 am

Another fan of HP calcs. My first was an HP-45 in the early 70s. It was operational until 1990. By then I had a 48SX and a GX. I still have and use them. These days I have a new version 35 and a 50G on my desk. Sometimes it is easier to pick up a calc then fiddle with the computer. I have the i41CX on the home screen of my iPhone for use when I am out and about.

Corvallis, OR was a magical place.

DiTBho
Posts: 3
Joined: Fri Jan 01, 2021 5:02 pm

Re: MicroPython on Casio fx-CG50 Questions?

Post by DiTBho » Fri Jan 01, 2021 5:08 pm

has anyone already tried to figure out if the CASIO-uPython is able to inline assembly? ( see here )

something like

Code: Select all

@micropython.asm_??? SH???
def fun():
    movw(r0, 42)

print(fun())

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: MicroPython on Casio fx-CG50 Questions?

Post by pythoncoder » Sat Jan 02, 2021 5:45 am

The inline assembler is specific to the Arm Thumb instruction set, as used in STM chips (Pyboard 1.x and Pyboard D). Unless the Casio uses an STM chip it won't work.
Peter Hinch
Index to my micropython libraries.

DiTBho
Posts: 3
Joined: Fri Jan 01, 2021 5:02 pm

Re: MicroPython on Casio fx-CG50 Questions?

Post by DiTBho » Sat Jan 02, 2021 12:31 pm

pythoncoder wrote:
Sat Jan 02, 2021 5:45 am
The inline assembler is specific to the Arm Thumb instruction set, as used in STM chips (Pyboard 1.x and Pyboard D). Unless the Casio uses an STM chip it won't work.
of course, but I wonder.. isn't there an inline assembly engine for SuperHitachi?
My CASIO fx9860g3 has SH4 CPU. Can't it be added to MicroPython?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: MicroPython on Casio fx-CG50 Questions?

Post by pythoncoder » Sun Jan 03, 2021 10:16 am

Doubtless it could. Do you fancy the job? ;)
Peter Hinch
Index to my micropython libraries.

DiTBho
Posts: 3
Joined: Fri Jan 01, 2021 5:02 pm

Re: MicroPython on Casio fx-CG50 Questions?

Post by DiTBho » Sun Jan 03, 2021 11:24 am

pythoncoder wrote:
Sun Jan 03, 2021 10:16 am
Doubtless it could. Do you fancy the job? ;)
maybe. I have zero experience with it, yesterday I downloaded the CASIO SDK, sort of gcc-C toolchain prepared by CASIO for their SH3/4 calculators. The SDK is nothing special, an the IDE is not very powerful (I prefer Geany + DDD), but in a couple of hours I was able to compile my own RPN calculator.

It's a toy, written in C years ago, but hey? Now it runs on the calculator: so, I wonder if something similar could be done with MicroPython sources in order to compile a custom version with a built-in micropython.asm_sh4 :)

Post Reply