One day, most recently, on Windows tablets, Microsoft
lost millions of dollars. Well, today we will simply write under them in assembly language.

We will need the following things.
- Installed Microsoft Visual Studio with support for ARM assembler, for example 2012.
- Jailbreak a tablet with Windows RT installed, such as Microsoft Surface RT.
To begin with, we will create a separate folder for the project, in which we will create the arm.asm file, the contents of which is under the cut.
AREA data, DATA Text DCB "Hello world(text)", 0x0 Caption DCB "Hello world(caption)", 0x0 EXPORT WinMainCRTStartup IMPORT __imp_MessageBoxA IMPORT __imp_ExitProcess AREA text, CODE WinMainCRTStartup PROC movs r3,#0 ldr r2,Caption_ptr ldr r1,Text_ptr movs r0,#0 ldr r4,MessageBoxA_ptr ldr r4,[r4] blx r4 movs r0,#0 ldr r4,ExitProcess_ptr ldr r4,[r4] blx r4 MessageBoxA_ptr DCD __imp_MessageBoxA ExitProcess_ptr DCD __imp_ExitProcess Text_ptr DCD Text Caption_ptr DCD Caption ENDP END
Moreover, the assembler in Visual Studio 2012 has a strange thing:
macros and
instructions must contain at least one tabulation character in front of them, but labels and names of memory areas, on the contrary, should not contain anything in front of themselves (that is, should start immediately lines), otherwise there will be errors.
')
So, we typed the text, now proceed to compile. From the Start menu, run:
Microsoft Visual Studio 2012 - Visual Studio Tools - Command line VS2012 ARM Cross Tools .
From the command entry window that opens, go to the source directory, for example:
cd \my_arm_proj
Next, consistently enter the command:
armasm arm.asm link arm.obj user32.lib kernel32.lib /subsystem:windows
As a result, the output in the program directory will get the executable file arm.exe. Copy it to the tablet, and voila!
