panchis7u7 / Assembler-and-C-Training

ARM Assembly programs for Apple Silicon platforms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C and Assembly Training - x64 and ARM

This repository provides training materials for learning C and Assembly programming for x64 and ARM architectures. It covers fundamental concepts, coding examples, and debugging techniques using GDB (for x64) and LLDB (for ARM).

Prerequisites Before starting this training, make sure you have the following prerequisites:

  • Basic knowledge of the C programming language.
  • Familiarity with computer architecture concepts.
  • A system running an x64 or ARM-based processor (MacOS)(depending on the architecture you want to learn)
  • GDB installed for x64 architecture.
  • LLDB installed for ARM architecture. Contents

This training repository consists of the following components:

  • C Programming: Introduction to C programming language, data types, control flow, functions, and memory management.

  • Assembly Language: Introduction to Assembly language for x64 and ARM architectures, including instruction sets, registers, memory access, and function calling conventions.

  • Debugging with GDB: A comprehensive guide on using GDB (GNU Debugger) for x64 architecture. It covers setting breakpoints, examining variables and memory, stepping through code, and handling common debugging scenarios.

  • Debugging with LLDB: A detailed tutorial on using LLDB (LLVM Debugger) for ARM architecture. It covers similar topics as GDB, tailored specifically for ARM-based systems.

Getting Started

To get started with this training, follow these steps:

Clone this repository to your local machine:

git clone https://github.com/your-username/c-assembly-training.git

For MacOS:

Install the homebrew package manager: https://brew.sh/ Install binutils from the terminal:

brew update && brew install binutils

If you need to have binutils first in your PATH, run:

echo 'export PATH="/opt/homebrew/opt/binutils/bin:$PATH"' >> ~/{.zshrc|.bashrc}

For compilers to find binutils you may need to set:

export LDFLAGS="-L/opt/homebrew/opt/binutils/lib”
export CPPFLAGS="-I/opt/homebrew/opt/binutils/include"

For Windows:

Install mingw64: https://sourceforge.net/projects/mingw-w64/, this contains some unix executables (grep) and compiler toolchains (gcc, g++)

Practice the coding examples and exercises provided in the repository to reinforce your understanding.

Resources

Contributions Contributions to this training repository are welcome. If you find any issues, have suggestions for improvements, or would like to contribute additional materials, please feel free to submit a pull request.

About

ARM Assembly programs for Apple Silicon platforms.


Languages

Language:Assembly 59.1%Language:C 29.7%Language:Makefile 11.0%Language:GDB 0.2%