中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 搜索 | 上传 | 帮助 »
作者:
标题: 帮我看看这个Dos程序 上一主题 | 下一主题
swing
新手上路





积分 19
发帖 11
注册 2006-4-16
状态 离线
『楼 主』:  帮我看看这个Dos程序

帮我看看这个Dos程序,是用什么语言写的! 还有个问题,这个程序是不是针对sis6326的显卡,做了优化!!? -----------------------------补充--------------- 我刚才找了, 好像是Qb写, 因为它的出错提示里面好像是Qb的. 但是我就是不明白, 为什么这个程序针对sis6236显卡, (我们 通过特殊的转换器,把视频信号输出到普通电视的 显示屏, 从电脑启动到 进入程序前, 显示屏都是抖动的; 进入这个程序后就不抖了! 而且退出这个程序后也不抖 -----必须是sis6236显卡) -----------------------------补充--------------- 不是我们的产品~~~ 别人那儿得到的~~~ 这个程序不能单独运行! play==>把dos转变是图形模式, 然后在上面选择项目! 在pc的纯dos下面一切正常,但是通过特殊的转换卡,把信号输出到到显示器(普通电视的显示屏)后, 只有用sis6236显卡,屏幕才不会抖动! ----------------------------补充---------------- 在IDA中反汇编,一共找到4处 int 10h 1:处========> seg001:62F0 sub_CC90 proc near ; CODE XREF: sub_CCC3+8p seg001:62F0 ; sub_CD1F+19p ... seg001:62F0 push bp seg001:62F1 push si seg001:62F2 push di seg001:62F3 int 10h ; - VIDEO - seg001:62F5 pop di seg001:62F6 pop si seg001:62F7 pop bp seg001:62F8 retn seg001:62F8 sub_CC90 endp 2,3处========> mov cx, 1 seg001:6F68 seg001:6F68 loc_D908: ; CODE XREF: sub_D8C6+4Dj seg001:6F68 lodsb seg001:6F69 mov ah, 9 seg001:6F6B int 10h ; - VIDEO - WRITE ATTRIBUTES/CHARACTERS AT CURSOR POSITION seg001:6F6B ; AL = character, BH = display page seg001:6F6B ; BL = attributes of character (alpha modes) or color (graphics modes) seg001:6F6B ; CX = number of times to write character seg001:6F6D inc dx seg001:6F6E mov ah, 2 seg001:6F70 int 10h ; - VIDEO - SET CURSOR POSITION seg001:6F70 ; DH,DL = row, column (0,0 = upper left) seg001:6F70 ; BH = page number seg001:6F72 dec di seg001:6F73 jnz short loc_D908 seg001:6F75 retn seg001:6F75 sub_D8C6 endp 4处:========> seg001:73E0 sub_DD80 proc near ; CODE XREF: seg001:83CAp seg001:73E0 push si seg001:73E1 call sub_D628 seg001:73E4 mov cx, ds:3122h seg001:73E8 call sub_CD1C seg001:73EB mov bh, ds:3125h seg001:73EF push bp seg001:73F0 push si seg001:73F1 push di seg001:73F2 mov ah, 8 seg001:73F4 int 10h ; - VIDEO - READ ATTRIBUTES/CHARACTER AT CURSOR POSITION seg001:73F4 ; BH = display page seg001:73F4 ; Return: AL = character seg001:73F4 ; AH = attribute of character (alpha modes) seg001:73F6 pop di seg001:73F7 pop si seg001:73F8 pop bp seg001:73F9 or al, al seg001:73FB jnz short loc_DD9F seg001:73FD mov al, 20h ; ' ' seg001:73FF seg001:73FF loc_DD9F: ; CODE XREF: sub_DD80+1Bj seg001:73FF xor bx, bx seg001:7401 xchg ah, bl seg001:7403 xchg ax, cx seg001:7404 mov dx, ds:30FCh seg001:7408 call sub_CD1F seg001:740B xor ch, ch seg001:740D xchg ax, cx seg001:740E pop si seg001:740F retn seg001:740F sub_DD80 endp 令人不解的是一般dos下面比较流行的是VAG的 13h ,256 320*200 的模式 但是这几处, 看不出来是那种!!! ========================================================================> ========================================================================> ========================================================================> 国外资料 Program VGA_to_SCART; { This program sets VGA 80x25 color text mode to PAL frequencies for VGA to TV adapter. This program is written to be an exaple how to get PAL frequencies out of VGA card. This program outputs noninterlaced picture at PAL frequencies (15625 Hz horizonal and 50 Hz vertical). There is a small error in frequencies, but TVs can handle this easily. I have not done anything to change then font size according the TV resolition, so part of the picture will remain out of visible TV screen area. This sourcecode compiles with Turbo Pascal and Borland Pascal compilers versions 4.0 and up. Copyright Tomi Engdahl 1994-1996 } Uses Dos,Crt; Const DirectVideo=False; {forces CRT unit to use BIOS calls for output} crtc_index=$3d4; crtc_data=$3d5; atc_index=$3c0; atc_data=$3c0; graph_index=$3ce; graph_data=$3cf; seq_index=$3c4; seq_data=$3c5; status_1=$3da; VideoSegment=$A000; DAC_addr=$3c8; DAC_data=$3c9; misc_out_write=$3C2; misc_out_read=$3CC; Procedure SetBiosMode(mode:byte); Var regs:registers; Begin regs.AH:=$00; regs.AL:=mode; Intr($10,regs); End; Procedure SetBiosCursorType(startline,endline:byte); Var regs:registers; Begin regs.AH:=$01; regs.CH:=startline; regs.CL:=endline; Intr($10,regs); End; Procedure Offset(bytes_per_line:byte); Begin Port[crtc_index]:=$13; Port[crtc_data]:=bytes_per_line; End; Procedure sync_reset_on; Begin Port[seq_index]:=$00; Port[seq_data]:=Port[seq_data] and 253; End; Procedure sync_reset_off; Begin Port[seq_index]:=$00; Port[seq_data]:=Port[seq_data] or 2; End; Procedure enable_timing_writes; Begin Port[crtc_index]:=$11; Port[crtc_data]:=Port[crtc_data] and 127; Port[crtc_index]:=$3; Port[crtc_data]:=Port[crtc_data] or 128; End; Procedure set_positive_syncs; Begin Port[misc_out_write]:=Port[misc_out_read] and 63; End; Begin SetBiosMode($01); sync_reset_on; Port[seq_index]:=$01; Port[seq_data]:=Port[seq_data] or 8; sync_reset_off; enable_timing_writes; Port[crtc_index]:=$00; {crtc horizonal total} Port[crtc_data]:=96; {u96} Port[crtc_index]:=$06; {crtc vertical total} Port[crtc_data]:=55; {u55} Port[crtc_index]:=$10; {crtc vertical start register} Port[crtc_data]:=30; {u30} Port[crtc_index]:=$05; {crtc end horizonal retrace} Port[crtc_data]:=129; {129} Port[crtc_index]:=$11; {crtc end vertical retrace} Port[crtc_data]:=33; {46} Port[crtc_index]:=$12; {crtc} Port[crtc_data]:=2; {143} Port[crtc_index]:=$15; {crtc end} Port[crtc_data]:=45; {150} Port[crtc_index]:=$16; {crtc end} Port[crtc_data]:=30; {185} Port[crtc_index]:=$04; {horizonal retrace start} Port[crtc_data]:=83; set_positive_syncs; Writeln; Writeln; Writeln; Writeln('VGA text mode to TV driver version 0.1'); Writeln('Copyright by Tomi Engdahl 1994-1996'); End. [ Last edited by swing on 2006-4-19 at 16:10 ]


