
how-to block ads
|
 USR56K
join:2000-05-20 Seattle, WA clubs:
·Charter Pipeline
| How to screen capture DOS window? 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** | |
|  |   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: | 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? said by USR56K :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 | |
|  |  |   dadkins Can you do Blu? Premium,MVM join:2003-09-26 Hercules, CA
·Comcast
2 edits | 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 : 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. | |
|  |  |  |  |  |  |  |  |  |   dadkins Can you do Blu? Premium,MVM join:2003-09-26 Hercules, CA
·Comcast
1 edit | Re: How to screen capture DOS window? 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| | |
|  |  |  |  |   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 | |
|  | |  |
|