Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

8086 Stopwatch program


I need this sample program/codes for reference on how to get started. Let me know if u can help. Be it a running source code or any website link of relevant info. thxs!

Comments

  • little_coderlittle_coder Posts: 29Member
    Hope this helps:

    [code]

    ; This sample shows the
    ; use of a timer function
    ; (INT 15h / 86h)
    ; This code prints some chars
    ; with 1 second delay.

    #make_COM# ; required for MicroAsm.

    ORG 100h

    ; set the segment register,
    ; just in case:
    MOV AX, CS
    MOV DS, AX

    next_char:

    CMP count, 0
    JZ stop

    ; print char:
    MOV AL, c1
    MOV AH, 0Eh
    INT 10h

    ; next ascii char:
    INC c1
    DEC count

    ; set interval (1 million
    ; microseconds - 1 second):
    MOV CX, 0Fh
    MOV DX, 4240h
    MOV AH, 86h
    INT 15h

    ; stop any error:
    JC stop

    JMP next_char

    stop:
    RET

    count DB 10
    c1 DB 'A'

    END

    [/code]

    Tested and compiled under MicroAsm:
    http://www.programmersheaven.com/search/download.asp?FileID=25691
Sign In or Register to comment.