0% found this document useful (0 votes)
9 views

Assignment 2

AI assignment 2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Assignment 2

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

CHINHOYI UNIVERSITY OF TECHNOLOGY

NAME REG NUMBER

PHAROAH CHIMPARIRA C19137185C BSIT2

TATENDA MASHIRI C19136616E BSIT2

TAKUNDA C MATAMBO C19137378N BSIT2

NATASHA MOYA C19137892H BSIT2

PRINCE WAFAWAFA C19136770A BSIT2

UNITY ZINDOVE C19138064B BSIT2

MODULE : CUIT401

LECTURER : Mrs. Chinyuku

SUBMISSION DATE : 09 MARCH 2022


Question 1

org 100h

.data

a dw 0071H

b dw 0002H

c dw ?

.code

mov AX,a

mov BX,b

cmp AX,BX

JLE label1

jmp end

label1;

mov c,1

mov DX,c

end:

ret
Question 2

Org 100h

.code

mov SI, 1000H

mov DI, 1010H

mov AX, 000h

mov CL, [SI]

mov BL, CL

INC SI

[ ]:

ADD AH, 00

INC SI

DEC SL

JNZ 40E

DIV BL

MOV [DI], AX

HLT:

ret
QUESTION 3

ORG 100

.DATA

A EQU 56H

B EQU 34H

C EQU 14H

D EQU 12H

.CODE

MOV AL,A

ADD AL,B ;adding b to a

PUSH SI

MOV AL,C

ADD AL,D ;adding d to c

PUSH SI

POP SI

MUL AL ;(a+b) * (c+d)

RET
Question 4

A processor like 8086 but has 8 bit registers and a physical address is 10bit

a) Total address space of the new processor(10) = 2^10


= 1024

b) Size of offset at each segment location for 8 bit registers


= total address space/register size
=1024/8
=128 kb for each segment
Question 5 Directives with examples

a) ASSUME:
It is used to tell the processor that the name of the logical segment should be used for a
specific segment
for example: ASSUME DS: DATA tells the assembler that for any program instruction
which refer to the data segment it should use the logical segment called DATA.

b) EQU:
It used to give name to some values or symbol each time the assembler finds the given
names in the program it replaces it with the value of the symbol.
For example: FACTOR EQU 03H equates factor to 03h which can be used as ADD
AL,FACTOR

c) DW
it is used to declare word that is 16 bits long
for example: num1 DW 1234H

d) DD
It is used to declare double value that is a 32 bit storage allocation
For example, when we want to declare a string of names we say: name DD 12345678H

e) .DATA
The .data assembler directive tells the assembler to start assembling the line after the
directive into the .DATA section of the computer program. It contains permanent constants
and variables used in the computer program. For example:
.data
Num1 dw 1234h
Num2 dw 1002h
QUESTION 6 I/O strategics

a) Polled I/O

It is also referred to as programmed I/O, this data transfer technique means a data transfer between
I/O devices and memory or an I/O device and the processor. If computer system I/O operations
are completely controlled by the processor, then that system is said to be using Polled I/O.

b) Interrupt Driven I/O

In this technique, the processor executes its main program and only stop service peripheral devices
when it is told to do so by the device it self. It provides the external asynchronous input that informs
the processor that it completes whatever instruction that is currently being executed and fetch new
routine that will service the requesting device.

c) DMA

It is known as the direct memory access, this circuit provides direct access to the memory without
using the central processing unit. The DMA can provide high speed transfer to data from one part
of the memory to another. It can also pass data direct to and from the memory. This provides
significant improvement in operating speed of the whole system. (Godse & D .A, 2007).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy