Questions tagged [low-level]

In terms of a computer system, low-level refers to the components that appears lower in the stack of system layers.

In terms of a computer system, low-level refers to the components that appears lower in the stack of system layers.

679 questions
16
votes
2 answers

Instruction Level Profiling: The Meaning of the Instruction Pointer?

When profiling code at the the assembly instruction level, what does the position of the instruction pointer really mean given that modern CPUs don't execute instructions serially or in-order? For example, assume the following x64 assembly…
dsimcha
  • 67,514
  • 53
  • 213
  • 334
15
votes
2 answers

How are functions curried?

I understand what the concept of currying is, and know how to use it. These are not my questions, rather I am curious as to how this is actually implemented at some lower level than, say, Haskell code. For example, when (+) 2 4 is curried, is a…
providence
  • 29,135
  • 13
  • 46
  • 62
15
votes
10 answers

What second language to use besides Scala for LowLevel?

I am absolutely happy with Scala and just love it :) But sometimes I really want to go a bit more "low level", without a JVM and using "cool" CPU-Features like SSE etc. So what would be a good second language besides Scala? It should be: Compiled…
Plankalkül
  • 833
  • 8
  • 21
15
votes
4 answers

How do you set strings to uppercase / lowercase in Unicode?

This is mostly a theoretical question I'm just very curious about. (I'm not trying to do this by coding it myself or anything, I'm not reinventing wheels.) My question is how the uppercase/lowercase table of equivalence works for Unicode. For…
Daniel Magliola
  • 30,898
  • 61
  • 164
  • 243
15
votes
10 answers

What specific examples are there of knowing C making you a better high level programmer?

I know about the existance of question such as this one and this one. Let me explain. Afet reading Joel's article Back to Basics and seeing many similar questions on SO, I've begun to wonder what are specific examples of situations where knowing…
Javier
  • 4,552
  • 7
  • 36
  • 46
14
votes
5 answers

Getting all static (interned) strings from a .NET assembly (dll)

I wish to get a list of all strings that are used in a .NET assembly including the “static” values that local variables are set to, parameters passed to methods, fields at set to, etc. I recall from something I read a long time ago that a .NET…
Ian Ringrose
  • 51,220
  • 55
  • 213
  • 317
14
votes
1 answer

Are there fixed size integers in GCC?

On the MSVC++ compiler, one can use the __int8, __int16, __int32 and similar types for integers with specific sizes. This is extremely useful for applications which need to work with low-level data structures like custom file formats, hardware…
Pramod
  • 9,256
  • 4
  • 26
  • 27
13
votes
3 answers

low level programming: How does the OS start a new thread/process?

Whenever the bootloader loads the operating system there is presumably only ONE program flow active, right? This would mean, one processor holds the instruction pointer and executes the commands it founds at the position the EIP register points to.…
prinzdezibel
  • 11,029
  • 17
  • 55
  • 62
13
votes
6 answers

What's the point of cache coherency?

On CPUs like x86, which provide cache coherency, how is this useful from a practical perspective? I understand that the idea is to make memory updates done on one core immediately visible on all other cores. This is a useful property. However,…
dsimcha
  • 67,514
  • 53
  • 213
  • 334
13
votes
1 answer

Bit hacking and modulo operation

While reading this: http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv I came to the phrase: The last step, which involves modulus division by 2^10 - 1, has the effect of merging together each set of 10 bits (from…
Ferenc Deak
  • 34,348
  • 17
  • 99
  • 167
13
votes
3 answers

I want to create a simple assembler in C. Where should I begin?

I've recently been trying to immerse myself in the world of assembly programming with the eventual goal of creating my own programming language. I want my first real project to be a simple assembler written in C that will be able to assemble a very…
John McClane
  • 207
  • 1
  • 2
  • 6
13
votes
2 answers

Use case for low-level os.open, os.fdopen, and friends?

In Python 3.2 (and other versions), the documentation for os.open states: This function is intended for low-level I/O. For normal usage, use the built-in function open(), which returns a file object with read() and write() methods (and many more).…
gerrit
  • 24,025
  • 17
  • 97
  • 170
13
votes
2 answers

Where can I find a reference for what every bit of the CorFlags value means?

I'm messing around with some rather low level things and trying to determine why I get different outputs with the CorFlags.exe utility. For reference, the outputs are as so: $ corflags test2.exe Microsoft (R) .NET Framework CorFlags Conversion…
Earlz
  • 62,085
  • 98
  • 303
  • 499
12
votes
3 answers

How is Object.GetHashCode() implemented in CLR & JVM?

I've been musing about this for some time: how exactly is Object.GetHashCode implemented in the CLR or Java? The contract for this method is that if it is called on the same object instance, it should always return the same value. Note that I'm…
John Källén
  • 7,551
  • 31
  • 64
12
votes
3 answers

How can I check to see if a file descriptor was closed?

In a POSIX environment when using system calls to manipulate text files (open(), close(), read(), write()), is there a way to to check to see if I actually closed a file descriptor when using close(file_descriptor)? Example: int main(int argc, char…
user2931210
1 2
3
45 46