100% found this document useful (1 vote)
395 views4 pages

Computer Organization and Assembly Language Lab Manual (Lab 04)

This document is a lab manual for a computer organization and assembly language course. It contains 8 programs to be executed in a debugger and the output values of registers and flags to be recorded. The programs perform operations like MOV, ADD, SUB on registers like AX, BX, AL, AH to demonstrate how instructions modify register values and set flags.

Uploaded by

HAMZA JAMIL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
395 views4 pages

Computer Organization and Assembly Language Lab Manual (Lab 04)

This document is a lab manual for a computer organization and assembly language course. It contains 8 programs to be executed in a debugger and the output values of registers and flags to be recorded. The programs perform operations like MOV, ADD, SUB on registers like AX, BX, AL, AH to demonstrate how instructions modify register values and set flags.

Uploaded by

HAMZA JAMIL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Computer Organization and Assembly

Language
Lab Manual (Lab 04)

Name Hamza Jamil


ID : f2019266281
Section: v2
Lab 04
LAB TASK

Execute the following Programs in Turbo Debugger and fill the output table with corresponding
value of register and give the reason if the value of flag is set to 1.

Program 1: [Assume registers are set to default values]


Mov ah,07Fh
Mov ax,1234 Output:
Mov bh,al
Mov bl,ah AX = 04
AX = D2
BX = D2
BX= 04

Program 2: [Assume registers are set to default values]

Mov al,81 Output:


Add al,0FEh
AX = 00
AX = 4F
FLAG BITS :10000010

Program 3: [Assume registers are set to default values]

Mov ax,5510
Sub al,2
Output:

AX = 15
AX = 84
FLAG BITS :00101010
Program 4: [Assume registers are set to default values]

Mov ah,10
Output:
Mov bh,10
Sub ah,bh AX = 00
BX= 0A
FLAG BITS :01001010

Program 5: [Assume registers are set to default values]

Mov ax,0FFFEh
Output:
Sub al,2
Mov bx,02D8Ch AX = FF
Add bx,ax AX = FC
FLAG BITS :10001110
BX= 2D
BX= 88
FLAG BITS :10001110
Program 6: [Assume registers are set to default values]

Mov al,100
Add al,50
Output:

AL=032h
FLAG BITS :00111010
Program 7: [Assume registers are set to default values]

Mov ax,32760
Add ax, 50 Output:

AX=80
AX= 2A
FLAG BITS :00110010

Program 8: [Assume registers are set to default values]

Mov ax,65530
Output:
Add ax, 80
AX=00
AX= 4A
FLAG BITS :10000010

You might also like