Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » Software » How to screen capture DOS window?
Uniqs:
1870
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  

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:

Re: How to screen capture DOS window?

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
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
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
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

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

Re: How to screen capture DOS window?

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

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

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:

 
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:
Please try with the attached file, Pixel2.exe and show me. It did not work for me or 2kmaro.

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


1 edit

Re: How to screen capture DOS window?

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

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


1 edit
I'll give it another try this evening when I get home - or tomorrow evening, as I may be getting home late. Dinner with a friend, you know .

I may not have had the setup right but now have Dr Olds instructions to go by. My SnagIt setup is to default to a rectangular area, not full screen capture.

Aha! Just saw Dr Olds' previous post - guess that means I don't have to rush away from dinner .

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


2 edits
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
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:

Re: How to screen capture DOS window?

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
Give this a shot...(FREE)

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

USR56K

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

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

Re: How to screen capture DOS window?

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

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

Re: How to screen capture DOS window?

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!

Weirdal
Premium
join:2003-06-28
Lincoln, NE
heh, just photoshop a cross, nobody will ever notice
--
| Journal|

USR56K

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

Re: How to screen capture DOS window?

Click for full size
Thank you Doctor Olds!! That did the trick.

said by Weirdal See Profile:

heh, just photoshop a cross, nobody will ever notice
Well, that can't be done because this was just a sample of another program I'm writing, which will graph the function y=2(x^2). Above is the start of it... you have to look really hard to see the blue pixels.
--
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:

Re: How to screen capture DOS window?

You are Welcome!! Sorry about the SnagIt snafu earlier as I misunderstood what you were wanting to capture.

I must be old to use a DOS TSR (Terminate Stay Resident) in Windows memory, LOL.

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  


Friday, 04-Dec 10:51:44 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
· [163] Comcast Releasing Promised Usage Meter
· [144] Avast Antivirus Has Gone Mad
· [110] Comcast Makes NBC Universal Acquisition Official
· [104] Graduate Student Unveils Sprint's GPS Sharing With Feds
· [92] Google Invades ISP, OpenDNS Turf With Google Public DNS
· [81] Latest Consumer Reports Survey Not Kind To AT&T
· [72] Sprint Defuses GPS Privacy Media Bomb
· [70] Baltimore To Ban Lazy Cable Installs
· [70] FCC Ponders Moving From PSTN To IP Voice
· [64] Broadband Killed The Game Console
Most people now reading
· False positive in Avast! or is it real? [Security]
· Linux is terrorist - according to MS... [All Things Unix]
· Connecting to Google Voice Via SIP [VOIP Tech Chat]
· Microsoft actively urges IE 6 users to upgrade [Security]
· IMG 1.7 (IMG Updates and Discussion) [Verizon FIOS TV]
· [WotLK] Doing away w/ conquest? [World of Warcraft]
· Windows 7 boot manager editing questions [Microsoft Help]
· Equal speeds ruling [Canadian Broadband]
· CBC news radio reports ACTA [Canadian Broadband]