Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Signed Integer Division in x86-64 Assembly with IDIV and CQO

Автор: Neural Lantern

Загружено: 2025-12-14

Просмотров: 32

Описание:

In this video, I walk through how to perform signed integer division in x86-64 assembly language using Yasm on Ubuntu/Linux.

We focus on 64-bit signed integers and the IDIV instruction. I explain the setup: loading the dividend into RAX, using CQO for proper sign extension into RDX, loading the divisor, and executing IDIV. After division, the quotient ends up in RAX and the remainder in RDX.

I reference the excellent free book "x86-64 Assembly Language Programming with Ubuntu" and show practical code examples, including a complete working program that prints both the quotient and remainder.

We test with small numbers (256 / 233) and larger ones to see it in action. I also touch on the difference between signed (IDIV) and unsigned (DIV) division, and why CQO is needed for correct sign handling.

Perfect for anyone learning low-level programming, assembly language, or wanting to understand how integer division really works under the hood.

Introduction to Signed Division 00:00:00
Referencing the Assembly Book 00:00:28
IDIV Instruction Overview 00:01:16
Dividend and Divisor Setup 00:01:24
Sign Extension and CQO 00:04:18
Quotient and Remainder Results 00:04:40
Setting Up the Program 00:05:13
Data Section and Strings 00:06:22
Function Prologue and Preservation 00:09:20
Loading the Dividend into RAX 00:10:00
Sign Extension with CQO 00:11:24
Loading the Divisor 00:12:36
Performing IDIV 00:14:19
Saving Quotient and Remainder 00:16:48
Printing the Results 00:17:20
Running and Testing the Program 00:18:51
Testing Larger Numbers 00:19:48
Returning the Remainder 00:21:42
Signed vs Unsigned Division 00:23:48
Conclusion and Thanks 00:25:02

#AssemblyLanguage, #x86_64, #LowLevelProgramming, #AssemblyTutorial, #IDIV, #CQO, #Yasm, #UbuntuProgramming, #ComputerArchitecture, #ProgrammingTutorial, #SystemsProgramming

=-=-=-=-=-=-=-=-=

Thanks for watching!

Find us on other social media here:
https://www.NeuralLantern.com/social
Twitter / X: https://x.com/NeuralLantern
Rumble: https://rumble.com/c/c-3696939
BitChute: https://www.bitchute.com/channel/pg1P...
Daily Motion: https://www.dailymotion.com/neurallan...
Minds: https://www.minds.com/neurallantern/
Odysee: https://odysee.com/@NeuralLantern:5

Please show your support!

Buy me a coffee: https://ko-fi.com/neurallantern

Subscribe + Sharing on Social Media
Leave a comment or suggestion
Subscribe to Blog: https://www.NeuralLantern.com
Watching the main "pinned" video of this channel for offers and extras

Signed Integer Division in x86-64 Assembly with IDIV and CQO

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

x86-64 Assembly: Signed Integer Multiplication and Addition with IMUL & ADD (YASM on Ubuntu Linux)

x86-64 Assembly: Signed Integer Multiplication and Addition with IMUL & ADD (YASM on Ubuntu Linux)

Mastering x86-64 Assembly: A Beginner's Guide to CPU Registers

Mastering x86-64 Assembly: A Beginner's Guide to CPU Registers

x86-64 Assembly: Integer Data Movement, Pointers, and Dereferencing Explained (YASM on Ubuntu)

x86-64 Assembly: Integer Data Movement, Pointers, and Dereferencing Explained (YASM on Ubuntu)

x86-64 Assembly Bit Manipulation: AND, OR, XOR, NOT, Shifts & Rotates Tutorial

x86-64 Assembly Bit Manipulation: AND, OR, XOR, NOT, Shifts & Rotates Tutorial

Learn Conditional Branching in x86-64 Assembly (YASM/NASM) - CMP, JE, JNE, JL, JG & More

Learn Conditional Branching in x86-64 Assembly (YASM/NASM) - CMP, JE, JNE, JL, JG & More

Высокомерный полицейский остановил чернокожего агента ФБР и пожалел об этом

Высокомерный полицейский остановил чернокожего агента ФБР и пожалел об этом

Для Чего РЕАЛЬНО Нужен был ГОРБ Boeing 747?

Для Чего РЕАЛЬНО Нужен был ГОРБ Boeing 747?

How Physicists Approximate (Almost) Anything

How Physicists Approximate (Almost) Anything

Советский способ увеличить количество отжиманий (навсегда)

Советский способ увеличить количество отжиманий (навсегда)

Как я с нуля сделал ноутбук на базе C64 — Portable 64 (эмуляция)

Как я с нуля сделал ноутбук на базе C64 — Portable 64 (эмуляция)

Why Light Speed Is The LIMIT? What Feynman Uncovered Will COLLAPSE Your Mind

Why Light Speed Is The LIMIT? What Feynman Uncovered Will COLLAPSE Your Mind

Debian: САМЫЙ СТАБИЛЬНЫЙ Linux и ТЁМНАЯ История Создателя

Debian: САМЫЙ СТАБИЛЬНЫЙ Linux и ТЁМНАЯ История Создателя

Master File Copying with System Calls in x86-64 YASM Assembly

Master File Copying with System Calls in x86-64 YASM Assembly

Слабый ноут теперь ТОП игрушка! Как установить ChromeOS и получить ВСЁ!

Слабый ноут теперь ТОП игрушка! Как установить ChromeOS и получить ВСЁ!

Complex If-ElseIf-Else in x86-64 YASM Assembly - Full Guide with Code Examples

Complex If-ElseIf-Else in x86-64 YASM Assembly - Full Guide with Code Examples

Румынская математическая олимпиада

Румынская математическая олимпиада

Mix C++, C, and Assembly into One Program - Hybrid Program Full Build Tutorial

Mix C++, C, and Assembly into One Program - Hybrid Program Full Build Tutorial

Как Ubuntu Предала Linux - Вся Правда о Взлёте и Падении Canonical

Как Ubuntu Предала Linux - Вся Правда о Взлёте и Падении Canonical

Другие пилоты мне не верили, пока не увидели кадры!

Другие пилоты мне не верили, пока не увидели кадры!

What If You Keep Slowing Down?

What If You Keep Slowing Down?

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com