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 8676801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:17:24+00:00 2026-06-12T20:17:24+00:00

While studying tsr programming i have seen the use of certain code which i

  • 0

While studying tsr programming i have seen the use of certain code which i cannot understand..

The example cede part is(in c):
(please explain the bolded sections)

#include "dos.h"
#include"stdio.h"
void interrupt our();
void interrupt (*prev)();
char far *scr=(char far*)0xB8000000L;
int ticks;
unsigned char color;
main()
{   
    prev=getvect(8);   // <<<<<
    setvect(8,our);    // <<<<<
    keep(0,10000);     // <<<<<
}
  • 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-06-12T20:17:25+00:00Added an answer on June 12, 2026 at 8:17 pm

    You would partially understand this code if you read the answer i posted to your similar question on TSR

    How to write a TSR which changes case of characters

    The most important things here are

    Far pointer: Since 16 bit DOS used segment offset addressing scheme, your normal near pointer could not access memory beyond 64K of it’s allocated segment. You have to read details to understand it.

    Video memory address: This B8000000 is the address for which you need far pointer. The special thing about this address is, that starting from this location bytes (equal to the resolution of screen * 2) are copied directly into video memory.

    So if you assign a character to a pointer address after indirection it will be printed on screen

    Something like

    char * far p = 0xB8000000;
    
    *p = 'a'; // this would actually print a on screen at left top
    

    Loop forward to get to the rest of the screen.

    There was a c book by yashwant kanetkar which had a good deal of reference for this. I remember using it in my undergrad many years ago.

    The rest of them are just indexing api’s in dos.h. Why don’t you go through their description and get back here if you don’t understand any?

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

Sidebar

Related Questions

While studying C# in ASP.net I have trouble understanding several classes. In which scenario
I have come across fluent API's while studying DSLs. I have searched a lot
While studying different programming languages, I recently hit upon Icon programming language . It
I am studying the SCJP, and while studying I have found an exercise that
While I was studying assembly code, I saw below code segment. I am a
While I was studying about shared library I read a statement Although the code
I'm new to Objective-C world. What I have noticed while studying some iOS/Mac apps
I've been studying C programming for a while and I've stumbled on this exercise
While studying Java tutorials, Reflection and Late Binding have confused me. In some tutorials,
i came upon this code while studying settimeout. the settimeout executes an alert 5

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.