billfilm 发表于 2005-9-24 17:16

[求助]各位大侠``有急事相求

<P>本人有题编程题不会做啊 ``本人是新手`
应该很简单``题目:
</P>
<P ><FONT face="Times New Roman">1</FONT>、编写程序,计算(<FONT face="Times New Roman">X+Y</FONT>)<FONT face="Times New Roman">-2*</FONT>(<FONT face="Times New Roman">X  AND  Y</FONT>)&reg;<FONT face="Times New Roman">S</FONT>,<FONT face="Times New Roman">X</FONT>,<FONT face="Times New Roman">Y</FONT>,<FONT face="Times New Roman">S</FONT>均为无符号的<FONT face="Times New Roman">16</FONT>位二进制数。(运算不考虑加法的溢出)
<p></p></P>

wufengcxp 发表于 2008-1-28 14:43

mov ax,x
and ax,y
mul 2
mov bx,dx
mov cx,ax
mov ax,x
add ax,y
cwd
sub ax,cx
sbb dx,bx

页: [1]

编程论坛