OpenLLM-France/wikimedia huggingface dataset:
# X86 Assembly

This book covers assembly language programming for the x86 family of microprocessors. The objective is to teach how to program in x86 assembly, as well as the history and basic architecture of x86 processor family.
When referring to x86 we address the complete range of x86-based processors (since the original Intel 8086 in 1978). This includes:
* IA-32 assembly, also commonly referred to as x86-32 assembly (Intel architecture 32-bit, since the Intel 80386), a 32-bit extension of the original 16-bit Intel x86 processor architecture (used in Intel 8086 - 80286 CPUs). IA-32 has full backwards compatibility with the 16-bit x86.
* x86-64, also called the AMD64 or AMD 64-bit extension, backwards compatible with 32-bit code without performance loss.
* Intel 64, previously named IA-32e or EM64T, almost identical to x86-64.
Throughout the book these terms may be used interchangeably when appropriate. A special notice will be given when covering 16-bit, 32-bit or 64-bit architectures and on any limitations to limit confusion.
Note, that there is a separate 64-bit instruction set, the IA-64 (Itanium). It was meant to replace the x86 line, but did not gain as much popularity as anticipated, so this replacement did not occur.

## Table of Contents

    Introduction
    Basic FAQ

### x86 Basics

    x86 Family
    x86 Architecture and Register Description
    Comments
    16, 32, and 64 Bits
    Intrinsic Data Types

### x86 Instruction Set

    x86 Instructions
    Data Transfer Instructions
    Control Flow Instructions
    Arithmetic Instructions
    Logic Instructions
    Shift and Rotate Instructions
    Other Instructions
    x86 Interrupts

### Syntaxes and Assemblers

    x86 Assemblers
    GNU assembly syntax (GAS)
    MASM Syntax
    HLA Syntax
    FASM Syntax
    NASM Syntax

### Instruction Extensions

    Instruction Extensions
    Floating Point
    MMX
    SSE
    AVX, AVX2, FMA3, FMA4
    3DNow!

### Advanced x86

    Advanced x86
    High-Level Languages
    Machine Language Conversion
    Protected Mode
    Global Descriptor Table
    Advanced Interrupts
    Bootloaders

### x86 Chipset

    x86 Chipset
    Direct Memory Access
    Programmable Interrupt Controller
    Programmable Interval Timer
    Programmable Parallel Interface

### Embedding and interoperability

    Interfacing with WinAPI (Communicating directly with the operating system from the article GNU assembly syntax (GAS) above)
    Interfacing with Linux
    Calling Conventions (from the Embedded Systems book)
    Calling Conventions (from the x86 Disassembly book)
    Interfacing with the C standard library and own static libraries with CDECL
    Inline Assembler (Embedded Systems book)
    Linked Assembler (Embedded Systems book)

### Resources

    Resources
# X86 Assembly/Advanced x86

These "Advanced x86" chapters all cover specialized topics that might not be of interest to the average assembly programmer. However, these chapters should be of some interest to people who would like to work on low-level programming tasks, such as boot loaders, device drivers, and Operating System kernels. A programmer does not need to read the following chapters to say they "know assembly", although they may be interesting. The topics covered in this section are:
* High-Level Languages
* Machine Language Conversion
* Protected Mode
* Global Descriptor Table
* Advanced Interrupts
* Bootloaders
# X86 Assembly/3DNow!

    This section of the x86 Assembly book is a stub. You can help by expanding this section.
3DNow! is AMD's extension of the MMX instruction set (K6-2 and more recent) for with floating-point instruction. The instruction set never gained much popularity, and AMD announced on August 2010 that support for 3DNow! will be dropped in future AMD processors, except for two instructions.
# X86 Assembly/ACPI

ACPI (Advanced Configuration and Power Interface) is a standard interface between the operating system on board system controller of the motherboard. It can be used for thinks like giving basic information (system type (desktop/laptop), board vendor, model and serial, firmware (earlier bios now uefi) version), switching to standby mode, some non-keyboard-buttons (like the power button) and/or reporting battery info (like is it charged through AC or is it discarding and how much percentage is left/to be filled). There can also are non standard additions to the ACPI interface related to the hardware...
For more information see eg. Advanced Configuration and Power Interface at wikipedia
TODO: give some code ecamples how to execute the above mentioned functions and hint for further documentation
The previous, and mostly still available for backwards compatibility, interface was APM, see also X86 Assembly/Programmable Interrupt Controller (IRQ) for that
# The Story of Rhodesia/Kingdom of Zimbabwe
### Introduction

