A C Compiler For The HP49g+
Cheese Source writes "As previously mentioned on Slashdot, HP's latest and greatest calculator is the HP49g+. While it sports a very powerful (for a calculator) ARM9 cpu, it is only 3 times the speed of the 49g, running at 4MHz. This is because it has to emulate an older processor. Of course, some calculator geeks are now writing adapting a free, open-source C compiler for it. Based on GCC, you can now make programs that run natively on the CPU between 12 and 203MHz. 1000 factorial is calculated and displayed in the blink of an eye (the built in command takes 30 seconds). It will also allow for some great games."
Perhaps the same that make TI calculators need 5 seconds to calculate 50!....
No, really. the 4Mhz cpu it emulates does imho only do 4bit arithmetic, so you need an awfull lot of cycles to handle longer arbitrary precission numbers...
HI O WISE PRINCE. WHT TOOK U SO DAM LONG?
for those interested in the the 49g+ in all it's gory technical details.
peterrenshaw ~ Another Scrappy Startup
The new HP49 has better keys than the old one but not as good as the HP48.
> Is this about a port of GCC that runs on the calculator?
No.
GCC has been available for calculators with HP's Saturn processors since 1994 (hp48xgcc). This is about using gcc as a cross-compiler for HP's new ARM-based calculator. The summary makes it sound as though someone is writing a compiler which is of course not the case. They are just writing the glue code and linker portions specific to the HP49G+.
A 13 second Google search would have verified that this calculator supports "RPN, algebraic, and textbook entry system logic." Scroll down to the "Product Details."
Raj Against the Machine! http://social-butterfly.appspot.com/
From the site:
The most commonly used language for advanced programming is 'System RPL', or 'SysRPL'. On modern calculators, SysRPL is mostly executed by an emulated 'Saturn' processor. C on the other hand is executed directly by the ARM chip. The same program written in C will be many (up to 100) times faster then the equivalent SysRPL program.
So possibly the article miswords that the 'emulation' is simply of an older programming language. If it's a common one, I see why they'd keep using it instead of porting to C.
No. Actually there have been tons of user complaints about how crappy the keys are on the 49g+. Check out comp.sys.hp48 on Usenet or Google groups. Supposedly they have been improved on recent calculators, but there are still complaints.
No, the Saturn has an external word size of 4 bits, but 64 bit registers and instructions.
At three to seven (the actual comparison) times the 4MHz 48g speed, there is far less than a gap of >>30 between the speed of the emulated processor and the physical one so I stand by (for now) my speculation that there is surely an algorithmic difference between the built-in (example?) one and the new 'native' one...
(But what do I know, I'm just flamebait... apparently...)
Um, no. Saturns have 64 bit registers. They do address on 4-bit nibble boundaries though.
oops, some more I forgot
Is the 49g+ RPN?
Not by default - but you can set it to be with about 3 button pressed. Then its a proper RPN* calculator unless you set it back.
*The RPN it uses is different from HP's early implementation. The earlier versions have a 4 level stack only. The HP48/9 series effectlvly have an unlimited stack, and you can put all kinds of objects (matrices, programs, symbolics etc) on it. Its alot more powerful then the RPN of say a HP15c, but naturally more complicated to use
Will there be a linux/BSD/[other OS] port?
Well, you have a 203MHz CPU, 512kb RAM, and 2MB ROM. If you can fit linux on that then go for it!
A flood of people on c.s.hp48, web sites, et al. who have used the HP calculator series for decades would disagree with you. Maybe you have an exceptionally well engineered 49g+, for some qualities requiring exceptional engineering techniques just to your unit (eg injection moulded key labels). I doubt this.
It's a shame when the current generation of users think that "mediocre" ENGINEERING is "great" and aren't even aware of yesterday's "great".
I don't know if that's exactly what you're looking for, but like many TI-68k games, this game can be ported to HP-49G+.
There is all kinds of commercial software for the 48/49 series which is written in Saturn assembly. Targeting the new CPU directly would break these apps and substantially reduce the market for the calculator.
You are right in both ways. Even the HP48's emulates system RPL, a language they've carried from previous calculators. It's an intermediate language that offers simpler math functios. The bulk of the stuff the calculator does (like the matrix routines) is written in it.
If the 49 has it's own SysRPL emulator, it would be quite fast (not as fast as pure C, though), but if it's emulating the 48's Saturn processor, which is emulating SysRPL, things could get slow.
p.s. Am I the only one here with the Saturn processor on their resume?
HIV Crosses Species Barrier... into Muppets
1000! is 2565 digits long... approximately 4.0238 x 10^2564.
:)
Larger than a googol, and just barely smaller than a googolplex.
Yes, but will teachers let students bring in a gameboy for exams? I think not. Students make up 90% of the calculator market.
Also, a gameboy will chew batteries much faster then a calculator will.
"Oh, right: and the underlying CPU blows the doors off of a 4mHz ARM9. It's got a 66mHz ARM9 *and* a 33mHz arm7"
dude, the HP49g+ has an ARM9 rated at 200MHz
"Calculator advocates, repent - unification is at hand, commodity hardware defeats characteristic purpose hardware, generalization is cheaper than specific hardware, the ASIC falls at the sword of the CPU."
There is no ASIC's on the HP, its all standard off-the-shelf parts!