Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » Software » How to screen capture DOS window?
Search Topic:
Uniqs:
1796
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
[Need] MoZilla 1.7 About Screen CAP »
« Show Your ObjectDock And Non-Traditional Desktops  
page: 1 · 2
AuthorAll Replies


USR56K

join:2000-05-20
Seattle, WA
clubs:
·Charter Pipeline

How to screen capture DOS window?

PIXEL2.zip 1,264 bytes
(PIXEL2.EXE)
I am having trouble capturing a screen shot in a full screen dos window with a program I wrote. It uses the ms-dos Int 10h function, which is bios-level access to the video. That being the case, a standard program such as SnagIt, does not work.

Attached is the program that I'm having problems with. To run it, you must already be at the command prompt and in full screen (hit alt+enter) mode. Otherwise, your screen will just blink and you'll think the program is broken.

If anyone is able to actually get a screen shot, I'll be quite amazed.
--
If it's not on Google, then it doesn't exist.

**DC++ FAQ**


2kmaro
Think
Premium,ExMod 1 BC
join:2000-07-11
ColossalCave
clubs:

Well, I pretty well blew up my video trying that one. Downloaded, extracted. Opened command window, gave command to run pixel2.exe and DOS window appeared to go full screen, then totally black and I was informed I'd lost video signal totally. Took 3-finger salute to get back here. Oh, I see I missed your warning to go to full screen mode first. Trying again.

OK - no, couldn't grab it with SnagIt or PrintKey2000.
--
Season's Greetings to All!


turbomkt
Premium
join:2003-05-30
Santee, CA
reply to USR56K
Is this for a class?

If it doesn't work for you, why would it work for someone else? This is a program YOU wrote. I think what you're looking for is some debugging help.
--
In it for the fun...


Cudni
La Merma - Vigilado
Premium,MVM
join:2003-12-20
Someshire
reply to USR56K
What is it suppose to display. I only see black screen with prompt?

Cudni


McSummation
Mmmm, Zeebas Are Tastee.
Premium,MVM
join:2003-08-13
Round Rock, TX
reply to USR56K
How about providing the source so we have a chance to see what you've done wrong.


USR56K

join:2000-05-20
Seattle, WA
clubs:
·Charter Pipeline

reply to USR56K
I am not doing anything wrong with the program. Nor am I trying to debug it! That is simply how a program which directly access the video bios acts under a Window ms-dos window. Odd you lost video signal, that doesn't happen for me (the program switches to 800x600 video mode).

It is simply suppose to display a white horizontal and vertical line in the middle of the screen. Sounds like my only option for a screen capture is Vmware.

syntax colored asm code:
TITLE Cartesian Coordinates                 (Pixel2.asm)

; This program switches into 800 X 600 graphics mode and
; draws the X and Y axes of a Cartesian coordinate system.
; Switch to full-screen mode before running this program.
; Color constants are defined in Irvine16.inc.
;

INCLUDE Irvine16.inc

Mode_6A = 6Ah ; 800 X 600, 16 colors
X_axisY = 300
X_axisX = 50
X_axisLen = 700

Y_axisX = 400
Y_axisY = 30
Y_axisLen = 540

.data
saveMode BYTE ?

.code
main PROC
mov ax,@data
mov ds,ax

; Save the current video mode
mov ah,0Fh ; get video mode
int 10h
mov saveMode,al

; Switch to a graphics mode
mov ah,0 ; set video mode
mov al,Mode_6A ; 800 X 600, 16 colors
int 10h

; Draw the X-axis
mov cx,X_axisX ; X-coord of start of line
mov dx,X_axisY ; Y-coord of start of line
mov ax,X_axisLen ; length of line
mov bl,white ; line color (see IRVINE16.inc)
call DrawHorizLine ; draw the line now

; Draw the Y-axis
mov cx,Y_axisX ; X-coord of start of line
mov dx,Y_axisY ; Y-coord of start of line
mov ax,Y_axisLen ; length of line
mov bl,white ; line color
call DrawVerticalLine ; draw the line now

; Wait for a keystroke
mov ah,10h ; wait for key
int 16h

; Restore the starting video mode
mov ah,0 ; set video mode
mov al,saveMode ; saved video mode
int 10h

exit
main endp

