News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ERROR

Started by Damien21, February 25, 2005, 11:01:29 PM

Previous topic - Next topic

Damien21

HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I'm a new assembly language programmer... all taught from various books (Jeff Duntenmann's Assembly Language: Step by Step and Peter Abel's Introduction to IBM PC Assembly Language and Programming. I downloaded MASM32 v 8.2 since I couldn't download any other version of MASM from Microsoft. I typed in a simple (and yes... stupid) program... the ever droll Hi World. I assembled it and it produced the OBJ file... when i chose to link obj to form exe i got this:
HW.obj : fatal error LNK1190 : invalid fixup found, type 0x0001[/b]
:dazzled: WHAT DOES THIS ALL MEAN and HOW DO I FIX IT? :dazzled:

PS: here's the code (to eventually be written as a .COM file)

.MODEL SMALL
     .CODE
     ORG 100H
     PROMPT1   DB  "This is my first program", 01H, 02H, "$"
     PROMPT2   DB  "HELLO WORLD...I wrote this COM file using Assembly Language","$"
     WMSG       DB  "STRIKE ANY KEY TO CONTINUE","$"
START PROC NEAR
          JMP DISP1           ;CALL DISP1
          JMP DISP2           ;CALL DISP2
          JMP W4ME          ;CALL W4ME
          MOV AX,4C00H    ; LOAD FUNCTION 4CH
          INT 21H             ; AND RETURN TO OPERATING SYSTEM
START ENDP

DISP1:
          MOV AH,09H        ;DISPLAY STRING
          LEA DX,PROMPT1 ; LOAD ADDRESS OF PROMPT1 TO DX
          INT 21H              ; DISPLAY PROMPT1 STRING
          RET                    ; RETURN
DISP2:
          MOV AH,09H
          LEA DX,PROMPT2
          INT 21H
          MOV CX,03          ;CX = 3 FOR NEXT JMP
          RET
W4ME:                           ; THIS LABEL DOES THE SAME THING AS A PAUSE IN A BATCH FILE
          MOV AH,09H         ;DISPLAY STRING
          LEA DX,WMSG       ;LOAD ADDRESS
          INT 21H
          MOV AH,08H         ;KEYBOARD INPUT WITHOUT ECHO
          INT 21H               
          LOOP W4ME         ;LOOP DECREMENTS CX AND JUMPS BACK UNTIL CX=0... IN THIS CASE LOOP 3 TIMES
          RET

END                              ;TELLS ASSEMBLER THERE IS NO MORE


hutch--

Easy,

Write windows 32 bit code with MASM32 or learn how to build the DOS COM file that you have posted in here. For 32 bit windows code, look in the example code in MASM32 and the tutorial, for DOS code get an old linker and google the internet for interrupts and the like. Let us know what you are trying to learn as we can help you with 32 bit Windows code.

The books you are trying to learn from are old DOS based software and are out of date.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php