![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Apr 2006
Posts: 1
Rep Power: 0
![]() |
Writing to a file from a TSR (MASM16)
Hi,
I am having a hard time writing to a file from a TSR routine. The routine is supposed to write a line of text to a file when the F9 key is pressed. Instead it just prints the line to the screen. I am only posting the parts of the routine I having problems with. I thikn I setup the IVT table correctly. Thanks, Kevin ; -------------------------------------------------- ; Example layout for interrupt handler. .model tiny .486 text segment public 'CODE' ; Note, must put start of program at 100 hex, org 100h start: jmp init ; note, required to "start" just past the "org", ; so jump, not call, since we will not return. myint proc far pushf call CS:oldn push ax push bx push cx push dx push ds push es mov ax,cs mov ds,ax ; Check for F9 down cmp ax, 43h je no_err ; Check for F9 up, file write cmp ax, 0c3h je filewrite ; If we see any other key, just beep jmp err ; write the stars line to the file filewrite: mov ah, 40h mov bx, es:fhand mov cx, 82 lea dx, es:stars int 21h jc err ; Commit the line mov ah, 68h mov bx, es:fhand int 21h jmp no_err Last edited by Roku; Apr 10th, 2006 at 1:43 PM. Reason: Cleaing this up to conform with the forum rules (I am a newbie) |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|