Coder Social home page Coder Social logo

compiling code is not working about porth HOT 4 OPEN

tsoding avatar tsoding commented on July 20, 2024
compiling code is not working

from porth.

Comments (4)

Ccode-lang avatar Ccode-lang commented on July 20, 2024

sim works fine

from porth.

Ccode-lang avatar Ccode-lang commented on July 20, 2024
[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

from porth.

DemonEach avatar DemonEach commented on July 20, 2024

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

from porth.

CoolCat467 avatar CoolCat467 commented on July 20, 2024

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.

from porth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.