https://github.com/katokode/btree
BTree Implementation in x86_64 Assembly Language with C interface
https://github.com/katokode/btree
assembly-language b-tree btree data-structures-and-algorithms multiway-tree shared-library
Last synced: 6 months ago
JSON representation
BTree Implementation in x86_64 Assembly Language with C interface
- Host: GitHub
- URL: https://github.com/katokode/btree
- Owner: KatoKode
- License: gpl-2.0
- Created: 2025-03-09T04:35:36.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-07-21T02:43:40.000Z (6 months ago)
- Last Synced: 2025-07-21T04:24:20.500Z (6 months ago)
- Topics: assembly-language, b-tree, btree, data-structures-and-algorithms, multiway-tree, shared-library
- Language: Assembly
- Homepage:
- Size: 128 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
Just Another Armchair Programmer
BTree Implementation in x86_64 Assembly Language with C interface
by Jerry McIntosh
---
# INTRODUCTION
This is an Assembly Language implementation of a BTree (Multiway-Tree). The BTree is implemented as a shared-library with a C interface. There is also a C demo program.
The BTree implementaton is based on a C++ implementation found at:
[GeeksforGeeks: Delete Operation in B-Tree](https://www.geeksforgeeks.org/delete-operation-in-b-tree/?ref=lbp)
## LIST OF REQUIREMENTS
+ Linux OS
+ Programming languages: C and Assembly
+ Netwide Assembler (NASM), the GCC compiler, and the make utility
+ your favorite text editor
+ and working at the command line
---
# CREATE THE DEMO
Run the following command in the `BTree-main` folder:
```bash
sh ./btree_make.sh
```
---
# RUN THE DEMO
In folder `btest` enter the following command:
```bash
./go_btest.sh
```
---
# THINGS TO KNOW
You can modify a couple defines in the C header file `main.h`:
```c
#define DATA_COUNT 128
#define DELETE_COUNT 0
```
Modifying these defines will change the behavior of the demo program.
NOTE: The demo program will not check for negative values or `DELETE_COUNT` having a larger value than `DATA_COUNT`.
There are calls to `printf` in the `btree.asm` file. They are for demo purposes only and can be removed or commented out. The `printf` code sections are marked with comment lines: `BEGIN PRINTF`; and `END PRINTF`. The format and text strings passed to `printf` are in the `.data` section of the `btree.asm` file.
Have Fun!
---