12.asm

来自「华工电信系汇编习题的编程实现」· 汇编 代码 · 共 41 行

ASM
41 行
字号
stack segment stack 'stack'
      dw 32 dup(?)
stack ends

data segment 
     A dd 01010108H
     B dd ?
data ends

code segment 
begin proc far
      assume ss:stack,cs:code,ds:data
      push ds
      sub ax,ax
      push ax
      mov ax,data
      mov ds,ax

      mov al,byte ptr A + 3
      xor al,0F0H
      JS  ZHENG
      mov ax,word ptr A
      not ax
      mov word ptr B,ax 
      mov ax,word ptr A + 2
      not ax
      add ax,1
      mov word ptr B + 2,ax
      JMP MYEND
ZHENG:
      mov ax,word ptr A
      mov word ptr B,ax
      mov ax,word ptr A + 2
      mov word ptr B + 2,ax

MYEND:
      ret
begin   endp
code    ends
      end begin

⌨️ 快捷键说明

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