CS401 ASSIGNMENT NO 1 SOLUTION 4 Shared by junaid

No Comments


okay here it is (answer is 100% but not copying the details of it)
for clues
Segment Address = 5FD1 x10 adding 0 on the right side
Offset Address      = 0111E      adding 0 on left side
not just add these two values you can use win 7 calculator (set it programmer mode ALT+3) and select HEX and Qword and just add these two values )
  1. 5FD1: 111E
Physical address =              60E2E

  1. 91EF: F1F1
Physical address =              A10E1



Question 2 :

to initialize register a value
mov ax, value

to add two register value
ex: add ax into bx and store into ax
add ax, bx  ; that first add the value of ax into bx and result will save in ax (got it )
not (Register name) ; that will invert the value of the ax ex : if register value is 000D then its invert is FFF2 also check it using by calc (invert the contents is even simpler just check the value of ax on debugging time and put this value into calculator and select not  you will get the value)

and finally performing and on ax and dx
syntax is
and rigister1 , register 2
("and" operator will return 1 if both operands are 1, otherwise it will return 0.
you can also check this by getting values of ax and dx on the debugging time and then use and operation in calc

now just move ax value in bx and
terminate the program

for all who are interesting in combine study in cs401 pm me


Next PostNewer Post Previous PostOlder Post Home

0 comments

Post a Comment