IBM PC Assembly Language help

Hello everyone I hope you are able to help me with a problem I am having during linking of my program:

I am getting errors for this part of my code:

EXTRN GetDec:NEAR, PutHex:NEAR

Or any parts like that. The errors are:

dectohex.obj(dectohex.asm) : error L2029: 'PutHex' : unresolved external
dectohex.obj(dectohex.asm) : error L2029: 'GetDec' : unresolved external

I do not understand how this is happening. As far as I am concerned I have all the files required. I cannot run any of my programs. Any thoughts? Here is the short program from a book I am tryin to run:

INCLUDE PCMAC.INC
;;Enable use of the Macros for I/O
CR EQU 13
LF EQU 10
.MODEL SMALL
.586
.STACK 200h ;stack declaration
.DATA ;Data segment, data declarations
Prompt DB 'Enter decimal number: ', 13, 10, '$'
OutMsg DB 'The hex equivalent is: ', 13, 10, '$'
SaveAX DW ?

.CODE
EXTRN GetDec:NEAR, PutHex:NEAR
;EXTRN PutDDec:NEAR, PutDHex:NEAR, GetDDec:NEAR, PutDec:NEAR
;;External declarations for I/O subroutines
DECTOHEX PROC
_BEGIN ;Segment register initializations

_PutStr Prompt
call GetDec
mov SaveAX, ax
_PutStr OutMsg
mov ax, SaveAx
call PutHex
_PutCh 'H', 13, 10

;;PROGRAM BODY
_EXIT 0 ;this macro returns to DOS
DECTOHEX ENDP
END DECTOHEX ;The entry point, the start of execution


Thank you in advance.


Comments

  • CAN ANYONE HELP ME???????? PLEASE?????????????

  • : I am getting errors for this part of my code:
    :
    : EXTRN GetDec:NEAR, PutHex:NEAR
    :
    : Or any parts like that. The errors are:
    :
    : dectohex.obj(dectohex.asm) : error L2029: 'PutHex' : unresolved external
    : dectohex.obj(dectohex.asm) : error L2029: 'GetDec' : unresolved external
    :
    : I do not understand how this is happening. As far as I am concerned I have all the files required. I cannot run any of my programs. Any thoughts? Here is the short program from a book I am tryin to run:
    :
    : INCLUDE PCMAC.INC


    What does PCMAC.INC actually contain? Chances are, it refers to a file that you do not have.

    Also, what Assembler are you using? I suppose that GetDec and PutHex are stored in a library file somewhere, so the linker shouldn't have any problems finding them. What command line did you use when you got this error? You might have to explicitly state the library file containing the external functions.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories