masm problems! 
Author Message
 masm problems!

I have a big problem with masm puting in the wrong values during compile
time... example

        cli                                     ; turn off ints
        pop     bx                              ; have to get ret
        mov     ax,     _STACK                  ; from old stack
        mov     ss,     ax                      ; set up new stack
        mov     esp,    STACKSIZE               ; and new offset
        sti                                     ; turn on ints
        JMP16   _CODE16, $+4                    ; flush cs with rm seg
        mov     ax,     cs                      ; get cs into ax
        mov     ds,     ax                      ; and put it into ds
        mov     es,     ax                      ; and put it into ds
        push    bx                              ; put seg back on stack
        ret                                     ; return to previous seg

ok... jmp16 is a far jump to flush cs with new seg(I do it because I use
this prog in a return from pm and when first starting). Sometimes the
$+4 is the next intruction(right)... but sometimes its the next
instruction after the ret has finished(wrong)... It was working fine
until I got on to add something then it just when haywire.... any help
would be greatly apprieciated! I don't have a clue as to whats going on

Thu, 24 Dec 1998 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. MASM problem with hex values

2. MASM $ problem....

3. MASM problem

4. MASM problem

5. MASM problem on AMD K6-2 CPU

6. MASM problem on AMD K6-2 CPU

7. MASM problem

8. A MASM Problem

9. Masm problems

10. TASM to MASM problem

11. MASM problems in Win 2k.

12. Masm Problem


Powered by phpBB® Forum Software