1) Add the contents of six memory bytes andd store the sum in memory:
a) Define variable VAR in the data segment to be 6 bytes long with random numbers in each byte.
b) Define a one-byte variable ANSWER that is initialized to zero.
c) Add VAR[0] through VAR[5] (6 bytes in total)
d) Put the sum in ANSWER.
e) Use a looping and any addressing mode that you find acceptable.
2)Change question one to keep track each time the carry bit is set.
a) Use a new variable called ANSWER1.
b) Each time carry is set add one to ANSWER1
Note: The word-size sum of all the bytes is: ANSWER1 for the high byte, ANSWER for the low byte.
3. This program is to count the number of lower and upper case characters and store the result in memory.
a) Store a string that includes upper case, lower case and other ASCII characters at location STRING1.
b) Write a program that reads 20 bytes of the character data that are stored at location STRING1 and counts the number of upper case characters. And the number of lower case charactors.
c) Store this total in location UPPER and location LOWER.
4. Change question three to keep reading any number of data bytes until the sentinal value 0FF16 is encountered. Make sure that the last byte stored at location STRING1 has the value 0FF16.
5. Write a program that gets a byte of data from location DATA1.
a) If DATA1 has bit 0 set, subtract 2016 from the value.
b) If bit 7 is set, clear bits 4 through 7.
c) If both bit 0 and bit 7 are set, then toggle bits 0 through 3.
Hint: You may find the test instruction useful for this problem.
6. Write a program which returns to DOS if x is pressed. Any other key is to be echoed to the screen.
This interrupt waits for a key press and returns the keycode:
mov ah,00h
int 16h ;interrupt 16h, function 0h
Exit condition:
• AH returns the keyboard scan code
• AL returns the ASCII character code
Key Scan code ASCII code
A 1Eh 41h (61h)
X 2Dh 58h (78h)
X 01h 1Bh
应楼下要求,悬赏我提高了50分.
但是我要的是完整详细的答案,不是要翻译....所以不能给你分~但是还是谢谢你.
继续等待.