Hello, I have been trying to figure out which part of an assembly code has to be changed in order to modify the variables, could anyone tell me what format do the variables usually have?

2 points•Porcentum•about 1 hour ago•2 comments•
Hello, I have been trying to figure out which part of an assembly code has to be changed in order to modify the variables, could anyone tell me what format do the variables usually have?

2 comments

docshock21 minutes ago
Instead of variables, assembly is directly controlling the hardware instructions for a particular processor. CPUs have registers, small circuits that hold exactly one value, and operations can mutate the value in some or all registers, compare it to another register, read a register as a memory address and either put another register value there or load a register value from there, etc. Incompatible processor's have different register layout and instruction sets: Assembly does not translate well. Compatible processors have compatible register names and instruction subsets, but sometimes instructions you can't use for compatibility's sake. If all of this sounds complicated, that is a major motivator for higher level languages that abstract all this away.

On the other hand, correct assembly that makes optional use of the processor's native capabilities should always be faster.

As for figuring out what the assembly does, either ask a frontier or near-frontier model to "disassemble" the code or (better) get the processor and language specifications and start learning the relevant instructions and what they do.

Read the full thread on Hacker News →

Related stories