dos

DOS中的特殊符号

自作多情 提交于 2020-01-12 20:13:24
使用条件处理符号可以从单个命令行或脚本运行多个命令。通过条件处理符号运行多个命令时,条件处理符号右边的命令根据条件处理符号左边的命令结果来发挥作用。例如,只有在前一个命令失败的情况下,才可能需要运行一个新命令。或者,只有在前一个命令成功时才可能需要运行一个新命令。 可以使用下表列出的特殊字符来传递多个命令。 字符 语法 定义 & [...] command1 & command2 用来分隔一个命令行中的多个命令。Cmd.exe 运行第一个命令,然后运行第二个命令。 && [...] command1 && command2 只有在符号 && 前面的命令成功时,才用于运行该符号后面的命令。Cmd.exe 运行第一个命令,然后只有在第一个命令运行成功时才运行第二个命令。 || [...] command1 || command2 只有在符号 || 前面的命令失败时,才用于运行符号 || 后面的命令。Cmd.exe 运行第一个命令,然后只有在第一个命令未能运行成功(接收到大于零的错误代码)时才运行第二个命令。 ( ) [...] (command1 & command2) 用来分组或嵌套多个命令。 ; 或者 , command1 parameter1;parameter2 用来分隔命令参数。 注意 · “与”符号 (&)、管道符号 (|) 以及括号 () 是特殊字符,将它们作为参数传递时

Need help allocating a far pointer on Borland C++ 3.0

倖福魔咒の 提交于 2020-01-12 15:45:27
问题 I am writing a DOS game framework to learn C better and a general interest in programming on old hardware (especially on the system I grew up with). I am trying to implement a double buffer system but I am having trouble allocating a far pointer to a 320*200 array. At first I was trying to use malloc but found out it can only allocate under 64kb. I read that you need to use farmalloc (malloc returns NULL) and it allocated correctly. However, when _fmemset or _fmemcpy is run.... the whole

How to compile c/c++ to ms-dos .com programs?

半世苍凉 提交于 2020-01-11 14:28:09
问题 I use Code::Blocks with GNU GCC Compiler. My question is: is there any way to compile c/c++ code to ms-dos 16bit (.com) executable format? I tried to set the build options and search the compiler parameters on the net, but i couldn't find anything. 回答1: You can certainly compile C and/or (an ancient dialect of) C++ to a 16-bit MS-DOS .com file. The compiler/linker you have with Code::Blocks almost certainly can't do that though. In particular, at least to my knowledge, gcc has never even

Turbo assembler language cursor position, offset

我怕爱的太早我们不能终老 提交于 2020-01-11 11:17:10
问题 We have given an instruction to make the the text CSC 112.1 to be centered. I used DB instruction and offset. This is my code .model small .stack .data c db 10,13,10,13," лллл ",10,13 db " лллллл ",10,13 db "лл лл",10,13 db "лл ",10,13 db "лл ",10,13 db "лл ",10,13 db "лл ",10,13 db "лл ",10,13 db "лл ",10,13 db "лл лл",10,13 db " лллллл ",10,13 db " лллл ",10,13,"$" .code mov ax,@data mov ds,ax call ccall ;call the procedure ccall which outputs C call scall ;call the procedure scall which

快速学习-常见DOS命令精讲

做~自己de王妃 提交于 2020-01-08 21:05:02
1 用二种方法打开DOS命令窗口 1.1 进入DOS命令行界面方法一 在Windows 2000/XP/2003的开始菜单中执行“开始/运行”命令,在运行对话框中键入“cmd”命令,可进入命令行界面。 1.2 进入DOS命令行界面方法二 在Windows 2000/XP/2003的开始菜单中执行“开始/程序/附件/命令提示符”,也可以打开DOS命令行界面。 2.DOS命令 At 作用: 列出在指定的时间和日期在计算机上运行的已计划命令或计划命令和程序。首先要保证“计划”服务已启动才能使用 at 命令。 格式: at [ \\IP ] [ [ ID ] [ / delete ] / delete [ / yes ] ] at [ \\computername ] time [ / interactive ] [ / every : date [ , . . . ] / next : date [ , . . . ] ] command 使用说明: (1)如果在没有参数的情况下使用,则 at 列出已计划的命令。 (2)\IP:指定远程计算机,在此输入远程计划机的IP地址。如果省略该参数,命令将安排在本地计算机。 (3)ID:指定指派给已计划命令的识别码。 (4)/delete:取消已计划的命令。如果省略了ID,计算机中已计划的命令将被全部取消。 /yes:当删除已计划的事件时

