Questions tagged [register]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
7 answers
3k views

Is it possible to update exactly 1 byte in RAM?

For example I have a static C++ array {'d', 'o', 'c', 's'}. And I have x86 architecture, with 32-bits length words. I want to replace letter c with g. As far as I understand, when we make a read ...
No Name QA's user avatar
1 vote
1 answer
268 views

If we are allowing anonymous users to register inside our web site, how we can prevent hackers from occupying others' email address

I am planning to start a new asp.net core MVC web application. One of the features we are having is that anonymous users can register inside our web application by entering their email addresses. then ...
test test's user avatar
0 votes
1 answer
3k views

Registers and Stacks in NASM

So, I am more or less voluntarily learning NASM, and I have problems finding sources that really explain it. Unlike with Java or C# I can't just use google as well, since Assembly just isn't used by ...
Martin's user avatar
  • 3
5 votes
1 answer
117 views

Which registers should executable loader install before start a program?

For example, I have simple C program that only have main function that just returns 0. What registers should loader (Linux exec loader, I guess) install before start a program? I didn't find ...
YourJest's user avatar
3 votes
2 answers
390 views

When designing an ISA , is it a good design decision to permit a `pop` instruction that does not require an operand to receive the popped value?

A lot of ISAs including x86, x64, ARM, Itanium, have a pop instruction that requires an operand which is usually a register (or, in ARM's case, a register list). In fact, I can't think of an ISA off ...
Govind Parmar's user avatar
3 votes
4 answers
19k views

The difference between accumulator-based and register-based CPU architecture?

I don't understand the difference between an accumulator-based CPU architecture and a register-based CPU architecture. I know x86 is register-based but it has an accumulator-like register. I only ever ...
Accumulator's user avatar
1 vote
3 answers
2k views

Why can less precise data like float be faster than larger, more precise data like double?

I am currently reading a chapter in a textbook on Processor Architecture and saw the following statement: The less precision there is, the less space is occupied by a program variable in memory. ...
forgetaboutme's user avatar
2 votes
3 answers
3k views

Source of loading value to the register or memory location

When we load a register or memory location with a value (e.g. MVI 3A or MVI 53), what initializes register or memory location with that specific value? It is the CPU who performs the initialization, ...
Lucenzo97's user avatar
  • 293
4 votes
1 answer
179 views

What is a good way to debug when does a specific value is pushed onto stack in assembly code?

I am currently debugging a very old game (so there is no customer support) that keeps crashing under certain condition and I have found out it is because unsigned short to unsigned int conversion was ...
cr001's user avatar
  • 149
6 votes
3 answers
7k views

In x86, where are the memory addresses of the values on the stack located?

Suppose I have a very simple C program that just does this: int i = 6; int j = 4; int k = 5; int a = i + j + k; Since i, j, and k are on the stack, they will be located relative to the stack pointer....
moonman239's user avatar
  • 2,053
-1 votes
1 answer
66 views

multiplication with insufficiently long registers [duplicate]

I want to multiply two numbers but since I don’t have long enough registers in the current architecture need to “break them down” into shorter ones and somehow perform the calculation. For example: ...
Rizias's user avatar
  • 107
2 votes
4 answers
2k views

Optimizing code by using registers, but what if they are not enough in number?

One way to optimize code is to minimize the access to arrays and use variables instead, because that way we use registers instead of loading data to cache memory. For example, if in a loop I'm going ...
S.E.K.'s user avatar
  • 145
3 votes
1 answer
1k views

Handling multiple login methods

Currently, I'm using Parse to handle my backend, and I have multiple ways to login -> via regular email/password and via linkedin. Parse has a specific method of logging in requiring username/...
Allen's user avatar
  • 131
32 votes
4 answers
41k views

What are CPU registers?

This question has been bothering me for some time now and today I figured I would Google it. I've read some stuff about it and it seemed very similar to what I've always known as processor cache. Is ...
Jeroen's user avatar
  • 613
1 vote
1 answer
960 views

Strategies for removing register_globals from a file

I have a file (or rather, a list of about 100 files) in my website's repository that is still requiring the use of register_globals and other nastiness (like custom error reporting, etc) because the ...
Jonathan Rich's user avatar