;------------------------------------------------------
DrawHorizLine PROC
;
; Draws a horizontal line starting at position X,Y with
; a given length and color.
; Receives: CX = X-coordinate, DX = Y-coordinate,
; AX = length, and BL = color
; Returns: nothing
;------------------------------------------------------
.data
currX WORD ?

.code
pusha
mov currX,cx ; save X-coordinate
mov cx,ax ; loop counter

DHL1:
push cx ; save loop counter
mov al,bl ; color
mov ah,0Ch ; draw pixel
mov bh,0 ; video page
mov cx,currX ; retrieve X-coordinate
int 10h
inc currX ; move 1 pixel to the right
pop cx ; restore loop counter
Loop DHL1

popa
ret
DrawHorizLine ENDP

;------------------------------------------------------
DrawVerticalLine PROC
;
; Draws a vertical line starting at position X,Y with
; a given length and color.
; Receives: CX = X-coordinate, DX = Y-coordinate,
; AX = length, BL = color
; Returns: nothing
;------------------------------------------------------
.data
currY WORD ?

.code
pusha
mov currY,dx ; save Y-coordinate
mov currX,cx ; save X-coordinate
mov cx,ax ; loop counter

DVL1:
push cx ; save loop counter
mov al,bl ; color
mov ah,0Ch ; function: draw pixel
mov bh,0 ; set video page
mov cx,currX ; set X-coordinate
mov dx,currY ; set Y-coordinate
int 10h ; draw the pixel
inc currY ; move down 1 pixel
pop cx ; restore loop counter
Loop DVL1

popa
ret
DrawVerticalLine ENDP
END main

--
If it's not on Google, then it doesn't exist.

**DC++ FAQ**


McSummation
Mmmm, Zeebas Are Tastee.
Premium,MVM
join:2003-08-13
Round Rock, TX
My video is set to 800x600. When I run it, I get a pattern of dull red and cyan squares.


USR56K

join:2000-05-20
Seattle, WA
clubs:
·Charter Pipeline

reply to USR56K
Try running it a second time once your screen it full resolution.

Well I just tried it under vmware 4.5.2, and it didn't work. Figures, since emulation of hardware won't like this lower level stuff. So now my only option is a camera it seems.... nuts!
--
If it's not on Google, then it doesn't exist.

**DC++ FAQ**


USR56K

join:2000-05-20
Seattle, WA
clubs:
·Charter Pipeline

reply to USR56K
Click for full size
Alright, fine... I used my roommates crappy HP 43x camera. I'd still like to find a better way to take a screenshot of it though.
--
If it's not on Google, then it doesn't exist.

**DC++ FAQ**


Doctor Olds
I Need A Remedy For What's Ailing Me.
Premium,VIP
join:2001-04-19
1970 442 W30
clubs:

reply to USR56K
 
Click for full size
said by USR56K See Profile:

If anyone is able to actually get a screen shot, I'll be quite amazed.
SnagIt works.


USR56K

join:2000-05-20
Seattle, WA
clubs:
reply to USR56K
Please try with the attached file, Pixel2.exe and show me. It did not work for me or 2kmaro.


dadkins
Can you do Blu?
Premium,MVM
join:2003-09-26
Hercules, CA
·Comcast


2 edits
reply to USR56K
Click for full size
Click for full size
This is what I get when trying to run the file you uploaded...
EDIT: Are you just trying to capture the DOS/CMD window and it's contents like pic #2?
--
No Firefox here, move along!


USR56K

join:2000-05-20
Seattle, WA
clubs:
·Charter Pipeline


1 edit
reply to USR56K
You did not read what I said on how to run it!

said by USR56K See Profile:

To run it, you must already be at the command prompt and in full screen (hit alt+enter) mode. Otherwise, your screen will just blink and you'll think the program is broken.
I'm on XP Pro SP2 and following those instructions, it works every time. I am trying to capture what is shown on the screen, exactly what it looks like when I used the digital camera.


2kmaro
Think
Premium,ExMod 1 BC
join:2000-07-11
ColossalCave
clubs:

When I successfully ran it once, I saw the white cross, but then went back to the Windows desktop world, and when I went back to the DOS window it was a bunch of thin, vertical lines across the screen - not even one horizontal line anymore.

For whatever it's worth - the monitor I was using when I got the lost signal message was an LCD, not CRT. Specifically a ViewSonic VP912b.
--
Season's Greetings to All!


