问:算术和逻辑指令 x86
Q: arithmetic and logic instructions x86
我是汇编语言 x86 的新手。我确实学过汇编语言的基础知识,但在算术和逻辑指令方面仍然存在一些问题,因为这道题,我使用MASM汇编器
Q) Given a 64-bit word stored at address N1
a- Declare the variable
b- Increment the value of N1
c- Negate the value of N1
我首先想到的是如何声明变量N1?
是这样吗?还是我做错了?
N1 DW 4 Dup ?
如果有人能帮助我解决这个问题,我将不胜感激。
Q) Given a 64-bit word stored at address N1
地址可以这样设置EQU
N1 equ 00007c00h
a- Declare the variable
首先,用ORG
指令设置变量的偏移量,然后用DQ
声明它,这意味着QuadWord(64bit)。
.data
org N1
var1 DQ 0
b- Increment the value of N1
在 .code
部分使用
inc var1
c- Negate the value of N1
之后,还是在.code
部分,使用
neg var1
就是这样。
我是汇编语言 x86 的新手。我确实学过汇编语言的基础知识,但在算术和逻辑指令方面仍然存在一些问题,因为这道题,我使用MASM汇编器
Q) Given a 64-bit word stored at address N1
a- Declare the variable
b- Increment the value of N1
c- Negate the value of N1
我首先想到的是如何声明变量N1? 是这样吗?还是我做错了?
N1 DW 4 Dup ?
如果有人能帮助我解决这个问题,我将不胜感激。
Q) Given a 64-bit word stored at address N1
地址可以这样设置EQU
N1 equ 00007c00h
a- Declare the variable
首先,用ORG
指令设置变量的偏移量,然后用DQ
声明它,这意味着QuadWord(64bit)。
.data
org N1
var1 DQ 0
b- Increment the value of N1
在 .code
部分使用
inc var1
c- Negate the value of N1
之后,还是在.code
部分,使用
neg var1
就是这样。