A
A
Alexey Mairin2018-04-27 18:41:48
assembler
Alexey Mairin, 2018-04-27 18:41:48

How can you enter equ?

Hello!
Can I somehow
override the constant in the data segment in .code?
Or is a constant a constant?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
freeExec, 2018-04-27
@freeExec

Depends on the type of the actual constant. If this is a number, then it will fall into the registers and opcode would have to be changed. If it is data, then it depends on the compiler. Some can pack constants into the data section and they can be changed. But there are those who create a section with read-only access.

I
Igor, 2018-04-27
@assembled

Constants defined through equ are symbolic constants, their values ​​are substituted at the preprocessing stage, they can be defined and redefined anywhere, their place of action is from the point of definition to the end of the program.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question