The Kingdom of Zimbabwe was a medieval kingdom that existed from 1220-1450. Archeologists suggest it was first established by settlers from the Kingdom of Mapungubwe. They brought with them artistic traditions, some of the only found in Mapungubwe and Great Zimbabwe.

### Great Zimbabwe

The centre of the Kingdom was its capital - Great Zimbabwe. It was located near Lake Mutirikwe. The capital was constructed in the 11th century, and continued to be expanded until the 15th century. At its peak, it spanned an area of 1780 acres (7.2 square kilometres or 2.78 square mile) and housed 18,000 people.
Great Zimbabwe’s most famous structure, commonly referred to as “The Great Enclosure” (picture above), has walls the 11 m (36 ft) in height, extending approximately 250 m (820 ft), making it the largest ancient structures in Sub-Saharan Africa.

### Trade

The Kingdom of Zimbabwe controlled the gold & ivory trade from the interior to the southeastern coast of Africa. They used a network that linked to Kilwa in present-day Tanzania. Archeologists have found Glass Beads from Persia, porcelain from China, and coins from Arabia. Artefacts like these are evidence of wider international trade of the Kingdom of Zimbabwe.

### Decline

At around 1430 AD, Prince Nyatsimba Mutota of Great Zimbabwe founded the Kingdom of Mutapa and established a new royal dynasty. Mutapa started overshadowing The Kingdom of Zimbabwe. This was due to political instability in Zimbabwe, famine, and the exhaustion of Zimbabwe’s mines. By 1450, most of the kingdom had been abandoned. The Shona people were divided into kingdoms - the Kingdom of Mutapa ruling the north, and the Kingdom of Butua ruling the south.

### References

* 1 2 3 Kingdom of Zimbabwe - Heritage Daily Archived from original: https://www.heritagedaily.com/2018/05/the-kingdom-of-zimbabwe/119738
* 1 2 Mapungubwe -Ancient History Encyclopedia archived from original: https://www.ancient.eu/Mapungubwe/
# The Story of Rhodesia/Rhodesian Security Forces

The Rhodesian Security Forces were the military forces of the Rhodesian government. The Rhodesian Security Forces consisted of a ground force (the Rhodesian Army), the Rhodesian Air Force, the British South Africa Police and various personnel affiliated to the Rhodesian Ministry of Internal Affairs (INTAF). Despite the impact of economic and diplomatic sanctions, Rhodesia was able to develop and maintain a potent and professional military capability.
The Rhodesian Security Forces of 1964–80 traced their history back to the British South Africa Company armed forces, originally created during company rule in the 1890s. These became the armed forces of the British self-governing colony of Southern Rhodesia on its formation in 1923, then part of the Federation of Rhodesia and Nyasaland military in 1953. After the break-up of the Federation at the end of 1963, the security forces assumed the form they would keep until 1980.
As the armed forces of Rhodesia (as Southern Rhodesia called itself from 1964), the Rhodesian Security Forces remained loyal to the Salisbury government after it unilaterally declared independence from Britain on 11 November 1965. Britain and the United Nations refused to recognise this, and regarded the breakaway state as a rebellious British colony throughout its existence.
The security forces fought on behalf of the unrecognised government against the Zimbabwe African National Liberation Army (ZANLA) and the Zimbabwe People's Revolutionary Army (ZIPRA)—the military wings of the Marxist–Leninist black nationalist Zimbabwe African National Union (ZANU) and Zimbabwe African People's Union respectively—during the Rhodesian Bush War of the 1960s and 1970s.
The Lancaster House Agreement and the return of Rhodesia to de facto British control on 12 December 1979 changed the security forces' role altogether; during the five-month interim period, they helped the British governor and Commonwealth Monitoring Force to keep order in Rhodesia while the 1980 general election was organised and held. After the internationally recognised independence of Zimbabwe in April 1980, the Rhodesian security forces, ZANLA and ZIPRA were integrated to form the new Zimbabwe Defence Forces.

