-3

I have a problem with this assembly program:

.model small
.code
start : 
mov ax , [1100h] 
mov bx , [1101h]
add ax , bx 
JS Negative 
JZ Nul 
mov [2000h] , ax 
JMP fin
Negative : 
mov [3000h] , ax
JMP fin
Nul :
mov bx , ax
JMP fin 
fin :
mov ax , 4c00h
int 21h
end start

please describe the problem you have with the code
once done that, delete these (bold) comments

Sep Roland
  • 26,423
  • 5
  • 40
  • 66
Load Jin
  • 9
  • 1
  • `[1100h]` and `[1101h]` are only one byte apart, so your 16-bit loads overlap. Are you sure that's what you want? The sign bit of the 16-bit sum will potentially depend on all 3 bytes from 1100h to 1102h. – Peter Cordes May 14 '22 at 12:59
  • After some research , I found that the instruction should be like this : [ DS : 1100h ] and [ DS : 1101h ] – Load Jin May 14 '22 at 13:04
  • Oh right, that's MASM-style syntax which is stupid about brackets on numbers. [Confusing brackets in MASM32](https://stackoverflow.com/q/25129743) – Peter Cordes May 14 '22 at 13:17

0 Answers0