Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assembly on ish #2229

Closed
elyasafliloof opened this issue Sep 22, 2023 · 3 comments
Closed

Assembly on ish #2229

elyasafliloof opened this issue Sep 22, 2023 · 3 comments

Comments

@elyasafliloof
Copy link

Hello, this is my first time in github and my first time using ish.
I did a bit of assembly programming on my ubuntu pc, and I wanted something similar on my iPad.
I’ve found this app, I installed yasm and vim and wrote “hello world” program.
Then, I typed what I usually type on ubuntu: yasm -f elf64 hi.asm
and then tried to link it with ld, but it said ld not found, so I searched for a linker to download there.
I’ve found lld, downloaded it, and typed ld.lld -o hi hi.asm
It created the executable “hi” and when I tried to run it ./hi I got weird output.
I don’t really know what I’m doing, I would appreciate some guidance. Thank you.

@saagarjha
Copy link
Member

Hi! iSH supports a 32-bit programming environment. You might have more success with -elf32, perhaps?

@elyasafliloof
Copy link
Author

Hi! iSH supports a 32-bit programming environment. You might have more success with -elf32, perhaps?

Thank you, I guess it works. Do I need to re learn assembly for 32 bit system now? Btw, is ish working on the ipad’s cpu directly, or is it some sort of simulation?

@saagarjha
Copy link
Member

32-bit x86 is similar but not quite the same as x86-64. You'll probably find it to be fairly approachable, though. iPad uses arm64 so iSH runs all code in emulation.

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

No branches or pull requests

2 participants