Category : Display Utilities
Archive   : SAVEVGA.ZIP
Filename : SAVE03H.ASM

 
Output of file : SAVE03H.ASM contained in archive : SAVEVGA.ZIP
jmp Start
PrintScrnInt:
push ax
push bx
push cx
push dx
push si
push di
push ds
push es

push cs
pop ds
push ds
pop es

mov ah, 16h ;Create file using FCB
mov dx, offset Fcb_1
int 21h

mov ah, 2fh ;Get DTA at time of invocation
int 21h
mov OldDtaSeg W, es ;...and save it
mov OldDtaOfs W, bx

push ds
mov ah, 1ah ;Set a new DTA starting at B800:0000
mov bx, 0b800h
mov ds, bx
xor dx, dx
int 21h
pop ds

mov RecSize W, 2000

mov ah, 15h ;Sequential write using FCB
mov dx, offset Fcb_1 ; (Write 2000 bytes from DTA)
int 21h

mov ah, 10h ;Close file using FCB
mov dx, offset Fcb_1
int 21h

push ds
mov ah, 1ah
mov dx, OldDtaOfs W
mov bx, OldDtaSeg W
mov ds, bx
int 21h
pop ds

pop es
pop ds
pop di
pop si
pop dx
pop cx
pop bx
pop ax
iret
Signature db "SS10"
FcbPrefix db 0ffh ;Extension flag
db 5 dup (0) ;Unused
db 00 ;File attribute
Fcb_1 db 00 ;Set for default drive
FileName db "SCRNDUMP" ;File root name
FileExt db "03H" ;File extension name
BlockNum dw 0000 ;Current block number (filled in)
RecSize dw 2000 ;Record size (---------)
FileSize dd 00000000 ;File size (filled in)
FileDate dw 0000 ;File date (filled in)
FileTime dw 0000 ;File time (filled in)
db 8 dup (0) ;DOS work area (filled in)
RecNum db 00 ;Current record number (filled in)
RandomRec dd 00000000 ;Random rec. number (filled in)

OldDtaSeg dw ?
OldDtaOfs dw ?

Old5Seg dw ?
Old5Ofs dw ?

TsrSegment dw ?

PrgEnd:

Message db "Textdumper 1.0 (CGA/EGA/VGA version)", 0dh, 0ah
db " by Blaise Aguera-Arcas", 0dh, 0ah, '$'
RemoveMessage db "Textdumper 1.0 removed from memory.", 0dh, 0ah, '$'

Start:
push cs
pop ds
push ds
pop es

push es
mov ax, 3505h
int 21h
mov Old5Seg W, es
mov Old5Ofs W, bx

mov si, offset Signature
mov di, offset Signature
mov cx, 5
cld
repe cmpsb
cmp cx, 0
pop es
je Remove
jmp Install
Remove:

mov ah, 9
mov dx, offset RemoveMessage
int 21h

push es
mov es, Old5Seg W
mov bx, es:Old5Seg W
mov dx, es:Old5Ofs W
mov cx, es:TsrSegment W
mov ds:TsrSegment W, cx
pop es
mov ax, 2505h
push ds
mov ds, bx
int 21h
pop ds

push es
mov ah, 49h
mov es, TsrSegment W
int 21h
mov ah, 49h
mov bx, TsrSegment W
sub bx, 16
mov es, bx
int 21h
pop es

int 20h

Install:
mov ah, 9
mov dx, offset Message
int 21h

mov TsrSegment W, cs

mov ax, 2505h
mov dx, offset PrintScrnInt
int 21h

mov ax, PrgEnd
shr ax, 1
shr ax, 1
shr ax, 1
shr ax, 1
inc ax
mov dx, ax
mov ax, 3100h
int 21h

END


  3 Responses to “Category : Display Utilities
Archive   : SAVEVGA.ZIP
Filename : SAVE03H.ASM

  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/