汇编程序9:循环计算123*236
1 assume cs:code 2 3 code segment 4 5 mov ax,0 //结果初始化为0 6 mov cx,123 //循环次数初始化 7 s:add ax,236 //循环标志s 8 loop s //为否则跳到s 9 10 mov ax,4c00H 11 int 21H 12 13 code ends 14 15 end
1 assume cs:code 2 3 code segment 4 5 mov ax,0 //结果初始化为0 6 mov cx,123 //循环次数初始化 7 s:add ax,236 //循环标志s 8 loop s //为否则跳到s 9 10 mov ax,4c00H 11 int 21H 12 13 code ends 14 15 end