DATAS SEGMENT w dw 0 keybuf db 255 db 0 db 255 dup(0) ;定義鍵盤輸入需要的緩沖區(qū) DATAS ENDS STACKS SEGMENT db 200 dup(?) STACKS ENDS CODES SEGMENT ASSUME CS:CODES,DS:DATAS,SS:STACKS START: MOV AX,DATAS MOV DS,AX mov dx,offset keybuf ;用0a號功能,輸入一個字符串 mov ah,0ah ;用回車結(jié)束 int 21h mov dl,0ah ;再進行換行,以便在下一行顯示轉(zhuǎn)換后的字符串 mov ah,2 int 21h ; push ax ; push dx ; mov dl,cl ; mov ah,02 ; int 21h ; pop dx ; pop ax mov bx,offset keybuf+1 ;取出字符串的字符個數(shù),作為循環(huán)的次數(shù) mov cl,[bx] mov ch,0 mov ax,0 again: inc bx mov ax,[w] push bx mov bx,16 mul bx pop bx ;是小寫字母,則轉(zhuǎn)換為大寫字母 mov [w],ax mov dl,[bx] ;取出一個字符, cmp dl,'9' jbe lab1 cmp dl,'F' jbe lab2 sub dl,32 lab2: sub dl ,07h lab1: sub dl,30h add [w],dx loop again mov ax,[w] mov bx,-1 push bx mov bx,10 lab3 :mov dx,0 div bx push dx cmp ax,0 jnz lab3 lab5: pop dx cmp dx,-1 jz lab4 add dl,30h mov ah,02 int 21h jmp lab5 ;循環(huán),處理完整個字符串 lab4: MOV AH,4CH INT 21H CODES ENDS END START
標簽: 匯編
上傳時間: 2015-04-02
上傳用戶:wcc0310
斯坦福大學機器學習英文講義,Andrew ng 大神所寫。
標簽: 機器學習
上傳時間: 2015-11-23
上傳用戶:384670111
放墨香商業(yè)版本, 巨陵-蠻牛掉元寶,願意打的就是高手 開放包袱商人會帶備稀而物品給各位大俠購買 本服轉(zhuǎn)身請登入官網(wǎng)轉(zhuǎn)身 本服遊戲幣個人上限是40億 如果帶多了 轉(zhuǎn)圖重登都會變回40億 全球最強防外掛系統(tǒng),打造2016年最公平的墨湘 本服承諾,絕無任何嚴重bug,保證遊戲穩(wěn)定運行 本服禁止空白名,定期自動清理帶空名的玩家
標簽: 墨香
上傳時間: 2016-04-11
上傳用戶:西子灣灣
msp430The LDC1312 and LDC1314 are 2- and 4-channel, 1? Easy-to-use – minimal configuration required 12-bit inductance to digital converters (LDCs) for ? Measure up to 4 sensors with one IC inductive sensing solutions. With multiple channels ? Multiple channels support environmental and and support for remote sensing, the LDC1312 and aging compensation LDC1314 enable the performance and reliability benefits of inductive sensing to be realized at minimal? Multi-channel remote sensing provides lowest cost and power. The products are easy to use, onlysystem cost requiring that the sensor frequency be within 1 kHz ? Pin-compatible medium and high-resolution and 10 MHz to begin sensing. The wide 1 kHz to 10 options MHz sensor frequency range also enables use of very small PCB coils, further reducing sensing– LDC1312/4: 2/4-ch 12-bit LDC solution cost and size.– LDC1612/4: 2/4-ch 28
上傳時間: 2016-07-22
上傳用戶:tongmoonsky
#include "string.h" #include "ctype.h" #include "stdio.h" search(char pd[]) {FILE *fp; int time=0,i=0,j=0,add[80],k=0,m; char *ch, str[900]; m=strlen(pd); if((fp=fopen("haha.txt","r"))==NULL) { printf("Cannot open this file\n"); exit(0); } for(;!feof(fp);i++) { str[i]=fgetc(fp); if(tolower(str[i])==tolower(pd[k])) {k++; if(k==m) if(!isalpha(i-m)&&!isalpha((str[i++]=fgetc(fp)))) { time++; add[j]=i-m+1; j++; k=0; } else k=0; } } if(time) { printf("The time is:%d\n",time); printf("The adders is:\n"); for(i=0;i
標簽: 查詢學會少年宮
上傳時間: 2016-12-29
上傳用戶:767483511
#include "string.h" #include "ctype.h" #include "stdio.h" search(char pd[]) {FILE *fp; int time=0,i=0,j=0,add[80],k=0,m; char *ch, str[900]; m=strlen(pd); if((fp=fopen("haha.txt","r"))==NULL) { printf("Cannot open this file\n"); exit(0); } for(;!feof(fp);i++) { str[i]=fgetc(fp); if(tolower(str[i])==tolower(pd[k])) {k++; if(k==m) if(!isalpha(i-m)&&!isalpha((str[i++]=fgetc(fp)))) { time++; add[j]=i-m+1; j++; k=0; } else k=0; } } if(time) { printf("The time is:%d\n",time); printf("The adders is:\n"); for(i=0;i<j;i++) printf("%5d",add[i]); if(i%5==0) printf("\n"); getch(); fclose(fp); } else printf("Sorry!Cannot find the word(^_^)"); } main() { char pd[10],choose='y'; int flag=1; while(flag) {printf("In put the word you want to seqarch:"); scanf("%s",pd); search(strlwr(pd)); printf("\nWould you want to continue?(Y/N):"); getchar(); scanf("%c",&choose); if((tolower(choose))=='n') flag=0; else flag=1; } printf("Thanks for your using!Bye-bye!\n"); getch(); }
標簽: 學生專用
上傳時間: 2016-12-29
上傳用戶:767483511
遺傳算法,已調(diào)試,zhu shi fei chang qing chu
標簽: tiaoshiguo 算法
上傳時間: 2017-05-01
上傳用戶:caoge
notepad2_4.2.25漢化資源文件 CSDN-tags:notepad2 sChinese 中文rc資源 Notepad2中文資源修改自: http://www.flos-freeware.ch/zip/notepad2_4.2.25_src.zip\src\Notepad2.rc
上傳時間: 2018-09-08
上傳用戶:xxagri
#include <stdio.h> #include <stdlib.h> #define SMAX 100 typedef struct SPNode { int i,j,v; }SPNode; struct sparmatrix { int rows,cols,terms; SPNode data [SMAX]; }; sparmatrix CreateSparmatrix() { sparmatrix A; printf("\n\t\t請輸入稀疏矩陣的行數(shù),列數(shù)和非零元素個數(shù)(用逗號隔開):"); scanf("%d,%d,%d",&A.cols,&A.terms); for(int n=0;n<=A.terms-1;n++) { printf("\n\t\t輸入非零元素值(格式:行號,列號,值):"); scanf("%d,%d,%d",&A.data[n].i,&A.data[n].j,&A.data[n].v); } return A; } void ShowSparmatrix(sparmatrix A) { int k; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { k=0; for(int n=0;n<=A.terms-1;n++) { if((A.data[n].i-1==x)&&(A.data[n].j-1==y)) { printf("%8d",A.data[n].v); k=1; } } if(k==0) printf("%8d",k); } printf("\n\t\t"); } } void sumsparmatrix(sparmatrix A) { SPNode *p; p=(SPNode*)malloc(sizeof(SPNode)); p->v=0; int k; k=0; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { for(int n=0;n<=A.terms;n++) { if((A.data[n].i==x)&&(A.data[n].j==y)&&(x==y)) { p->v=p->v+A.data[n].v; k=1; } } } printf("\n\t\t"); } if(k==1) printf("\n\t\t對角線元素的和::%d\n",p->v); else printf("\n\t\t對角線元素的和為::0"); } int main() { int ch=1,choice; struct sparmatrix A; A.terms=0; while(ch) { printf("\n"); printf("\n\t\t 稀疏矩陣的三元組系統(tǒng) "); printf("\n\t\t*********************************"); printf("\n\t\t 1------------創(chuàng)建 "); printf("\n\t\t 2------------顯示 "); printf("\n\t\t 3------------求對角線元素和"); printf("\n\t\t 4------------返回 "); printf("\n\t\t*********************************"); printf("\n\t\t請選擇菜單號(0-3):"); scanf("%d",&choice); switch(choice) { case 1: A=CreateSparmatrix(); break; case 2: ShowSparmatrix(A); break; case 3: SumSparmatrix(A); break; default: system("cls"); printf("\n\t\t輸入錯誤!請重新輸入!\n"); break; } if (choice==1||choice==2||choice==3) { printf("\n\t\t"); system("pause"); system("cls"); } else system("cls"); } }
上傳時間: 2020-06-11
上傳用戶:ccccy
道路車輛——電氣及電子設(shè)備的環(huán)境條件和試驗
上傳時間: 2021-10-25
上傳用戶:
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1