汇编程序19:二重循环
1 assume cs:code,ds:data,ss:stack 2 //指定数据段改为大写,形如[bx+si]型 3 data segment 4 db 'ibm ' 5 db 'dec ' 6 db 'dos ' 7 db 'vax ' 8 data ends 9 10 stack segment 11 dw 0,0,0,0,0,0,0,0 12 stack ends 13 14 code segment 15 start: 16 mov ax,data 17 mov ds,ax 18 mov ax,stack 19 mov ss,ax 20 mov sp,16 21 mov bx,0 22 mov cx,4 23 s: 24 push cx 25 mov si,0 26 mov cx,3 27 s0: 28 mov al,[bx+si] 29 and al,11011111b 30 mov [bx+si],al 31 inc si 32 loop s0 33 34 add bx,16 35 pop cx 36 loop s 37 mov ax,4c00h 38 int 21h 39 code ends 40 41 end start