求匯編輸入兩數(shù)輸出兩數(shù)相加的算式及結果?
DATASEGMENTDAT1DB'Inputa:','$'DAT2DB'Inputb:','$'DAT3DB'a-b=','$'DATAENDSCODESEGMENTASSUMECS:CODE,DS:DATASTART:MOVAX,DATAMOVDS,AXMOVDX,OFFSETDAT1;顯示DAT1信息MOVAH,09HINT21HMOVAH,1;1號調(diào)用輸入數(shù)值AINT21HMOVBL,AL;將輸入a放入BLMOVDL,0DH;輸出回車MOVAH,2INT21HMOVDL,0AH;輸出換行MOVAH,2INT21HMOVDX,OFFSETDAT2;顯示DAT2信息MOVAH,09HINT21HMOVAH,1;1號調(diào)用輸入數(shù)值BINT21HMOVCL,AL;將輸入a放入CLSUBBL,CL;計算a-b的結果,放在bl內(nèi)ADDBL,30H;變成ASCII碼MOVDL,0DH;輸出回車MOVAH,2INT21HMOVDL,0AH;輸出換行MOVAH,2INT21HMOVDX,OFFSETDAT3;顯示輸入a-b=MOVAH,09HINT21HMOVDL,BL;將要顯示的結果放入dl,放入的是結果的ASCIIMOVAH,2;2號調(diào)用,顯示結果INT21HMOVAH,4CHINT21HCODEENDSENDSTART