发布网友 发布时间:2023-07-19 16:16
共2个回答
热心网友 时间:2024-12-01 07:53
JB是位转移指令,而JC是判进位标志CY的转移指令。JB=1,则转移,否则,顺序执行;JC=1,则转移,否则顺序执行。例如,JB P1.2,DELAY;当(P1.2)=1,则转移到DELAY,当(P1.2)=0时,顺序执行。热心网友 时间:2024-12-01 07:54
这两个是转移的指令,JB是小于转移而JC是有进位时转移。追答assume cs:code,ds:data
data segment
db "Beingner's All-purpose Symbolic Instruction Code",0
data ends
code segment
start:
mov ax,data
mov ds,ax
mov si,0
mov dh,8 ;行号
mov dl,3 ;列号
call letterc
mov ah,4ch
int 21h
letterc: ;若是字母则变成大写
mov al,ds:[si]
cmp al,'a'
ja continue
jmp next ;这句的思想
continue:
cmp al,'z'
jb ok
jmp next ;这句的思想
ok:
and byte ptr[si],11011111b
next:
inc si
mov ah,0
mov cx,ax
jcxz xxx
jmp letterc
xxx:
call show_str
show_str: ;显示字符串
mov di,0
mov ax,0
mov al,160
mul dh
mov bx,ax
mov ax,0
mov al,2
mul dl
add ax,bx
mov si,ax
mov ax,0b800h
mov es,ax
mov bl,00001000b
s:
mov cl,[di]
mov es:[si],cl
inc si
inc di
mov es:[si],bl
inc si
mov ch,0
jcxz finsh
jmp s
finsh:
ret
code ends
end start