⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jj2.asm

📁 C语言和汇编语言的相互调用实现一定运算功能
💻 ASM
字号:

	.mmregs             ; 将存储器影射寄存器存入符表
    .global _and
    .global _or
    .global _xor
    .global _not
    .global _function
	.global _d          ; 定义为外部变量
	.bss _d,1           ; 定义变量d
	.global _c
	.bss _c,1	
	.global _gvar          ;定义为外部变量
	.bss _gvar,1           ; 定义变量d
	.global _test_and          
	.bss _test_and,1
	.global _test_or          
	.bss _test_or,1           
	.global _test_xor          
	.bss _test_xor,1
	.global _test_not          
	.bss _test_not,1
	.global _test_function
	.bss _test_function,1	
	.text 
		

_and:
        AND *(_d),A
        nop
        nop
        nop
        nop
        stl A,*(_test_and)
        nop
        nop
        nop
        nop
        nop
        nop
        ret
_or:
        OR *(_d),A
        nop
        nop
        nop
        nop
        nop
        stl A,*(_test_or)
        nop
        nop
        nop
        nop
        nop
        nop
        ret
        
_xor:  
        XOR *(_d),A
        nop
        nop
        nop
        nop
        nop
        stl A,*(_test_xor)
        nop
        nop
        nop
        nop
        nop
        nop
        ret
                                                   
_not:  
       CMPL A
       nop
       nop
       nop
       nop
       nop
       stl A,*(_test_not)
       nop
       nop
       nop
        nop
        nop
        nop
        ret
_function:
       ADD A,*(_b)
       nop
       nop
       nop
       nop
       CMPL B
       nop
       nop
       nop
       nop
       AND  *(_c),A
       nop
       nop
       nop
       nop
       XOR A,B
       nop
       nop
       nop
       nop
       STL B,*(_test_function)
       nop
       nop
       nop
       nop
       nop
       nop
       ret

             
         
       .end                 ;结束程序
		

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -