D
D
Dmitry2020-03-09 23:49:00
assembler
Dmitry, 2020-03-09 23:49:00

How to compile a program in nasm macos?

I started studying assmbler Nasm using the tutorial "Programming in the assmbler NASM language Stolyarov.
The example uses a simple program to display the word Hello 5 times. The program is understandable, but the moment how to run it is not clear. I wrote the source code in a simple text editor (textedit). Then Saved the .asm file on the desktop
Further in the tutorial are the following instructions (31 pages):
Let's call the nasm assembler: nasm -f elf hello5.asm
As I understand it, you need to open the terminal and paste the code in. At the first start, the system asked install some components, which I did (or install xcode, did this action too).
I also tried to manually install nasm (
Run in Terminal app:
ruby ​​-e "$ (curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install... " < /dev/null 2> /dev/null
and press enter/return key.
If the screen prompts you to enter a password, please enter your Mac's user password to continue. When you type the password, it won't be displayed on screen, but the system would accept it. So just type your password and press ENTER/RETURN key. Then wait for the command to finish.
Run:
brew install nasm
)

When I type the command again in the terminal, I get the following error:
nasm: fatal: unable to open input file `hello5.asm'
I tried to specify the path to the file in the command, but the same error.
nasm -f elf /Users/dmitry/Desktop/ hello5.asm
How do I run this program

?
Mac OS 10.12.6

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
ArtemCheck, 2019-07-31
@ArtemCheck

В общем, соединил два xml файла внешнего вида в один с помощью и запихнул его в MainScreen. Оттуда сначала показывал один, а второй был спрятан, а при нажатии на кнопку вызова экрана с отключением рекламы - просто прятал главный экран и показывал экран с отключением рекламы. Сделал кнопку закрыть - и снова прячу отключение рекламы - показываю главный.
Весь биллинг процесс сделал в главном активити - инициализирую рекламу в главном активити - проверяю значение тоже в главном

Денис Загаевский, 2019-07-31
@zagayevskiy Куратор тега Java

startActivityForResult+onActivityResult

J
jcmvbkbc, 2020-03-10
@jcmvbkbc

nasm: fatal: unable to open input file `hello5.asm'
I tried to specify the path to the file in the command, but the same error.
nasm -f elf /Users/dmitry/Desktop/hello5.asm
How do I run this program?

In appearance, you are doing everything right, it remains to deal with the correct full name hello5.asm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question