## References

* ↑ Rogers 1998, p. 41 harvnb error: no target: CITEREFRogers1998 (help)
# The Story of Rhodesia/More resources about Rhodesia
### Books

* The Great Betrayal - The Memoirs of Ian Douglas Smith - A 1997 autobiographic apologia written by Ian Smith, focusing on his time as Prime Minister of the British self-governing colony of Southern Rhodesia, later Rhodesia (April 13, 1964 – June 1, 1979).

### Magazines

* Rhodesiana - A magazine published during the days of Rhodesia, to promote Rhodesian historical studies and to encourage research.
* Southern Rhodesia 1890-1950; A Record of Sixty Years Progress - A magazine celebrating Rhodesia’s 60th anniversary.

### Movies

Please take in to account that movies have to be enterntaing and aren’t always historically acccurate:
* Rhodes of Africa (1936) - A biographic film about Cecil Rhodes, the founder of Rhodesia.
* Shangani Patrol (1970) - A war film based on the book “A Time to Die” by Robert Cary about the Shangani Patrol.

### Songs

Many songs where written about Rhodesia, however this will be just a short list:
* Rhodesians Never Die by Clem Tholet, a pop song that got an iconic status during the Rhodesian Bush War.
* The U.D.I. Song by John Edmond, a folk song commemorating Rhodesia's Unilateral Declaration of Independence.

### Sources

* ↑ https://archive.org/details/Rhodesiana/volume21/mode/2up Volumes 21-40
* ↑ https://archive.org/details/SouthernRhodesia1890-1950ARecordOfSixtyYearsProgress/mode/2up
# Tshiluba/Getting to Know You/Letters, Numbers, & Colors

Previous: Getting to Know You Next: Greetings & Introductions
Before getting started with Tshiluba, it's helpful to have a general idea of the basics. In this section, we discuss the Tshiluba alphabet, counting, and basic colors.

## Alphabet

| Letter | IPA Pronunciation |
| A, a | [ a ] |
| B, b | [ b ] |
| C, c | [ ʧ ] |
| D, d | [ d ] |
| E, e | [ e ] |
| F, f | [ f ] |
| G, g | [ g ] |
| H, h | [ h ] |
| I, i | [ i ] |
| J, j | [ ʤ ] |
| K, k | [ k ] |
| L, l | [ l ] |
| M, m | [ m ] |
| N, n | [ n ] |
| Ng, ng | [ ŋ ] |
| Ny, ny | [ ɳ ] |
| O, o | [ o ] |
| P, p | [ p ] |
| R, r | [ r ] |
| S, s | [ s ] |
| Sh, sh | [ ʃ ] |
| T, t | [ t ] |
| U, u | [ u ] |
| V, v | [ v ] |
| W, w | [ w ] |
| Y, y | [ j ] |
| Z, z | [ z ] |

## Numbers

* Umwa
* Ibidi
* Isatu
* Inayi
* Itanu
* Isambombo
* Muanda muteketa
* Muanda mukulu
* Tshitema
* Dikumi

## Colors

* Mufika
* Mukunze
* Manimani
* Kalabi
* Mayi a matamba
* Mbule
* Lumbidi
* Kaki
* Mutofa

## References

* ↑ Ager, Simon. "Tshiluba Language and Alphabet". Omniglot. Kualo. Retrieved 2017-02-02.
* ↑ Luba Classboard. (2014-10-19). Tshiluba Lesson 2-Numbers. [Video]. YouTube. https://www.youtube.com/watch?v=ekRBMn_1Jeg.
* ↑ "Colors (Kulela)". Quizlet. Quizlet Inc. Retrieved 2017-04-11.
# Tulu/Geography

