Sie sind auf Seite 1von 4

FATIMA JINNAH WOMEN UNIVERSITY

Department Of Computer Science

Computer Organization and


Assembly Language
Assignment-II
Submission Date
02 / 07 / 2020

Student Name:

Class and Section: .

REG Number:

Email ID:
FATIMA JINNAH WOMEN UNIVERSITY
Department Of Computer Science

Copyright Note for Lab sheet

In preparation of these materials have been taken from different online

Sources in the shape of books, websites, research papers and presentations etc.

However, the author does not have any intention to take any benefit of these in her/his

Own name. This lecture (audio, video, slides etc.) is prepared and delivered only for

Educational purposes and is not intended to infringe upon the copyrighted material.

Sources have been acknowledged where applicable. The views expressed are

Presenter’s alone and do not necessarily represent actual author(s) or the institution.

Thank you
FATIMA JINNAH WOMEN UNIVERSITY
Department Of Computer Science

Total Marks 80
Detailed Viva / online questioning Session Marks 15
Question 1

a) Using twos compliment write code in emu8086


Apply Athematic Operation on two register AX and BX and display output on CLI
Screen, last two digits of your Registration Number I .e.BSC-2017-050 must be used
for twos Compliments.

b) Explain briefly each block for Pipelining Datapath Diagram i.e. clock cycles, cache
memory, Instruction register (IR), Rs and Rt, ALU, Back register, Data Cache and
Instruction Cache.

Figure 1. 1 Pipelining Data path Diagram


FATIMA JINNAH WOMEN UNIVERSITY
Department Of Computer Science

Question 2
Using emu8086

a) Run and e xplain the working of code.


b) Identifying those Instructions which Convert ASCII to hexadecimal and display output.

; Count number of key presses. the result is in print_ax proc


bx register. cmp ax, 0
; jne print_ax_r
; You must type into the emulator's screen, push ax
; if it closes, press screen button to re-open it. mov al, '0'
name "keycount" mov ah, 0eh
org 100h int 10h
; print welcome message: pop ax
mov dx, offset msg ret
mov ah, 9 print_ax_r:
int 21h pusha
xor bx, bx ; zero bx register. mov dx, 0
wait: mov ah, 0 ; wait for any key.... cmp ax, 0
int 16h je pn_done
cmp al, 27 ; if key is 'esc' then exit. mov bx, 10
je stop div bx
mov ah, 0eh ; print it. call print_ax_r
int 10h mov ax, dx
inc bx ; increase bx on every key press. add al, 30h
jmp wait mov ah, 0eh
; print result message: int 10h
stop: mov dx, offset msg2 jmp pn_done
mov ah, 9 pn_done:
int 21h popa
mov ax, bx ret
call print_ax endp
; wait for any key press:
mov ah, 0
int 16h
ret ; exit to operating system.
msg db "I'll count all your keypresses. press
'Esc' to stop...", 0Dh,0Ah, "$"
msg2 db 0Dh,0Ah, "recorded keypresses: $"

Das könnte Ihnen auch gefallen