online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdint.h> #include <stdio.h> using namespace std; int main () { uint64_t rcs_registry = 0; int current_ring; // Get the current value of cs registry asm ("mov %%cs, %0":"=r" (rcs_registry)); // Get the last 2 bits of it, that represent the ring current_ring = (int) (rcs_registry & 3); printf ("Hello, world. This program is running on ring %d!\n", current_ring); return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue