Welcome! Log In Create A New Profile


2007 Exam Q3

Posted by sharkie 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
2007 Exam Q3
October 25, 2008 09:51PM
Hi Guys,

Please see my attempt for Q3(a):
mov si, dx ; SI points to the input array
mov di, bx ; DI points to the input array
mov cx, 20 ; number of bytes in array = 20
mov bl, 2h ; set up operand2 for IMUL

mov ax, [si] ; Get the first byte
imul bl ; Mulitply AX by 2
mov [di], ax ; Store result in output array
inc si ; Adjust pointer for SI
inc di ; Adjust poiner for DI
loop loop1 ; if CX <> 0, loop again

Is this correct or are there some special way we need use arrays in assembler?

Only after i finished this attempt did i read question 3(b) properly and now i think i messed up 3(a) since i think i did in 3(a) what i was suppose to do in 3(b).
Sorry, only registered users may post in this forum.

Click here to login