<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 嵌入式系統 > 設計應用 > 匯編:統計輸入字符串內的數字個(gè)數(最多三位數0—256)

匯編:統計輸入字符串內的數字個(gè)數(最多三位數0—256)

作者: 時(shí)間:2016-12-01 來(lái)源:網(wǎng)絡(luò ) 收藏
;This is made by wq
;編程從鍵盤(pán)讀入不超過(guò)256個(gè)字符的字符串;
;編程統計其中數字的個(gè)數,并將結果在屏幕上輸出。
;經(jīng)進(jìn)一步完善(能輸出三位數啦)


DATAS SEGMENT
sum db 00h ;累加器
string db 256 dup(0dh);存放字符
tital db This program is made by wq.,0dh,0ah
db It is used to calculater the amout of the number in the string ,0dh,0ah,$
tital1 db PLease input the string: ,$
overs db Amout of the nember is : ,$
tital2 db Do you want to have a try again(if yes,input "y" else "n") : ,0dh,0ah, $
tital3 db Welcome to use this program again,$
kongzi db 0dh,0ah,$
result db 256 dup(?)
DATAS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS
START:
MOV AX,DATAS
MOV DS,AX

mov ax,offset tital;輸出抬頭
mov dx,ax
mov ah,09h
int 21h
main:
lea dx,kongzi
mov ah,09h
int 21h
lea dx,tital1 ;輸出抬頭1
mov ah,09h
int 21h

mov si,0
mov ax,offset string
mov dx,ax
again: ;輸入字符
mov ah,01h
int 21h
cmp al,0dh
jz then
mov string[si],al
inc si
jmp again ;輸入完畢
then: ;傳輸
mov di,0
mov si,0
mov bl,0
exchang: ;判斷字符的性質(zhì)
lea dx,string
cmp string[si],0dh
jz over
cmp string[si],30h
jnb next
inc si
dec cx
jmp exchang
next:
mov al,string[si]
cmp string[si],39h
jbe calculator
inc si
dec cx
jmp exchang

上一頁(yè) 1 2 下一頁(yè)

關(guān)鍵詞: 匯編統計輸入字符

評論


技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>