Category : Printer Utilities
Archive   : DJSQUASH.ZIP
Filename : DJSQUASH.C

 
Output of file : DJSQUASH.C contained in archive : DJSQUASH.ZIP
#pragma inline
#include
#include

void interrupt (*oldint17)(unsigned BP,unsigned DI,unsigned SI,unsigned DS,
unsigned ES,unsigned DX,unsigned CS,unsigned BX,unsigned AX);

void pchar(unsigned char);

void pchar(unsigned char c) {
asm mov al,c
asm xor ah,ah
asm mov dx,0
asm pushf
asm call dword ptr oldint17
/*
(*oldint17)(_BP,_DI,_SI,_DS,_ES,0,_CX,_BX,c);
(*oldint17)(_BP,_DI,_SI,_DS,_ES,0,_CX,_BX,'-');
*/
}
/*
void interrupt my_21(unsigned R_BP, unsigned R_DI, unsigned R_SI, unsigned R_DS,
unsigned R_ES, unsigned R_DX, unsigned R_CX, unsigned R_BX, unsigned R_AX) {

}
*/
void interrupt my_17(unsigned R_BP, unsigned R_DI, unsigned R_SI, unsigned R_DS,
unsigned R_ES, unsigned R_DX, unsigned R_CX, unsigned R_BX, unsigned R_AX) {
unsigned char AH,AL;
AH = (R_AX & 0xFF00) >>4;
AL = R_AX & 0x00FF;
if (R_DX != 0) {
asm mov ax,R_AX
asm mov dx,R_DX
asm pushf
asm call dword ptr oldint17
if(R_DX == 0) (*oldint17)(R_BP,R_DI,R_SI,R_DS,R_ES,R_DX,R_CX,R_BX,0);
}
else if (AH == 1) {
c_init();
}
else if (AH == 0) {
c_filt(AL);
}
R_AX = 0x9000;
}
void keep(unsigned char stat, unsigned size) {
_DX = size;
_AL = stat;
_AH = 0x31;
geninterrupt(0x21);
}
main () {
oldint17 = getvect(0x17);
c_init();
setvect(0x17,my_17);
keep(0,0x10f); /* check with djs.map. last use was 010E6H */
}



  3 Responses to “Category : Printer Utilities
Archive   : DJSQUASH.ZIP
Filename : DJSQUASH.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/