在DOS下查看进程的端口号和进程ID,结束进程

那年仲夏 提交于 2020-01-08 14:49:21
有时候想用某一个端口号,比如启动Tomcat服务器,默认是需要8080端口,结果发现这个端口号被占用了,但是又不知道是哪个进程占用了它,就可以用以下步骤停止占用8080端口号的进程。 1.win+r键打开运行窗口 2.在运行窗口输入cmd,回车 3.在DOS窗口中输入netstat -ano|find "8080" 如下图: 其中8080就是查询占用的端口号,8908就是进程的编号 4.输入命令tasklist|find "8908" 查看是哪个程序 可以看到是javaw.exe 5.停止该进程taskkill /pid /t -/f 8908 /pid是指定进程号 /T 终止指定的进程和由它启用的子进程。 /F 指定强制终止进程。 因为8908 进程还有用,我用其它进程做了个示例: 可以看到进程已经不在进程列表中了 来源: https://www.cnblogs.com/java-ty/p/12166461.html

DOS 操作WINDOW系统服务

旧街凉风 提交于 2020-01-08 05:48:38
查看运行的服务: net start 启动服务: net start 服务名 停止服务: net stop 服务名 卸载服务: 服务名 -uninstall (卸载前先停止服务) 使用sc命令: 1 修改服务启动类型 sc config 服务名 start= demand (设置服务为手动启动) start= auto (设置服务为自动启动) start= disabled (设置服务为禁用) 2 安装服务:sc create 服务名 3 卸载服务:sc delete 服务名(卸载前先停止服务) 来源: https://www.cnblogs.com/My-Dream/archive/2012/04/06/2434191.html

DOS常用命令

余生颓废 提交于 2020-01-07 12:09:47
切换根目录 如c:或d: 切换子目录 cd xxx 新建文件夹 md test 新建文件 md cd.>test.txt 删除文件夹及该文件夹内所有文件 使用rd(rmdir的缩写)或rmdir命令,完整命令rd /s /q [盘符:\][路径\]新目录名,因为rd只能删除空的文件夹,而如果其中有子文件或子文件夹的时候就会停下来,这时我们加上/s就可以直接删除,但是删除过程中会提示你是否确定删除,对于懒癌患者我们有添加了/q,即quiet,安静模式;所以使用以上命令会完整删除你选中的整个文件夹。 删除文件或删除文件夹内的文件,文件夹保留 还有种del命令,主要用于删除文件,如果删除文件夹,会提示你是否确定,确定后删除的是该文件夹内的所有文件,文件夹不会被删除 查看当前目录结构 dir 清屏 cls 参考: 命令行的目录跳转、文件新建和删除 https://www.cnblogs.com/hrlin/articles/cmdlearn.html 来源: https://www.cnblogs.com/hai-feng/p/12154398.html

How to use local labels in procedures 8086 assembler?

╄→尐↘猪︶ㄣ 提交于 2020-01-07 07:47:17
问题 I wrote simple .MODEL small .STACK 100h .DATA liczba dw 0h licznik dw 0 potega dw 1 liczbaString dw ? buff db 26 .CODE Program: mov ax, @DATA mov ds, ax call PobierzString call PetlaIteracjiZnaku ;zwraca do ax pobraną liczbę PetlaIteracjiZnaku PROC mov si, liczbaString call ZnajdzDlugoscString mov si, liczbaString add si, 2 mov bl, 1 petla: xor ax, ax mov al, [si] cmp al, 24h; sprawdza czy nie jest koniec wprowadzanej liczby '$' je return sub al, 30h ; odejmuję 30 żeby zamienić znak na liczbę

search given set of files and copy to another directory

*爱你&永不变心* 提交于 2020-01-06 06:48:46
问题 There is a given set of file names in a needToFind.txt file such as: myImage1.jpg , theImage.jpg, parisImage.jpg (This is a flie that I will format it does not matter filee names are seperated with comma, or line break) And there is a folder named /MyImageFolder, which contains lets say 1000 images, and also contains myImage1.jpg , theImage.jpg, parisImage.jpg I want to find those given images and copy them to another directory. I want to search given file names in needToFind.txt, in a