此内容来自第三方平台 (Dailymotion)。如果此视频侵犯了您的版权,请使用 立即删除 工具。
Signed Integer Division
描述
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
Thanks for watching!
Find us on other social media here:
- https://www.NeuralLantern.com/social
Please help support us!
- Subscribing + Sharing on Social Media
- Leaving a comment or suggestion
- Subscribing to our Blog
- Watching the main "pinned" video of this channel for offers and extras
#AssemblyLanguage, #x86_64, #LowLevelProgramming, #AssemblyTutorial, #IDIV, #Yasm, #UbuntuProgramming, #ComputerArchitecture, #ProgrammingTutorial, #SystemsProgramming
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
Thanks for watching!
Find us on other social media here:
- https://www.NeuralLantern.com/social
Please help support us!
- Subscribing + Sharing on Social Media
- Leaving a comment or suggestion
- Subscribing to our Blog
- Watching the main "pinned" video of this channel for offers and extras
#AssemblyLanguage, #x86_64, #LowLevelProgramming, #AssemblyTutorial, #IDIV, #Yasm, #UbuntuProgramming, #ComputerArchitecture, #ProgrammingTutorial, #SystemsProgramming
关键词与标签
#x86-64 assembly
#assembly language
#idiv instruction
#signed division
#integer division assembly
#yasm assembly
#ubuntu assembly programming
#low level programming
#computer architecture
#assembly tutorial
#x86 assembly
#64-bit assembly
#cqo instruction
#rax rdx division
#assembly language programming
相关视频
x86-64 Assembly: Signed Integer Multiplication and Addition with IMUL & ADD (YASM on Ubuntu Linux)
Neural Lantern
ARM Programming Tutorial 1 - ARM Assembly Programming and Architecture & Instruction Sets
Roxanne Morton
Mastering System Services in x86-64 Assembly Programming
Neural Lantern
Mixed Function Arguments in x86-64 Assembly - Integers & Floats Explained
Neural Lantern
x86-64 Assembly: Integer Data Movement, Pointers, and Dereferencing Explained (YASM on Ubuntu)
Neural Lantern
YASM x86-64 Assembly Functions Tutorial - Integers, Floats, Pointers, ABI, C++ Interoperability
Neural Lantern
来自同一上传者
AVL Tree Rotations Practice: Balancing a Huge Linear Tree Step by Step
1 次观看
How to Perform AVL Tree Rotations - Step By Step Example
6 次观看
AVL Tree Rotations Tutorial: Fixing Imbalance After Adding a Node
5 次观看
AVL Tree Rotation Types Explained for Self-Balancing Binary Search Trees
4 次观看
AVL Tree Tutorial: Balance Factors and Why They Fix Slow BSTs
4 次观看
Binary Search Tree Removals - Delete Nodes with 0, 1, or 2 Children
2 次观看