无锡华谊兄弟电影院:悬赏50分做两个简单的汇编程序

来源:百度文库 编辑:高考问答 时间:2024/05/03 05:04:10
Experiment 1
Experiment object
1.Stuty the program design method of compare instruction about assembly language.
2.Understand the different of conditional transfer and unconditional transfer
3.Study design method of loop program and write a program of loop and breach..
Experiment task
Calculate sum of ten students’ mark and average mark, compare them and give the numbers which above average mark ,which below average mark .Give the following data is in the data buffer: db 78,69,84,72,69,98,57,48,81,72
Initialize the data segment, include number buffer, sum and average.
1.Get the sum of these data, use a loop to accumulate
2.Calculate average mark and compare which number is higher average mark or lower average mark.

Experiment 2
Experiment object
1.Know how change ASCII code which you input from keyboard into hexadecimal number.
2.Know how change number into ASCII code, then output to Screen.
3.Understand program design method of sort of two dimensions using assembly language.
Experiment task
Use assembly language to achieve the following function:
There are ten people attend a sports meeting, each of them have a result on run. The computer will appear the table in turn according to result
1.Do two buffers to save sportsman’s name and result.
2.Make a program to set data order.
3.Output to screen.
Bufn db ‘n1’,’n2’,’n3’,’n4’,’n5,’n6’,’n7’,’n8’,’n9’,’n0’
Bufr dw 0998h,0993h,1010h,1002h,1006h,1102h,1108h,1130h,0987h,0965h

1.
data segment
buffer db78,69,84,72,69,98,57,48,81,72
length equ $-buffer
sum dw ?
data ends
code segment
assume ds:data cs:code
start:mov ax,data
mov ds,ax
lea si,buffer
mov bx,0
mov cx,length
lop:mov bx,[si]
inc si
loop lop
mov sum,bx

挖,不错啊,汇编用英语教啊,可惜我看不懂英文