simple ?

I just started to learn assembly with an old book (kind of cool--it refers to DOS 2.0 as state of the art), and I want to know how I can make an executable using Tasm & Tlink for the following:

mov dl,1

mov ah,2

int 21

int 20

I have been using Debug so far, but now I need to use source files. I tried one, and it compiled fine, but when I tried to link it I got an error No program entry point--or something like that. I know it's something stupid, but could you please show me the right source code that will compile and link to an executable using Tasm & Tlink.

Thanks a lot


Comments

  • : I just started to learn assembly with an old book (kind of cool--it refers to DOS 2.0 as state of the art), and I want to know how I can make an executable using Tasm & Tlink for the following:

    : mov dl,1

    : mov ah,2

    : int 21

    : int 20

    : I have been using Debug so far, but now I need to use source files. I tried one, and it compiled fine, but when I tried to link it I got an error No program entry point--or something like that. I know it's something stupid, but could you please show me the right source code that will compile and link to an executable using Tasm & Tlink.

    : Thanks a lot


    It's not stupid:)


    There are four things you need to specify before

    you can compile and link your program:

    What memory model to use

    A stack segment(not needed for COM-files)

    A code segment

    A program entry and end point


    Here's how your source would look:


    MODEL small

    STACK 256


    CODESEG

    Start:

    mov dl,1

    mov ah,2

    int 21h

    int 20h


    END Start







  • : I just started to learn assembly with an old book (kind of cool--it refers to DOS 2.0 as state of the art), and I want to know how I can make an executable using Tasm & Tlink for the following:

    : mov dl,1

    : mov ah,2

    : int 21

    : int 20

    : I have been using Debug so far, but now I need to use source files. I tried one, and it compiled fine, but when I tried to link it I got an error No program entry point--or something like that. I know it's something stupid, but could you please show me the right source code that will compile and link to an executable using Tasm & Tlink.

    : Thanks a lot


    Well, this should work.




    DOSSEG ;Don't think it's needed...

    .MODEL TINY

    .STACK 200h
    .DATA
    ;Put all the data stuff here like this:

    ;demo db "heeelllooo!",13,10

    ; db "How's it hangin'?$"


    .CODE
    START:

    mov dl,1

    mov ah,2

    int 21

    int 20
    ;You need to leave control back to OS...

    mov ax,4C00h

    int 21h

    END START


    This will create a .exe-file.


    Hope it helped,


    // no_carrier


  • Hey it did compile and link, but now the program crashes, while executing. Any ideas why?

    : : mov dl,1

    : : mov ah,2

    : : int 21

    : : int 20

    : : I have been using Debug so far, but now I need to use source files. I tried one, and it compiled fine, but when I tried to link it I got an error No program entry point--or something like that. I know it's something stupid, but could you please show me the right source code that will compile and link to an executable using Tasm & Tlink.

    : : Thanks a lot

    : It's not stupid:)

    : There are four things you need to specify before

    : you can compile and link your program:

    : What memory model to use

    : A stack segment(not needed for COM-files)

    : A code segment

    : A program entry and end point

    : Here's how your source would look:

    : MODEL small

    : STACK 256

    : CODESEG

    : Start:

    : mov dl,1

    : mov ah,2

    : int 21h

    : int 20h

    : END Start


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