The coastal city of Mangalore in Karnataka, is the main center of Tulu people. It is spoken by different castes and subcastes of Hindus, Jains and Christians of this region, which is also known as Tulunadu. Tulunadu is a beautiful hilly region.
The coastal city of Udupi is also main centre for tulu ( THULU ) speaking people called tuluvaas ( TULUVAAS ). In fact the language tulu is being spoken in Kerala . It is also spoken by Muslims in addition to their BYAARI language. ( TULUNADU to write in Transiliteration as THULUNAAD to spell the way it is pronounced. Otherwise it can be read in different way by those who are not well acquainted with the word or language which will gradually mislead.
# Tulu/History and present situation
### History and present situation

Historically, Tulunadu was ruled by only some small rulers who ruled under one or other great dynasty of Kannada kings. Tulu is not a medium of teaching and administration even in a 100% Tulu village and Kannada has occupied that place. Now a days, Tulu is studied only at Post-graduate level in the Mangalore University.
# Tulu/Dialects

One more notable thing about this poor sister of Dravidian Language family, is that, even though it is now confined to just 2-3 districts, it has a number of dialects. These dialects are mainly regional and also based on castes and subcastes of Tulu speaking Hindus. One of these dialects spoken by the Tulu brahmans namely Sthanika brahmans and Shivalli brahmans is the one which is mainly used for all the literary works found in the language.
# Tulu/Script
### Script

Though Tulu has an ancient script, it is generally referred to as a language without script. This is because, the script is totally unknown among its own people. It has been known only among the Tulu brahmins, who mainly used it for maintaining the Sanskrit Mantras (hymns used in Hindu religious ceremonies), in Astrology and in medicinal reference books, in which these brahmins where revered in the entire west-coast of India. However, recent researches have revealed that, Tulu has got a number of ancient books with scholarly written literature, all of them written in this -currently almost extinct -Tulu script. But currently, a few periodicals published in Tulu language and books written now and then in Tulu - all use Kannada script (though it is not suitable for certain peculiar pronunciations of Tulu).
# Tulu

Tulu is a language mainly spoken in Coastal Karnataka and part of northern Kerala. Tulu is one of the Dravidian languages like Kannada, Malayalam, Tamil and Telugu, but is less developed compared to its sister languages.

## Table of Contents
### Background Information

* Geography
* Script
* Dialects
* Specialities
* Culture
* The People
* History and present situation
# Tulu/Culture

Tulu people have got their own unique culture, art, traditions and rituals. Daiva Kola, Yakshagana and Nagaradhane are a few examples.
# Tshiluba/Getting to Know You/Greetings & Introductions

Previous: Letters, Numbers, & Colors Next: Describing People
Here, you'll learn how to greet people and introduce yourself to others for the first time.

## Phrases

| English | Tshiluba |
| Yes | Eyowa |
| No | To |
| Maybe | Ku misangu |
| Please | Anisha |
| Thank you | Tuasakidila |
| I know | Ndi mumanya |
| I don't know | Tshena Mumanya |
| Did you understand? | Undi munvua? |
| I understood | Ndi munvua |
| I didn’t understand | Tshena munvua to |
| I don’t understand what you said | Tshena ngunvua biji wamba to |
| Can you speak slower? | Akula koku biteketa? |
| Can you repeat this again? | Bangulula kabidi? |

## Basic Greetings

| English | Tshiluba |
| Hello | Betu'abu |
| Hello | Muoyo webe (wenu) au |
| Hello | Muoyo |
| Goodbye | N-/Ushale bimpe |
| See you later | Netumonangane |
| See you tomorrow | Makelela |
| See you tomorrow | Netumonangane makelela |
| I have to go | Ndi ne bwa kuya |
| How are you? | Malu kayi? |
| I'm fine, and you? | Bimpe, (malu bimpe), anu wewe? |
| Nice to meet you | Ndi ne disanka dia kumonangana nebe |
| Nice to meet you too | Nansha meme panyi |
| Nice to meet you too | Ndi panyi ne disanka dia kumonangana nebe |
| What's your name? | Dîdiebe nganyi? |
| What's your name? | Diebe nnganyi? |
| My name is _____ | Dianyi meme m'_____ |
| My name is _____ | Dianyi meme ndi _____ |
| How old are you? | Udi ne bidimu binga? |
| How old are you? | Udi ne mvula yinga? |
| How old are you? | Udi ne bidimu bungi munyi? |
| I'm _____ years old | Ndi ne bidimu _____ |
| Yes | Eyowa |
| No | TòToo |
| Thank you | Twasakidila |
| You're welcome | Twasakidila |
| Thank you very much | Twasakidila wa bungi |
| Thank you very much | Twasakidila wa manza tente |

## Common Luba (Baluba) Names
### Female

{{columns-list|3|
* Bakaji
* Cika
* Ilunga
* Kangwela
* Kanza
* Lukalu
* Mbaya
* Mbuyi
* Meta
* Misenga
* Mitshabu
* Miandabu
* Mujinga
* Musau
* Muswamba
* Mwanza
* Ndaya
* Ngalula
* Njiba
* Nsamba
* Ntshila
* Ntumba
* Odia
* Tshibola
* Tshibuabua
* Tshidibi
* tshilanda
* Tshiela
* Yombo

### Male

{{columns-list|3|
* Ilunga
* Tshibangu
* Kabongo
* Kayembe
* Kasongo
* Tshitenge
* Kapuku
* Tshilombo
* Kenda
* Lukusa
* Tshamala
* Kalamba
* Kalengayi
* Kamuena
* Mbenga
* Mukendi
* Muyaya
* Mubeneshayi
* Mukuna
* Mulumba
* Mbuta

### Surnames

* Beya
* Chibamba
* Dinanga
* Bukasa
* Kabongo
* Kalambayi
* Kanku
* Kasamba
* Kasongo
* Kamivanya
* Kalala
* Kalombo
* Kalonji
* Kashama
* Kalenga
* Kayembe
* Ismimanga
* Ilunga
* Kasokoma
* Mbuyi
* Mukuna
* Mujunga
* Mulumba
* Mutamba
* Mutombo
* Muyumba
* Mukoma
* kalonda
* Mutuale
* Ngoya
* Ntumba
* Nyembwe
* Odia
* Tshamala
* Tshimanga
* Tshimbalanga
* Tshilenge
* Tshibangu
* Tshibanda
* Tshilombo
* Yombo
* kabakele
* Lukusa
* Kazadi
* Mbuta

## References

* ↑ Learn Tshiluba, http://tshiluba.mofeko.com/
* ↑ "Greetings and Introduction Expressions". Quizlet. Quizlet Inc. Retrieved 2017-07-31.
* ↑ "Common Luba (Baluba) Names". Afropedea. Google Sites. Retrieved 2017-07-31.
# 99 Elm Problems/Problem 68

68.a) Generate the preorder sequence of a tree. (Preorder processes each sub-tree <root> <left> <right>.) For example, the preorder sequence of the a(b(d,e),c(,f(g,))) is 'abdecfg'.
68.a) Generate the inorder sequence of a tree. (Inorder processes each sub-tree <left> <root> <right>.) For example, the preorder sequence of the a(b(d,e),c(,f(g,))) is 'abdecfg'.
68.c) Can you use preorder/2 from problem part a) in the reverse direction; i.e. given a preorder sequence, construct a corresponding tree? If not, make the necessary arrangements.
68.c) With both the preorder and inorder sequences of nodes a binary tree tree is determined unambiguously. Generate a tree from the preorder and inorder representations of a tree.
# # # THIS IS A STUB # # #
Result:
Solutions
# 99 Elm Problems/Problem 69