dadkins
Can you do Blu?
Premium,MVM
join:2003-09-26
Hercules, CA
reply to USR56K
Give this a shot...(FREE)

»www.gadwin.com/printscreen/
--
No Firefox here, move along!


USR56K

join:2000-05-20
Seattle, WA
clubs:
·Charter Pipeline

reply to USR56K
Until someone posts a screenshot, I am not going to download anything else. It seems people are just throwing out programs / ideas they use with out trying it on this program!

There is a reason I posted the program along with saying common screenshot methods do not work.
--
If it's not on Google, then it doesn't exist.

**DC++ FAQ**


dadkins
Can you do Blu?
Premium,MVM
join:2003-09-26
Hercules, CA
·Comcast

It must not like LCD screens, or laptops, or laptops with LCD screens, or laptops with 1920x1200 Resolution LCD screens...

It just sits there and runs up my processor to 100%...

Sorry, I tried(from FULL screen CMD).

Hopefully someone will achieve it for you, good luck!
--
No Firefox here, move along!


USR56K

join:2000-05-20
Seattle, WA
clubs:
·Charter Pipeline

reply to USR56K
Weird, I'm not sure why some peoples screens go out of sync. There is nothing in the code that sets the refresh rate. I've got an GF3Ti500.

What card do ya'll have where it does not work?
--
If it's not on Google, then it doesn't exist.

**DC++ FAQ**


dadkins
Can you do Blu?
Premium,MVM
join:2003-09-26
Hercules, CA
·Comcast


1 edit
Click for full size
ATI Mobility Radeon 9700.

Screen didn't do anything for me, it just sat there and ran the processor at 100% while being solid black...
--
No Firefox here, move along!


Doctor Olds
I Need A Remedy For What's Ailing Me.
Premium,VIP
join:2001-04-19
1970 442 W30
clubs:


1 edit
reply to USR56K
Click for full size
 
said by USR56K See Profile:


Please try with the attached file, Pixel2.exe and show me. It did not work for me or 2kmaro.
I apologize and you are right that SnagIt fails to capture your image.

I did find a way though. ;)

Video Thief and it's native VTF format, then VTFView and convert to BMP, then Irfanview to convert to JPG.
16:24:29  Mon 12-06-2004
H:\Vthief>vthief /h

VideoThief version 0.07 Copyright (c) 1995-99, Andrew Aksyonoff
Usage: vthief[.com] [key [key [...]]]
Keys:
/?, /h display this help info
/r remove VideoThief from memory
/k<xx> set popup key scan code to <xx> hex
/d<dir> set VTF directory to <dir>
/p program PIC (yields better control hooking)
/l LFB support mode

16:34:45 Mon 12-06-2004
H:\Vthief>vthief /r

VideoThief version 0.07 Copyright (c) 1995-99, Andrew Aksyonoff
Removed from memory.

16:35:05 Mon 12-06-2004
H:\Vthief>
http://shareware.pcmag.com/product.php%5Bid%5D10331%5Bcid%5D251%5BSiteID%5Dpcmag

What's my next challenge?

Regards,

Doctor Olds
Forums » Tech and Talk » OS and Software » Software[Need] MoZilla 1.7 About Screen CAP »
« Show Your ObjectDock And Non-Traditional Desktops  
page: 1 · 2


Monday, 09-Nov 20:48:54 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.
page compression OFF
Most commented news this week
· [70] VoIP Over 3G Still Not Working For iPhone
· [65] Verizon Keeps Swinging At AT&T
· [32] Bill Would Force ISPs To Block Financial Scams
· [18] Mediacom Hints At 50, 100 Mbps Speeds
· [13] Clearwire To Get Another $1.5 Billion
· [9] 15 States Have Now Gotten Broadband Mapping Money
· [5] AT&T Launching New 7.2 Mbps 3G Modem
· [2] Monday Morning Links
Most people now reading
· Google Has Acquired Gizmo5 [VOIP Tech Chat]
· Divorce advice... [General Questions]
· Blown out Ballasts [Home Repair & Improvement]
· 3.x Feral Druid - Bear Tanking Guide [World of Warcraft]
· How in the world am I going to get into college? [General Questions]
· 60 Minutes piece on cyber security last night [Security]
· Framed for child porn 151; by a PC virus [Security]
· Know when to run! [Home Repair & Improvement]
· My cat is reluctant to exercise. [General Questions]