Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4003038
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:06:13+00:00 2026-05-20T08:06:13+00:00

As the title says I’m trying to do the interrut chaining. What I’m looking

  • 0

As the title says I’m trying to do the interrut chaining. What I’m looking for is that when the Timer Interrupt (IRQ 0) is called, and the interrupt handler (ISR) finishes it executes my code. I’m trying to do it on Assembly, C or any language that allows me to do that. I found an example on this page but it doesn’t work on TASM. Could you help me with this, or where I can find information about this? Thank you. 😀

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:06:14+00:00Added an answer on May 20, 2026 at 8:06 am

    I’m not using it anymore, but just wanted to play again with probably the assembler I gave my first steps in assembly:

    .186
    .MODEL TINY, C
    
    .code
    ORG 100h
    
    Entry:
    ; Install handler
       push   ds
       xor    cx, cx
       mov    ds, cx
       mov    ax, ds:[8*4]
       mov    dx, ds:[8*4+2]
       cli
       mov    ds:[8*4], OFFSET InterruptHandler
       mov    ds:[8*4+2], cs
       pop    ds
       mov    word ptr [OldIntVect], ax
       mov    word ptr [OldIntVect+2], dx
       sti
    
    ; Wait for the user to press a key. In the meantime you should see lots of wildcards!
       xor   ax, ax
       int   16h
    
    ; Restore original handler
       mov    ax, word ptr [OldIntVect]
       mov    dx, word ptr [OldIntVect+2]
       push   ds
       xor    cx, cx
       mov    ds, cx
       cli
       mov    ds:[8*4], ax
       mov    ds:[8*4+2], dx
       sti
       pop    ds
    
    ; Exit to DOS
       int   20h
    
    PROC MyHandler
    
       mov   ah, 0Eh
       mov   al, '*'
       int   10h
       ret
    ENDP
    
    
    InterruptHandler:
       pushf
       call  cs:[OldIntVect]
       cmp   [busy], 0
       jne   ExitHandler ; If jumps then the timer was faster than the time it takes for MyHandler to complete
    
       mov   cs:[busy], 1
       pusha
       call  MyHandler ; Other options are using a pointer to function or just inlining the code here.
       popa
       mov   cs:[busy], 0
    
    ExitHandler:
       iret
    
    OldIntVect dd ?
    busy       db ?
    
    END Entry
    

    Tested under WinXP (32-bit):

    >tasm timer.asm
    Turbo Assembler  Version 1.01  Copyright (c) 1988, 1989 Borland International
    
    Assembling file:   TIMER.ASM
    Error messages:    None
    Warning messages:  None
    Remaining memory:  481k
    
    
    >tlink /t timer.obj
    Turbo Link  Version 3.0 Copyright (c) 1987, 1990 Borland International
    
    >timer
    ***************************
    

    But this of course is only valid for a DOS environment (DOSBox, Windows 32-bit versions, etc.) and with some tweaks for a bootloader at most.

    Anyway, thanks for the beautiful time you just gave me reviving all this 😛

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Title says what i'm trying to do. I can successfully generate an assembly if
The title says it! I know that Jon Skeet was working on an implementation
As the title says: Is there no method being called on my other ViewController
As the title says, I'm trying to do something like this: public abstract class
As the title says, i am trying to find the customer's who have made
as title says I am looking for a PHP function to check if you
As the title says none of my tableview controller methods are being called. The
Title says it pretty much all... I'm trying to automate tests on a web
As title says. I am looking for some help with my .htaccess. I have
The title says most of what I'm looking for: I have 2 buttons on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.