69.a) Write a function to convert a tree to a string where empty subtrees are represented by a dot. For example, the tree shown in problem P67 is represented as 'abd..e..c.fg...'.
69.b) Construct a tree from a dot notation string.
# # # THIS IS A STUB # # #
Result:
Solutions
# 99 Elm Problems/Problem 7

Flatten a nested list structure.
We have to define a new data type, because lists in Elm are homogeneous.
Result:
Solutions
# 99 Elm Problems/Problem 73

Given a tree, construct the Lisp-like tree representation.
# # # THIS IS A STUB # # #
Result:
Solutions
# 99 Elm Problems/Problem 67

67.a) Generate a string representation of a binary tree like the following. a(b(d,e),c(,f(g,)))
68.b) Generate a tree from such a string representation. Be able to handle an ill-formed string.
# # # THIS IS A STUB # # #
Result:
Solutions
# 99 Elm Problems/Problem 7/Solutions

Solution 1: Recursive version
# 99 Elm Problems/Problem 70

See text
# # # THIS IS A STUB # # #
Result:
Solutions
# 99 Elm Problems/Problem 72

Given a tree, construct the bottom-up order sequence of the tree nodes. In bottom-up sequence all child nodes must be shown before any of its parent nodes. The bottom-up sequence of tree5 is "gfcdeba"
# # # THIS IS A STUB # # #
Result:
Solutions
# 99 Elm Problems/Problem 66

