自己做的程序

源代码在线查看: add.asm

软件大小: 2 K
上传用户: fsweb
关键词: 程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				DATAREA   SEGMENT
				  X      DB    38H
				  Y      DB    21H
				  RS     DB    0
				DATAREA   ENDS
				CODE     SEGMENT 
				ASSUME   CS:CODE,DS:DATAREA
				START:MOV AX,DATAREA
				MOV DS,AX
				MOV AL,X
				ADD AL,Y
				MOV RS,AL
				
				MOV AL,X
				MOV CL,4
				SHR AL,CL
				ADD AL,30H
				MOV DL,AL
				CMP DL,39H
				JLE P1
				ADD DL,07H
				P1:   MOV  AH,02H
				INT 21H
				MOV DL,X
				AND DL,0FH
				ADD DL,30H
				CMP DL,39H
				JLE P2
				ADD DL,07H
				P2:   INT 21H
				
				MOV DL,'+'
				INT 21H
				
				MOV AL,Y
				MOV CL,4
				SHR AL,CL
				ADD AL,30H
				MOV DL,AL
				CMP DL,39H
				JLE P3
				ADD DL,07H
				P3:   MOV  AH,02H
				INT 21H
				MOV DL,Y
				AND DL,0FH
				ADD DL,30H
				CMP DL,39H
				JLE P4
				ADD DL,07H
				P4:   INT 21H
				
				 
				
				MOV DL,'='
				INT 21H
				
				MOV AL,RS
				MOV CL,4
				SHR AL,CL
				ADD AL,30H
				MOV DL,AL
				CMP DL,39H
				JLE P5
				ADD DL,07H
				P5:   MOV  AH,02H
				INT 21H
				MOV DL,RS
				AND DL,0FH
				ADD DL,30H
				CMP DL,39H
				JLE P6
				ADD DL,07H
				P6:   INT 21H
				
				 
				
				MOV AH,4CH
				INT 21H
				code   ends
				       end   START
							

相关资源