Hi. I have this example for an lab and I don't understand what's happening. Especially what MEM32[0] means...

DATA SEGMENT
MEM32 DD 316423
DATA ENDS
CODE SEGMENT
… …
MOV AX, 43981
SUB DX, DX ;load dx ax 43981
ADD AX, WORD PTR MEM32[0] ;add inf. word
ADC DX, WORD PTR MEM32[2] ;add sup. word 316423
; --------
;result in dx,ax 360404
… …
CODE ENDS
MEM32 DD 316423                        ;reserves 4 bytes of memory for the number 316423
MOV AX, 43981                          ;loads the least significant bits of 43981 into ax
                                       ;and since 43981 < 65535, that means all of it
SUB DX, DX                             ;make sure dx = 0, so that all 32 bits of dx:ax now
                                       ;hold the number 43981
ADD AX, WORD PTR MEM32[0]              ;add the least significant word of 43981
                                       ;to the least gignificant two bytes of the number
                                       ;held in MEM32. Any carry from the addition will
                                       ;go into the carry flag.
ADC DX, WORD PTR MEM32[2]              ;add the carry from the previous "column" and
                                       ;the most significant word of 43981 to the most
                                       ;significant word of 316423
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.