Announcement

Collapse
No announcement yet.

Why am I getting this error???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why am I getting this error???

    This OBJ file is compiled with MASM 6.14's ML.EXE & LINK.EXE

    Code:
    .model small, pascal, os_dos
    
    include stack.inc
    
    .data
    extrn pbvHost:sword 'this causes an "Invalid Fixup" error when I try
                        'compile my main programs. How to resolve it???
                        'In fact, I was getting the same error no matter
                        'WHAT I put in the DATA segment!
    
    .code
    
    
    IsMultitasker PROC FAR PUBLIC
    
    IFlag equ <[bp + 06h]>
    
    Params = 2
    
    PushStack
    
    mov ax, pbvHost
    mov cl, 8
    shr ax, cl
    and ax, 1
    mov bx, IFlag
    or bx, bx
    jz P1A
    xor ax, 1
    P1A:
    neg ax
    
    PopStack
    
    retf Params
    
    IsMultitasker endp
    
    end

    ------------------


    [This message has been edited by Clay Clear (edited April 02, 2003).]

  • #2
    Error 514: Invalid fixup

    You tried to $LINK an .OBJ file which contains an invalid fixup
    requirement. For example, while it is legal to define initialized
    data in the 'DATA' segment (or one equated with $ALIAS), it must
    contain only static constants (numbers or characters). It may not
    include any "pointers" which reference a code or data label, thus
    requiring a link-time "fixup". Such pointers may only appear in
    a segment other than 'DATA.
    pbvHost is not a static constant.

    MCM


    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      MCM,

      Yeah, I read that part MANY hours ago, and I also know that
      pbvHost is not static. HOWEVER, the docs also say, in order to use
      the internal variables in object modules, to declare them as
      EXTRN in the DATA segment. I also tried putting the EXTRN
      directive in (1) right after the start of the CODE segment (2)
      in the procedure itself. I got the same error, both times. And the
      docs do say that if the declared involves a non-static whatever,
      to put it in a segment other than the DATA one. I've had no success
      with this stuff, on ANY of the vars I tried to use, no matter
      where I've placed them.

      Hmmmm...I just realized something - the sample ASM that came with
      the MASM 6.14 does NOT show anything ENDing the DATA segment -
      all it has is the start of the CODE segement immediately following
      the start of the DATA segment, after the DATA segment declares its
      vars.

      OK, on to check into that. <sigh> Sleep? What dat? <grin>


      ------------------

      Comment


      • #4
        Code:
        .model small
        I am not an assembly language guy but I though all PB/DOS required large or big or huge or something like that (full 32-bit segment ffset addresses).

        MCM

        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Thanks, Michael! I do believe that you are correct! I'll immediately
          go and perview my printed PB/DOS manuals to find out.


          ------------------

          Comment


          • #6
            GOT IT! I finally went into my QuickPak Pro source folder and
            loaded the QPP main OBJ include file into an editor. THERE I saw
            how Barry had defined the DATA and CODE segment names. (sorry Barry,
            I plagiarized your idea ). Turns out that the version of MASM
            I am using gives the DATA segment an odd name. $ALIAS did not
            seem to work around it (although I was probably using the totally
            wrong moniker for the alias). So, I used Barry's example in his main
            INC file and added it to my main INC file. Now, everything's peachy keen!
            ON TO PILLAGE!


            ------------------

            Comment


            • #7
              see also my note in the following thread:
              http://www.powerbasic.com/support/pb...read.php?t=700


              ------------------

              Comment


              • #8
                Jose,

                Thank you for your interest. However, I have sucessfully used,
                with my current MASM 6.14, directives. I use, in my two currently
                completed and successful OBJ files:

                .model small, pascal, os_dos
                .386
                .dosseg
                .stack

                Haven't had ANY problem with my PB/DOS 3.5 programs being able to use the
                OBJ files, either!


                ------------------

                Comment

                Working...
                X