AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > 汇编语言

汇编源码--CALC

51自学网 http://www.wanshiok.com
	       PAGE    ,132	       TITLE   CALCCGROUP	       GROUP   CODESEGCODESEG        SEGMENT PARA PUBLIC 'CODE'	       ASSUME  CS:CGROUP,DS:CGROUP,ES:CGROUP	       PUBLIC  CALC	       ORG     100HCALC	       PROC    FAR	       JMP     START;---------------------------------------------------------------------;;								      ;;			     DATA AREA				      ;;								      ;;---------------------------------------------------------------------;	       DB      'INTERRUPT NUMBER ='INT_NUMBER     DB      61hSCREEN_HANDLE  DW      0001hMESSAGE        DB      'PEMATH is not resident',13,10MESSAGE_LEN    EQU     $-MESSAGETAG	       DB      'PEMATH'TAG_LEN        EQU     $-TAG;---------------------------------------------------------------------;;								      ;;			     CODE AREA				      ;;								      ;;---------------------------------------------------------------------;START:;---------------------------------------------------------------------;;    TEST FOR PRESENCE OF CALCULATOR				      ;;---------------------------------------------------------------------;	       SUB     AX,AX	       MOV     ES,AX	       SUB     BH,BH	       MOV     BL,INT_NUMBER	       SHL     BX,1	       SHL     BX,1	       MOV     DI,ES:[BX]	       MOV     ES,ES:[BX+2]	       ADD     DI,4	       LEA     SI,TAG	       MOV     CX,TAG_LEN	 REPE  CMPSB	       JE      CALL_CALC	       MOV     BX,SCREEN_HANDLE	       MOV     CX,MESSAGE_LEN	       LEA     DX,MESSAGE	       MOV     AH,40h	       INT     21h	       JMP     SHORT CALC_EXIT;---------------------------------------------------------------------;;    CALL CALCULATOR						      ;;---------------------------------------------------------------------;CALL_CALC:	       MOV     AL,INT_NUMBER	       MOV     BYTE PTR INT_CODE,AL	       DB      0CDh	  ; INTINT_CODE:	       DB      00h	       NOP	       NOPCALC_EXIT:	       INT     20hCALC	       ENDPCODESEG        ENDS	       END     CALC

 

 

 
上一篇:汇编源码--CLEAN  下一篇:汇编源码--BURNOUT