Posted by Ali Bhai on 1999-04-19
>That's because of the way a com program is made: The very first byte of the >file has to be the first code byte. I know that and the book tells me to start a com program according to the following prototype: TITLE name ORG 100h START: jmp main ; data definitions go here main proc ; code goes here main endp end main >This error message tells you that >you're trying to make a com file with data at the beginning. >What exactly is the situation? Actually I once saw a tsr that displayed time in the upper right corner of the screen. I wanted to reinvent the wheel. I have tired to put all my code in a single file (following the above mentioned prototype) but that does not help. >PS, have you yet tried to make an .exe file? .exe files may have their >entry point anywhere in the file Yeah, I have worked on that. But tsrs should be written as com programs. Can anyone help me in implementing a time display tsr. I have the following idea in my mind: The clock calls interrupt, 1Ch 18 times per second. If we write an interrupt routine that gets time (function 2Ch; int 21h) and put the address of this routine in 1Ch, the routine will automatically display time after every clock tick. I have implemented the part till that (in an EXE result). Now I want to make a tsr for this one. That is, I want my program to exit and continue displaying time while the user works in dos. I had ideas for that too but the assembler given error messages while assembling a com program. Can anyone help me in that? Thank you and thanks to Ryan too. Ali Bhai BCS III - FAST Institute of Computer Science, Karachi email: mashah@xxxxx.xxx.xx web page: www.pak.org/mufta <-----------------------------------------> [To err is human but to really mess up the things you need a computer.]
Previous post | Next post | Timeline | Home