The method yields a very compact layout while maintaining a certain symmetry in every node. Find out the rules. Hint: Consider the horizontal distance between a node and its successor nodes.
# # # THIS IS A STUB # # #
Result:
Solutions
# 99 Elm Problems/Problem 71

We define the internal path length of a multiway tree as the sum of the path lengths from all nodes of the tree to the root. For example tree5 has an internal path length of 9 (1+2+1+1+2+2). Write a function to calculate internal path length of a tree.
# # # THIS IS A STUB # # #
Result:
Solutions
# A-level Chemistry/OCR (Salters)/The Oceans

The Oceans is the twelfth unit in the Salters Advanced Chemistry course.

## Chemical Storylines sections

* O1: The edge of the land
* O2: Wider still and deeper
* O3: Oceans of energy
* O4: A safe place to grow
* O5: Summary

## Chemical Ideas sections

* 5.1 Ions in solids and solutions (revision)
* 3.2 The size of ions
* 4.5 Energy changes in solution
* 4.6 Born-Haber cycles
* 4.4 Energy, entropy and equilibrium
* 5.4 Forces between molecules: hydrogen bonding (revision)
* 7.1 Chemical equilibrium (revision)
* 7.2 Equilibria and concentrations (revision)
* 8.1 Acid-base reactions (revision)
* 7.7 Solubility equilibria
* 11.2 The s block: Groups 1 and 2 (revision)
* 8.2 Weak acids and pH
* 8.3 Buffer solutions

## Activities

* O1.1 What is the relationship between a solvent and the substances that dissolve in it?
* O1.2 What changes occur when an ionic solid dissolves?
* O1.3 What factors affect the enthalpy change of formation of an ionic compound?
* O3.1 The enthalpy change of vaporisation of water
* O3.2 What crystals form when a solution is cooled?
* O4.1 Finding out more about weak acids
* O4.2 Investigating some buffer solutions
* O5 Check your notes on The Oceans

## External links

* O unit map
* O Check Your Notes
# A-level Chemistry/OCR (Salters)/The Atmosphere/Halogenoalkanes
## Naming

The halogen name is put before the alkane chain name, in alphabetical order. For example, CBrClFI would be named bromochlorofluoroiodomethane because Br < Cl < F < I in the alphabet. The -x- notation is then used to describe the position of the halogen in relation to the rest of the chain. The halogens are listed in alphabetical order, before finally the alkane name change is suffixed on to the end.

## Physical properties

The halogenalkanes' boiling point increase as the atomic mass of the halogen atoms increase, or as the number of halogen atoms increase. Effectively the mass is what determines the boiling point.
A simple explanation for this is that the amount of instantaused dipole-induced interactions increase. With this increase in intermolecular force, more energy is required to break the intermolecular bonds, so the boiling point is higher.

## Bond enthalpies

The bond between carbon and the halogen itself gets weaker as the size of the halogen increases. For example, the C-I bond is much weaker than the C-F bond due to the much bigger size of the Iodene atom. With a weaker bond, it becomes easier to break said bond and thus the reactivity increases. As a guide:
* Fluoro- compounds are extremely unreactive
* Chloro- compounds are somewhat reactive. This is what causes the breakdown of ozone with CFCs.
* Bromo- and iodo- compounds are reactive and are useful as catalysts and the like in chemical synthesis.

## Homolytic fission

The first type of fission that Halogenalkanes go through is homolytic fission. In this the C atom and Halogen atoms become radicalised

## Hetrolytic fission

In hetrolytic fission the C-X bond breaks and both become ionised. The halogen atom becomes negatively charged and the carbon becomes positively charged − a carbocation.

## Substituion reactions

In this a nucleophile from another group replaces the halogen and leaves the halogen ionised outside the molecule.

## Preparation and reactions of halogenalkanes

| Nucleophile | Product | Reaction conditions |
| H$_2$O | ROH, H$^+$ | Reflux. aka hydrolysis |
| OH$^−$ | ROH | Reflux, with ethanol as a solvent |
| NH$_3$ | RNH$_2$ | Heat in sealed tube with ammonia |