Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
x が、その値が不明なレジスターであるとしましょう。私はx=2a+3b場所を作らなければならず、未知の値を持っていますa。b
x=2a+3b
a
b
8086のasm 命令のみを使用できmovます。命令の使用は許可されておらず、4 命令のみの制限もあります。addsubnegmul
mov
add
sub
neg
mul
それは可能ですか?
式を次のように書き直します。
2a + 3b = 2(a + b) + b = (a + b) + (a + b) + b
一度だけ値を計算する必要があることに注意してください(a + b)。
(a + b)