100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

COS2621 ASSIGNMENT 2 Year 2023 GUIDELINES/SOLUTIONS

Rating
-
Sold
9
Pages
5
Uploaded on
01-08-2023
Written in
2023/2024

COS2621 ASSIGNMENT 2 Year 2023 GUIDELINES/SOLUTIONS School of Computing Solutions

Institution
Course









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Course

Document information

Uploaded on
August 1, 2023
Number of pages
5
Written in
2023/2024
Type
Other
Person
Unknown

Subjects

Content preview

Question 1

(a)

- LOAD DIRECT 300: This instruction loads the value at memory address 300 into the accumulator, so
the value loaded into the accumulator is 320.

- LOAD DIRECT 320: This instruction loads the value at memory address 320 into the accumulator, so
the value loaded into the accumulator is 305.

- LOAD INDIRECT 325: This instruction loads the value at the memory address stored in memory
address 325 into the accumulator. The value at memory address 325 is 300, so the value loaded into
the accumulator is 300.



(b)

, - Immediate addressing: MOV AX, 5 (This instruction moves the immediate value 5 into register AX)

- Direct addressing: MOV AX, [500] (This instruction moves the value at memory address 500 into
register AX)

- Stack addressing: PUSH AX (This instruction pushes the value of register AX onto the stack)

- Indexed addressing: MOV AX, [BX+SI] (This instruction moves the value at the memory address
pointed to by the sum of registers BX and SI into register AX)

- Base-addressing: MOV AX, [BX+100] (This instruction moves the value at the memory address
pointed to by the sum of register BX and immediate value 100 into register AX)

- Register indirect addressing: MOV AX, [BX] (This instruction moves the value at the memory address
pointed to by register BX into register AX)



Question 2

student_no: 12345678

student_name: John Smith



```

; Clear the screen, change screen color to yellow on blue

; Set cursor position to row 10, column 0



MOV AH, 06 ; Function to clear the screen

MOV AL, 0 ; Clear entire screen

MOV BH, 07h ; Yellow on blue color

MOV CX, 0 ; Upper left corner of the screen

MOV DX, 184Fh ; Lower right corner of the screen

INT 10h ; Call the interrupt



MOV AH, 02h ; Function to set cursor position

MOV BH, 00h ; Page number 0

MOV DH, 09h ; Row 10 (row's start count from 0)

MOV DL, 00h ; Column 0 (column's start count from 0)

INT 10h ; Call the interrupt

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GoldenKey University of South Africa (Unisa)
Follow You need to be logged in order to follow users or courses
Sold
135
Member since
4 year
Number of followers
122
Documents
31
Last sold
3 months ago

3.4

11 reviews

5
4
4
1
3
3
2
1
1
2

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions