Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pedropizarro/lowlevel
Learn x86_64; C and Linux principles
https://github.com/pedropizarro/lowlevel
Last synced: 1 day ago
JSON representation
Learn x86_64; C and Linux principles
- Host: GitHub
- URL: https://github.com/pedropizarro/lowlevel
- Owner: PedroPizarro
- Created: 2021-01-09T20:59:07.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-17T12:47:00.000Z (over 3 years ago)
- Last Synced: 2023-11-20T21:26:44.912Z (12 months ago)
- Language: Assembly
- Homepage:
- Size: 72.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Low-level programmig
Personal project to lean low-level coding inspired by the book: [Low-level programming: C, Assembly and program execution on Intel 64 architecture](https://www.apress.com/br/book/9781484224021) - by Igor Zhirkov.
The official GitHub of the book can be found [here](https://github.com/Apress/low-level-programming).Besides these original idea, this project turned into an opportunity to learn more about git, makefile, GNU GDB, GNU GCC and OS principles.
## Table of Contents
1. [Environment](#environment)
2. [Usage](#usage)
3. [License](#license)## Environment
### Operating System
- Fedora 31 x86_64- Linux kernel: 5.8.18-100
### Programs used
* __C compiler__: GCC Red Hat 9.3.1-2* __ASM compiler__: NASM 2.14.02
* __Debugger__: GNU GDB 8.3.50.20190824-30.fc31
* __Make__: GNU MAKE 4.2.1
## Usage
### Makefile
#### 1. Assembly
In the `assemblyfiles` directory:
- Compile all the `.asm` files and create the `bin/` and `build/` directories.
```bash
make -s
```
- Compile that specific `.asm` file
```bash
make bin/file_name -s
```
- Clean all the binaries
```bash
make clean
```
- Create GDB setup and commands shortcuts for debugging
```bash
make gdb
```The `-s` flag hides the commands that are executed.
[GNU Make manual](https://www.gnu.org/software/make/manual/make.html).---
#### 2. C language
In the `cfiles` directory:### GNU GDB
All the layout and initial configuration is done by the commands written in `~/.gdbinit` and `assemblyfiles/bin/.gdbinit`.
Besides that, all the commands can be found in [GNU GDB documentation](https://www.gnu.org/software/gdb/documentation/).## License
None