
(1) In debug, before the end of line17 and line19, record this time: Register (DS) = _076A_, Register (SS)=


(1) In debug, before the end of line17 and line19, record this time: Register (DS) = _076A_, Register (SS)=

(1) Before the end of line9 and line11 in debug, record this time: Register (DS) = _076C_, Register (SS)=
xxx segment db N dup(0) xxx ends
Otherwise, the size of the memory space is ((N%16)+1)*16 bytes
A: task1_after modifying the pseudo directive to end 4. ASM works, and task1_1.asm, task1_2.asm, task1_3.asm is not working properly. If you don't write start, the program will use the first address of the default data segment as the program's initial address, because task1_ 4. The code snippet in ASM is written at the top, so it won't affect you.
Experiment Task 2
1 assume cs:code 2 code segment 3 start: 4 mov ax,0b800h 5 mov ds,ax 6 mov bx,0f00h 7 mov dx,0403h 8 mov cx,80 9 10 s: mov ds:[bx],dx 11 inc bx 12 inc bx 13 loop s 14 mov ah,4ch 15 int 21h 16 17 code ends 18 19 end start
Run result:
Experiment Task Three:
1 assume cs:code 2 data1 segment 3 db 50, 48, 50, 50, 0, 48, 49, 0, 48, 49 ; ten numbers 4 data1 ends 5 6 data2 segment 7 db 0, 0, 0, 0, 47, 0, 0, 47, 0, 0 ; ten numbers 8 data2 ends 9 10 data3 segment 11 db 16 dup(0) 12 data3 ends 13 14 code segment 15 start: 16 mov ax,data1 17 mov ds,ax 18 mov ax,data2 19 mov es,ax 20 mov ax,data3 21 mov ss,ax 22 mov bx,0 23 mov cx,10 24 s: mov ax,ds:[bx] 25 add ax,es:[bx] 26 mov ss:[bx],ax 27 inc bx 28 loop s 29 30 mov ah,4ch 31 int 21h 32 code ends 33 end start

After adding, the memory of data segment data3 is shown as follows:
Experiment Task Four:
assume cs:code data1 segment dw 2, 0, 4, 9, 2, 0, 1, 9 data1 ends data2 segment dw 8 dup(?) data2 ends code segment start: mov ax,data1 mov ds,ax ;data1 Address to ds mov ax,data2 mov es,ax ;data2 Address to es mov bx,0 mov cx,8 ;Use default SS:SP address s1: mov ax,ds:[bx] push ax inc bx inc bx loop s1 mov cx,8 mov bx,0 s2: pop ax mov es:[bx],ax inc bx inc bx loop s2 mov ah, 4ch int 21h code ends end start
The results are as follows:

Experiment Task Five:
1 assume cs:code, ds:data 2 data segment 3 db 'Nuist' 4 db 2, 3, 4, 5, 6 5 data ends 6 7 code segment 8 start: 9 mov ax, data 10 mov ds, ax 11 12 mov ax, 0b800H 13 mov es, ax 14 15 mov cx, 5 16 mov si, 0 17 mov di, 0f00h 18 s: mov al, [si] 19 and al, 0dfh 20 mov es:[di], al 21 mov al, [5+si] 22 mov es:[di+1], al 23 inc si 24 add di, 2 25 loop s 26 27 mov ah, 4ch 28 int 21h 29 code ends 30 end start

The purpose of line19 is to transform from lowercase (uist) to uppercase (UIST)
The effect of line24 makes characters appear different colors
Experiment Task Six:
assume cs:code, ds:data data segment db 'Pink Floyd ' db 'JOAN Baez ' db 'NEIL Young ' db 'Joan Lennon ' data ends code segment start: mov ax, data mov ds, ax mov cx, 64;16 bytes in a row mov bx, 0 s: or [bx], byte ptr 20h inc bx loop s mov ah, 4ch int 21h code ends end start
Experimental results:
Uppercase:
A lowercase letter:
Experiment Task Seven:
1 assume cs:code, ds:data, es:table 2 3 data segment 4 db '1975', '1976', '1977', '1978', '1979' 5 dw 16, 22, 382, 1356, 2390 6 dw 3, 7, 9, 13, 28 7 data ends 8 9 table segment 10 db 5 dup( 16 dup(' ') ) 11 table ends 12 13 code segment 14 start: 15 mov ax,data 16 mov ds,ax 17 mov ax,table 18 mov es,ax 19 mov bx,0 20 mov si,0 21 mov cx,5 22 23 s1: mov ax,ds:[bx] 24 mov es:[si],ax 25 add bx,2 26 add si,2 27 mov ax,ds:[bx] 28 mov es:[si],ax 29 add bx,2 30 add si,14 31 loop s1 32 33 mov bx,20 34 mov si,5 35 mov cx,5 36 s2: mov ax,ds:[bx] 37 mov es:[si],ax 38 add si,2 39 mov word ptr es:[si],0 40 add bx,2 41 add si,14 42 loop s2 43 44 mov bx,30 45 mov cx,5 46 mov si,10 47 s3:mov ax,ds:[bx] 48 mov es:[si],ax 49 add bx,2 50 add si,16 51 loop s3 52 53 mov bx,20 54 mov di,30 55 mov cx,5 56 mov si,13 57 58 s4: mov ax,ds:[bx] 59 mov dx,0 60 div word ptr ds:[di] 61 mov es:[si],ax 62 add bx,2 63 add di,2 64 add si,16 65 loop s4 66 67 mov ah, 4ch 68 int 21h 69 70 code ends 71 end start
Experimental results:
Before running:
After running: