English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need the source code to add two 16 bit numbers with MASM assembler.

2007-02-19 20:51:10 · 2 answers · asked by Nikhil M 3 in Computers & Internet Programming & Design

2 answers

use ADD, and ADDC


CLR C ;clear carry bit
MOV A, NUM1LOW ;move low byte to A
ADD A, NUM2LOW ; add with other low byte
MOV ANSWERLOW, A ;save low byte answer
MOV A, NUM1HIGH ;move high byte to a
ADDC, A, NUM2HIGH ;add with carry the other high byte
MOV ANSWERHIGH, A ;save high byte answer

2007-02-20 02:27:24 · answer #1 · answered by justme 7 · 1 0

locate the 1st selection (x): - 15/x = 2 - x - 15 = - x² + 2x x² - 2x - 15 = 0 (x - 5)(x + 3) = 0 x - 5 = 0 x = 5 locate the 2d selection: x + 3 = 0 x = - 3 answer: The numbers are 5 and - 3. evidence (product is - 15) = 5 * - 3 = - 15 evidence (sum is two): = 5 - 3 = 2

2016-12-18 07:00:59 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers