1 / 4

第4章习题参考答案: 2、取 SIZE 属性 A1——2 字节(4) A2——3 字节(6) A3——20 字节(40) A4——4 字节(60) 4、 L=6

第4章习题参考答案: 2、取 SIZE 属性 A1——2 字节(4) A2——3 字节(6) A3——20 字节(40) A4——4 字节(60) 4、 L=6 5、 PLENTH=22, 可用于确定循环次数。 7、 ( AX)=1 ( BX)=20 ( CX)=1. ; P168 exercise 4_6 Data segment dat db 5 list dw -1,0,8,12,5,5 dup (?) max dw ? min dw ? data ends

dee
Download Presentation

第4章习题参考答案: 2、取 SIZE 属性 A1——2 字节(4) A2——3 字节(6) A3——20 字节(40) A4——4 字节(60) 4、 L=6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第4章习题参考答案: 2、取SIZE属性 A1——2字节(4) A2——3字节(6) A3——20字节(40) A4——4字节(60) 4、 L=6 5、 PLENTH=22,可用于确定循环次数。 7、 (AX)=1 (BX)=20 (CX)=1

  2. ;P168 exercise 4_6 Data segment dat db 5 list dw -1,0,8,12,5,5 dup (?) max dw ? min dw ? data ends stack segment stack dw 100 dup(?) Stack ends code segment assume cs:code,ds:data,ss:stack start: mov ax,data mov ds,ax mov bx,offset list mov cx,4 mov ax,[bx] mov max,ax mov min,ax chk: add bx,2 mov ax,[bx] cmp ax,max jle next1 mov max,ax next1: cmp ax,min jge next2 mov min,ax next2: loop chk mov ah,4ch int 21h code ends end start

  3. 第5章习题参考答案: ;P214 exercise 5_8 data segment buff dw 10,10 dup(?) data ends stack segment stack dw 100 dup(?) stack ends code segment assume cs:code,es:data,ss:stack start: mov ax,data mov es,ax lea si,buff mov cx,es:[si] add si,2 mov di,si again: mov ax,es:[si] and ax,ax jz next mov es:[di],ax add di,2 next: add si,2 loop again sub si,di mov cx,si mov al,0 rep stosb ;(es:di)<---(al) mov ah,4ch int 21h code ends end start

  4. ;P214 exercise 5_12 data segment array db 1,2,3,4,-1,-2,-3,-4 n equ $-array positive db 10h dup(?) negative db 10h dup(?) data ends stack segment stack dw 100 dup(?) stack ends code segment assume cs:code,ds:data,ss:stack start: mov ax,data mov ds,ax mov bx,offset array mov si,offset positive mov di,offset negative mov cx,n mov dx,0 again: mov al,[bx] test al,80h jz posi inc dl mov [di],al inc di jmp next posi: inc dh mov [si],al inc si next: inc bx loop again mov ah,4ch int 21h code ends end start

More Related