ZKX's LAB

急急急!微机原理汇编语言求原程序,题目如下: 微机原理汇编语言程序作业

2021-04-07知识12

在线急求答案!!!微机原理与汇编语言程序设计方面的。 调试时需要把中文标点符号改为英文标点符号,否则会出现OUT OF MEMORY的提示信息DATA SEGMENT;定义数据段ADR DB 10,-31,-45,67,80,46,0,-31,0,77NUM EQU$-ADR;NUM是数据个数DA1 DB 0;DA1用来存放正数的个数,初值为0DA2 DB 0;DA2用来存放负数的个数,初值为0DA3 DB 0;DA3用来存放0的个数,初值为0DATA ENDSCODE SEGMENT;定义代码段ASSUME DS:DATA,CS:CODESTART:MOV AX,DATA;数据段地址装入MOV DS,AXLEA SI,ADRMOV CX,NUMMOV AL,0;AL清零DON1:MOV AL,[SI]CMP AL,0JGE DON2INC DA2JMP END0DON2:CMP AL,0JZ DON3INC DA1JMP END0DON3:INC DA3END0:INC SIDEC CXJNZ DON1MOV AH,4CHINT 21HCODE ENDSEND START

微机原理汇编语言的程序 调试时需要把中文标点符号改为英文标点符号,否则会出现OUT OF MEMORY的提示信息DATA SEGMENT;定义数据段ADR DB 10,-31,-45,67,80,46,0,-31,0,77NUM EQU$-ADR;NUM是数据个数DA1 DB 0;DA1用来存放正数的个数,初值为0DA2 DB 0;DA2用来存放负数的个数,初值为0DA3 DB 0;DA3用来存放0的个数,初值为0DATA ENDSCODE SEGMENT;定义代码段ASSUME DS:DATA,CS:CODESTART:MOV AX,DATA;数据段地址装入MOV DS,AXLEA SI,ADRMOV CX,NUMMOV AL,0;AL清零DON1:MOV AL,[SI]CMP AL,0JGE DON2INC DA2JMP END0DON2:CMP AL,0JZ DON3INC DA1JMP END0DON3:INC DA3END0:INC SIDEC CXJNZ DON1MOV AH,4CHINT 21HCODE ENDSEND START

急急急!微机原理汇编语言求原程序,题目如下: CODE SEGMENTASSUME CS:CODEBUFF DB 100 DUP?X DW 0Y DW 0Z DW 0START:PUSH CSPOP DSPUSH CSPOP ESLEA DI,BUFFMOV AL,1MOV CX,100CLD1:STOSBINC ALLOOP@1LEA SI,BUFFMOV CX,100CLD2:LODSBCBWADD X,AXLOOP@2MOV AX,XMOV BX,10CALL DSPAXLEA SI,BUFFMOV CX,100CLD3:LODSBCBWMOV BX,AXCALL FCMP AX,0JE@4INC WORD PTR YADD Z,BX4:LOOP@3MOV AX,YMOV BX,10CALL DSPAXMOV AX,YMOV BX,2CALL DSPAXMOV AH,4CHINT 21H要判断的数放入ax中ax返回1时表示是素数ax返回0时表示是合数F PROC NEARPUSH BXPUSH DXJMP F1X DW?X2 DW?F1:CMP AX,1JZ F2CMP AX,2JZ F11CMP AX,3JZ F11MOV@X,AXSHR AX,1MOV@X2,AXMOV BX,2FLP:MOV DX,0MOV AX,@XDIV BXCMP DX,0JZ F2INC BXCMP BX,@X2JBE FLPF11:MOV AX,1POP DXPOP BXRETF2:MOV AX,0POP DXPOP BXRETF ENDPDSPAX PROC NEARPUSH AXPUSH BXPUSH CXPUSH DXPUSHFXOR CX,CXMOV BX,2DSPAX1:XOR DX,DXDIV BXINC CXOR DX,30HPUSH DXCMP AX,0JNE@DSPAX1MOV AH,2DISPAX2:POP DXINT 21HLOOP@DISPAX2MOV DL,32INT 21HPOPFPOP DXPOP CXPOP 。

#微机原理与汇编语言程序设计#微机原理汇编语言程序作业#微机原理和汇编语言课程心得#微机原理与汇编语言

随机阅读

qrcode
访问手机版