Monday, 15 April 2013

assembly - MS-DOS standard output interrupt and function -



assembly - MS-DOS standard output interrupt and function -

i need write resident programme grabs console output file. have know interrupt , function dos uses print output console, rewrite interrupt. can't find anywhere.

in lastly step dos uses teletype output print output console: rbil->inter61a.zip->interrup.a

--------v-100e------------------------------- int 10 - video - teletype output ah = 0eh al = character write bh = page number bl = foreground color (graphics modes only) return: nil desc: display character on screen, advancing cursor , scrolling screen necessary notes: characters 07h (bel), 08h (bs), 0ah (lf), , 0dh (cr) interpreted , expected things ibm pc roms dated 1981/4/24 , 1981/10/19 require bh same current active page bug: if write causes screen scroll, bp destroyed bioses ah=06h destroys bp seealso: ah=02h,ah=06h,ah=0ah

and here other way set , interrupt vector: rbil->inter61b.zip->interrup.f

--------d-2125------------------------------- int 21 - dos 1+ - set interrupt vector ah = 25h al = interrupt number ds:dx -> new interrupt handler notes: function preferred on direct modification of interrupt vector table dos extenders place api on function, not straight meaningful in protected mode under dr dos 5.0-6.0, function not utilize of dos-internal stacks , may called @ time; however, under novell dos 7.0 - dr-dos 7.02, function not reentrant. since 1998/05/29, dr-dos 7.03 no longer uses internal stacks , tests function much earlier, allow minimal stack usage of 2 words in add-on iret frame, allowing called int 21h functions, specificially device drivers. fixes mcs smb client novell netware (except new dos requester) monitors offset of int 24 set, , if equal value @ startup, substitutes own handler allow handling of network errors; introduces potential bug programme int 24 handler offset happens same command.com's not have int 24 handler installed seealso: ax=2501h,ah=35h --------d-2135------------------------------- int 21 - dos 2+ - interrupt vector ah = 35h al = interrupt number return: es:bx -> current interrupt handler note: under dr dos 5.0+, function not utilize of dos-internal stacks , may called @ time seealso: ah=25h,ax=2503h

a little variation of end of our isr:

myisr: ....etc.... db 0eah ; jmp far old_dosint dw ?, ?

edit: rbil->inter61b.zip->interrup.f

--------d-2109------------------------------- int 21 - dos 1+ - write string standard output ah = 09h ds:dx -> '$'-terminated string return: al = 24h (the '$' terminating string, despite official docs state nil returned) (at to the lowest degree dos 2.1-7.0 , nwdos) notes: ^c/^break checked, , int 23 called if either pressed standard output screen under dos 1.x, may redirected under dos 2+ under flashtek x-32 dos extender, pointer in ds:edx seealso: ah=02h,ah=06h"output"

example:

string db "hello","$" mov ah,9 lea dx,string int 21h

assembly dos

No comments:

Post a Comment