"Tanks in the console" is a small announcement before the big article

Good afternoon Habr


 
 
Finally, I'm ready to continue the series of articles devoted to my project development (it is necessary to finish it up to mind), interesting plans, new projects and developments are ahead.
 
 
Missed the tanchiki, yes? Then under cat.
 
github.com/koitoTy/game_enjine
 
Tanks: github.com/koitoTy/tank_game
 
(group in can be found in the profile) Good afternoon Habr   Finally, I'm ready to continue the series of articles devoted to my project development (it is necessary to finish it up to mind), interesting plans, new projects and developments are ahead.  Missed the tanchiki, yes? Then under cat.  github.com/koitoTy/game_enjine  Tanks: github.com/koitoTy/tank_game  (group in can be found in the profile)...[/h]
+ 0 -

As the update to Rust ??? speeded up my code in more than three times

I want to share a small story about the power of LLVM and the advantages of high-level languages ​​over the assembler.
 
 
I work for Parity Technologies, which supports client Parity Ethereum . In this client, we need fast 256-bit arithmetic, which has to be emulated at the software level, because no hardware supports it hardware.
 
 
For a long time we parallelly do two implementations of arithmetic: one on Rust for stable assemblies and one with built-in assembler code (which is automatically used by the nightly version of the compiler). We do this because we store 256-bit numbers as arrays ...
+ 0 -

Operating systems from scratch; level 3 (the older half)

Operating systems from scratch; level 3 (the older half) In this part, we'll add the interrupt processing and take on the scheduler. Finally, we will have the elements of a multitasking operating system! Of course this is only the beginning of the topic. One timer interrupt, one system call, the basic part of a simple thread scheduler. Nothing complicated. However, by this we will prepare a springboard for the creation of a full-fledged system that will deal with the most real processes without any "buts." Just like in these your lines and others. Until the end of
this
course is already a little less than half.
 
Zero lab
 
The f...
+ 0 -

Operating systems from scratch; level 3 (lower half)

Operating systems from scratch; level 3 (lower half)
 
In this lab, we will implement the ability to run custom programs. Those. processes and the entire dependent infrastructure. In the beginning, we'll figure out how to switch from privileged code, how to switch process contexts. Then we implement a simple round-robin scheduler, system calls and virtual memory management. In the end, we will remove our shell from the kernel space into the user space.
 
original
 
Zero lab
 
The first lab: the younger half and ...
+ 0 -

Operating systems from scratch; level 2 (the older half)

Operating systems from scratch; level 2 (the older half) It's time to write a file system. The file system does not write itself. In this half of the lab, we still implement the FAT32 file system, attach the SD card driver to it and interact with it a little bit through our interactive shell.
 
Zero lab
 
The first lab: the younger half and the older half is
 
The younger part . Continuation under the cut.
structure FAT contains all the necessary information about the size and content of these same structures. Together with the minimum necessary description...
+ 0 -

Operating systems from scratch; level 1 (the older half)

Operating systems from scratch; level 1 (the older half) It's time for the next part. This is the second half of the translation of labs №1 . In this issue we will write peripheral drivers (timer, GPIO, UART), implement the XMODEM protocol and one utilities. Using all this we will write the shell for our kernel and the bootloader, which will allow us not to poke the microSD card back and forth.
 
The younger half .
 
Beginning reading is with zero lab .
manual for peripheral devices BCM2837 .
 
Sub phase B: System ...
+ 0 -

Operating system on Rust: minimum multiboot loader

Operating system on Rust: minimum multiboot loaderThis article explains how to create a minimum operating system kernel using the multiboot standard. In fact, it will simply load and print OK on the screen. In subsequent articles, we will extend it using the programming language Rust .
 

I tried to explain everything in detail and leave the code as simple as possible. If you have any questions, suggestions or any problems, please leave a comment or create a task on GitHub . The source code is available in repositories .


 

...

+ 0 -

Rust: We try to overload the functions

Rust has no overloading functions: you can not define two functions that have the same name. The compiler will display a message that you have a double job of the same definition, even if they contained different types of arguments.
 
After several attempts, the problem was successfully solved. How - under the cut.
Code
 
However, this negates all the advantages provided by overload. At the end of this note, I will show that the traditional overloading of functions is realized on Rust - through the use of types and general programming - generics.
 
Static polymorphism
 
To allow the method ...
+ 0 -

Rust: use serde to serialize

Serialization of data via serde. Recently I wrote Rust -code to work with a third-party data source in TOML format. In other languages, I would load the data with some TOML library and run my program, but I heard about serde - the serialization library on Rust, so I decided to try it.
 
Details - under the cut.
serialization structure is simple, and the process is simple: write method serialize for your structure, which calls the desired methods in serde :: Serializer , and everything is ready. However, the documentation for ...
+ 0 -