附件 1: play.rar (2006-4-16 15:11, 41.87 K, 下载附件所需积分 1 点 ,下载次数: 24)
2006-4-16 15:11
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
GOTOmsdos
铂金会员

C++启程者


积分 5154
发帖 1827
注册 2003-7-18
状态 离线
『第 2 楼』:  

已经编译了的应该看不出是用什么语言写的啦!


2006-4-16 15:21
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
swing
新手上路





积分 19
发帖 11
注册 2006-4-16
状态 离线
『第 3 楼』:  

我刚才找了, 好像是Qb写, 因为它的出错提示里面好像是Qb的. 但是我就是不明白, 为什么这个程序针对sis6236显卡, (我们 通过特殊的转换器,把视频信号输出到普通电视的 显示屏, 从电脑启动到 进入程序前, 显示屏都是抖动的; 进入这个程序后就不抖了! 而且退出这个程序后也不抖 -----必须是sis6236显卡) [ Last edited by swing on 2006-4-16 at 15:57 ]


2006-4-16 15:56
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
swing
新手上路





积分 19
发帖 11
注册 2006-4-16
状态 离线
『第 4 楼』:  

高手那儿去了啊!


2006-4-17 12:16
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
jawbin
高级用户




积分 994
发帖 444
注册 2005-1-29
状态 离线
『第 5 楼』:  

Path not found Path not found in module PLAY at address 058C:0058 Hit any key to return to system


2006-4-17 16:53
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
jawbin
高级用户




积分 994
发帖 444
注册 2005-1-29
状态 离线
『第 6 楼』:  

看到“RETURN without GOSUB“,那么似乎是 basic 了?


2006-4-17 16:54
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
jawbin
高级用户




积分 994
发帖 444
注册 2005-1-29
状态 离线
『第 7 楼』:  

你们的产品?


2006-4-17 16:58
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
swing
新手上路





积分 19
发帖 11
注册 2006-4-16
状态 离线
『第 8 楼』:  

不是我们的产品~~~ 别人那儿得到的~~~ 这个程序不能单独运行! play==>把dos转变是图形模式, 然后在上面选择项目! 在pc的纯dos下面一切正常,但是通过特殊的转换卡,连接到显示器(普通电视的显示屏)后, 只有用sis6236显卡,屏幕才不会抖动!


2006-4-18 14:57
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: