Loading...
「ツール」は右上に移動しました。
利用したサーバー: wtserver1
4いいね 27 views回再生

Addition of 16-bit using TASM software in DosBox | 8051 Assembly Language Programming

In this video, I demonstrate a simple Assembly Language program using DOSBox and TASM (Turbo Assembler) to add two 16-bit hexadecimal numbers. This program uses basic instructions and is beginner-friendly for those learning low-level programming.

This program adds two 16-bit hexadecimal numbers using TASM in DOSBox.
__________________________________________________

Code Explanation :

ASSUME CS:CODE, DS:DATA
Tells TASM/CPU that CODE is in CS and DATA is in DS.

DATA SEGMENT … DATA ENDS
N1 DW 4296H - 16-bit var with value 4296H
N2 DW 1000H - 16-bit var with value 1000H
RESULT DW ? - 16-bit uninitialized var

CODE SEGMENT START
START: Label used for END START

MOV AX, DATA
Put address of DATA segment into AX

MOV DS, AX
Load AX into DS (sets data segment)

MOV AX, N1
Load 4296H into AX

ADD AX, N2
AX = 4296H + 1000H = 5296H

MOV RESULT, AX
Store 5296H into RESULT

INT 03H
Debug interrupt - halts program/debug

This is a basic example of addition in Assembly Language.
__________________________________________________

Watch Previous Videos:

Dos box installation process -    • Dos box installation process| step-by-step...  
__________________________________________________

If you found this helpful, like, comment your doubts, and subscribe for more tech videos!

Don’t forget to hit the bell icon!


#AssemblyProgramming #DOSBoxTutorial #LearnToCode #CodingForBeginners

コメント