Post Reply 
Why can't I execute C program on EMU48?
03-08-2021, 11:56 AM (This post was last modified: 03-08-2021 12:19 PM by BINUBALL.)
Post: #1
Why can't I execute C program on EMU48?
I am learning hpgcc (and c) now. So I type some tiny C program and I want to execute C program on emu48. But if I send program to stack 1 with emu48. press PrRUN. It instantly crashes.

In different way, I can execute C program with S->EXE, EVAL. But if I try this way press EVAL and EMU48 has no reaction so I have to click Edit - Reset Calculator. Press on then It says "Try To Recover Memory?".

How can I run C program in emu48? Attach my hello.hp program below.

p.s. I use Horizontal 50G (4x Zoom) skin. and It can run by my actual 50g.


Attached File(s)
.hp  hello.HP (Size: 4.75 KB / Downloads: 6)
Visit this user's website Find all posts by this user
Quote this message in a reply
03-08-2021, 02:09 PM
Post: #2
RE: Why can't I execute C program on EMU48?
Emu48 only emulates the Saturn chip, not the ARM chip. This means ARM-native code (like the compiled C generated by hpgcc) won't run on it. There are some other emulators that support ARM, like x49gp, but they don't easily run on Windows.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-12-2021, 01:23 AM
Post: #3
RE: Why can't I execute C program on EMU48?
(03-08-2021 02:09 PM)Eric Rechlin Wrote:  Emu48 only emulates the Saturn chip, not the ARM chip. This means ARM-native code (like the compiled C generated by hpgcc) won't run on it. There are some other emulators that support ARM, like x49gp, but they don't easily run on Windows.
thanks for your reply.

S.Korean / HP-50G | fx-570EX | fx-570CW | HP-200LX
Visit this user's website Find all posts by this user
Quote this message in a reply
03-13-2021, 06:13 PM
Post: #4
RE: Why can't I execute C program on EMU48?
(03-08-2021 02:09 PM)Eric Rechlin Wrote:  Emu48 only emulates the Saturn chip, not the ARM chip. This means ARM-native code (like the compiled C generated by hpgcc) won't run on it. There are some other emulators that support ARM, like x49gp, but they don't easily run on Windows.

What about Emu48+?

— Ian Abbott
Find all posts by this user
Quote this message in a reply
03-13-2021, 07:45 PM
Post: #5
RE: Why can't I execute C program on EMU48?
On a similar note, I cannot get EMU48 to run on my Windows 10 computers. I did want to use the EMU48 in HP50 mode to get a cheap long-integer program. It works fine on Android (except I cannot figure how to cut and paste to and from the stack.)
Find all posts by this user
Quote this message in a reply
03-13-2021, 11:58 PM
Post: #6
RE: Why can't I execute C program on EMU48?
(03-13-2021 06:13 PM)ijabbott Wrote:  
(03-08-2021 02:09 PM)Eric Rechlin Wrote:  Emu48 only emulates the Saturn chip, not the ARM chip. This means ARM-native code (like the compiled C generated by hpgcc) won't run on it. There are some other emulators that support ARM, like x49gp, but they don't easily run on Windows.

What about Emu48+?
Then, are there no problem if I install emu48 amd emu48+ at the same time?

S.Korean / HP-50G | fx-570EX | fx-570CW | HP-200LX
Visit this user's website Find all posts by this user
Quote this message in a reply
03-14-2021, 04:18 AM
Post: #7
RE: Why can't I execute C program on EMU48?
Emu48+ also doesn't emulate the ARM, it just emulates the Saturn+ in the "Apple" series of calculators. But yes, you can have Emu48 and Emu48+ simultaneously; I keep both in the same folder just with different names, but there really isn't any need for Emu48 if you have Emu48+, since Emu48+ does everything Emu48 does and more.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-15-2021, 09:56 AM
Post: #8
RE: Why can't I execute C program on EMU48?
Sorry to hear your problems getting programs running.

If you have some space left over, see if you can get a copy of x49gp. I have absolutely no idea whether this could be run under the new WSL2, but I know it'd work fine in a virtual Linux machine. It'll be a bit of work to get going. This won't solve the "can't run a C program on EMU48/+) though but it will probably work under x4gp.

For getting data back and forth between calculator and computer, I've found that a copy of kermit (under Linux) seems to work well enough, I can't quite remember how I managed to get kermit to talk to the usb cable. Another method is to use the SD card (if your computer has a SD card reader) as a go-between.

(Post 335)

Regards, BrickViking
HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a)
Visit this user's website Find all posts by this user
Quote this message in a reply
03-15-2021, 06:34 PM
Post: #9
RE: Why can't I execute C program on EMU48?
If you just want to test hpgcc code on Windows try https://kdntl.pagesperso-orange.fr/hp49/hpapine/

I've tested it with Windows, Linux, Mac. Over 10 years ago.
Find all posts by this user
Quote this message in a reply
03-18-2021, 07:23 PM
Post: #10
RE: Why can't I execute C program on EMU48?
(03-15-2021 09:56 AM)brickviking Wrote:  For getting data back and forth between calculator and computer, I've found that a copy of kermit (under Linux) seems to work well enough, I can't quite remember how I managed to get kermit to talk to the usb cable. Another method is to use the SD card (if your computer has a SD card reader) as a go-between.

(Post 335)

Well, in my experience ( although with HP48GXs not HP50Gs ) is that if one is using a USB-to-serial adapter in Linux or any other USB device that presents a serial interface, it usually shows up as "/dev/ttyUSBx" where "x" is usually 0 or 1, but can be other values. One way to find out which USB serial interface is the correct one is to run the command :

Code:
sudo udevadmn info --query=all --name=ttyUSBx

( replace x with the interface about which you want information )

If you're using Kermit, then to avoid having to run it as root you'll usually need to add your user to the "dialout" or perhaps the "tty" groups ( Just do an eg. ls -la /dev/ttyUSB0 to see to which group it belongs ). Also, in Kermit, you'll need to issue an eg. "SET PORT /dev/ttyUSB0" command.

Regards,

Jonathan

Aeternitas modo est. Longa non est, paene nil.
Find all posts by this user
Quote this message in a reply
Post Reply 




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