Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

compiling code is not working #86

Open
Ccode-lang opened this issue Oct 2, 2021 · 4 comments
Open

compiling code is not working #86

Ccode-lang opened this issue Oct 2, 2021 · 4 comments

Comments

@Ccode-lang
Copy link

computer info:
OS:raspios
Model:model 4 b

@Ccode-lang
Copy link
Author

sim works fine

@Ccode-lang
Copy link
Author

[INFO] Generating /home/pi/porth/hello-world.asm
[CMD] nasm -felf64 /home/pi/porth/hello-world.asm
[CMD] ld -o /home/pi/porth/hello-world /home/pi/porth/hello-world.o
/home/pi/porth/hello-world.o: file not recognized: file format not recognized

@DemonEach
Copy link

DemonEach commented Oct 2, 2021

That's because nasm is used for the x86 CPU architecture, raspberry pi in the other hand uses ARM architecture. And also I think assembly instructions in Porth can be only used for x86, for ARM you need to use different assembly instructions.

There is also pull request for arm support #63

@CoolCat467
Copy link

Basically, you need to use aarch64-linux-gnu-as assembler instead of nasm. I believe you might have to modify the main file to do this until that pull request gets looked into.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants