Results 1 to 7 of 7
  1. #1

    Default need help: unresolved external masm 5.1


    programming masters, i need your expertise..please, help!

    i have to link A.asm to B.asm (which is the main)

    A.asm is already public and far, and i already put the command "EXTRN A:far"

    still, i get the error "unresolved external"

    i googled it, but wa jud ko nakit-an..

    im desperate to know what's wrong, pls help me

    thanks

  2. #2
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    paste your precious code.

  3. #3
    include macros.txt
    extrn act2: far, act3: far, act4: far, act5: far, act6: far, act7: far, act8:far,act9:far

    .model small
    .stack
    .data
    string1 db "****^^^MENU^^^****$"
    strAct2 db "Activity 2: [1]$"
    strAct3 db "Activity 3: [2]$"
    strAct4 db "Activity 4: [3]$"
    strAct5 db "Activity 5: [4]$"
    strAct6 db "Activity 6: [5]$"
    strAct7 db "Activity 7: [6]$"
    strAct8 db "Activity 8: [7]$"
    strAct9 db "Activity 9: [8]$"
    strExit db "Exit : [9]$"
    strThanks db "*** Thank You and Have A Good Time ***$"

    stringInput db "Select activity to run: $"



    .code
    act10 proc far

    initialize
    mov es, ax
    clearScreen

    start:
    ; *************DESIGN PHASE*******************
    ;
    ;coloredClearScr macro color, uLeftRow, uLeftCol, lRightRow, lRightCol
    ; For the Heading Title
    coloredClearScr 0CEh, 2, 6, 6, 70
    coloredClearScr 3Eh, 3, 5,5, 71

    ; For the string Title
    setCursor 4, 29
    displayText string1

    ; For the Text to display all activities

    coloredClearScr 47h, 8, 6, 18, 70
    coloredClearScr 0Eh, 9, 7, 17, 69
    setCursor 9, 17
    displayText strAct2
    setCursor 10, 17
    displayText strAct3
    setCursor 11,17
    displayText strAct4
    setCursor 12, 17
    displayText strAct5
    setCursor 9, 42
    displayText strAct6
    setCursor 10, 42
    displayText strAct7
    setCursor 11, 42
    displayText strAct8
    setCursor 12 ,42
    displayText strAct9
    setCursor 14, 32
    displayText strExit
    setCursor 16, 17
    displayText stringInput
    setCursor 16, 25

    ;*********INPUTTING AND OUTPUTTING PHASE************

    setCursor 16, 40
    mov ah, 1
    int 21h

    cmp al, 31h
    clearScreen
    je call1

    cmp al, 32h
    je call2

    cmp al, 33h
    je call3

    cmp al, 34h
    je call4

    cmp al, 35h
    je call5

    cmp al, 36h
    je call6

    cmp al, 37h
    je call7

    cmp al, 38h
    je call8

    cmp al, 39h
    je call9

    call1:
    call act2
    clearScreen
    jmp start

    call2:
    call act3
    ;jne toEnd
    jmp start

    call3:
    call act4
    jmp start

    call4:
    call act5
    jmp start
    call5:
    call act6
    jmp start
    call6:
    call act7
    jmp start
    call7:
    call act8
    jmp start
    call8:
    call act9
    jmp start
    call9:


    setCursor 24, 0
    exit

    act10 endp

    end act10

  4. #4
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    please use code wrapper

    what assembler you are using?
    how you execute your linker command? do you have to include libraries?

    eg: ml file1.asm file2.asm io.lib

    Some assembler suggested to declare their variable under FAR Segments ".FARDATA" (file 1) and use EXTRN directive within the scope of DATA directive in file 2, then followed by your procedure.

    by the way, is your assembler can check sysmbols being declared (EXTRN) outside any segment? coz if not, there are possibility that File 1 will not return the correct segment..

    here's some sort of solution for that:
    Code:
            .DATA
            .
    
            @CurSeg ENDS                    ; Close segment
            EXTRN    var:BYTE
            .CODE
            .
            add procedure moving your variable to data segment.
    try to study also the use of GLOBAL and PUBLIC.

  5. #5
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    oh sorry, so its masm5.1

    try here: Microsoft MASM Programmer's Guide: Assembly-Language Development System v6.1 - Chapter 8 search on "Positioning External Declarations" read until "Using Alternatives to Include Files"

  6. #6
    ^^thanks sir..sori abour the code wrapper, actually i dont know how to use it..i'm a super noob

  7. #7
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    Did you manage to run your code?

  8.    Advertisement

Similar Threads

 
  1. Replies: 13
    Last Post: 06-30-2013, 11:21 PM
  2. My external dvdrom wont boot need help
    By heavenknws in forum Computer Hardware
    Replies: 13
    Last Post: 12-04-2012, 08:02 PM
  3. NEED HELP! buying an external 2.5 HD
    By 0C3L0T in forum Computer Hardware
    Replies: 14
    Last Post: 03-30-2011, 11:25 AM
  4. Need help on IonGear External Drive
    By sercor::jhumzki in forum Computer Hardware
    Replies: 3
    Last Post: 02-04-2011, 11:31 AM
  5. Need help about external drive...
    By figer143 in forum Computer Hardware
    Replies: 6
    Last Post: 06-21-2010, 03:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top